Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.1 kB view raw
1{ buildPythonPackage 2, piper-tts 3 4# build 5, cython 6, python 7 8# propagates 9, espeak-phonemizer 10, librosa 11, numpy 12, onnxruntime 13, pytorch-lightning 14, torch 15}: 16 17buildPythonPackage { 18 inherit (piper-tts) version src meta; 19 20 pname = "piper-train"; 21 format = "setuptools"; 22 23 sourceRoot = "source/src/python"; 24 25 nativeBuildInputs = [ 26 cython 27 ]; 28 29 postPatch = '' 30 substituteInPlace requirements.txt \ 31 --replace "onnxruntime~=1.11.0" "onnxruntime" \ 32 --replace "pytorch-lightning~=1.7.0" "pytorch-lightning" \ 33 --replace "torch~=1.11.0" "torch" 34 ''; 35 36 postBuild = '' 37 make -C piper_train/vits/monotonic_align 38 ''; 39 40 postInstall = '' 41 export MONOTONIC_ALIGN=$out/${python.sitePackages}/piper_train/vits/monotonic_align/monotonic_align 42 mkdir -p $MONOTONIC_ALIGN 43 cp -v ./piper_train/vits/monotonic_align/piper_train/vits/monotonic_align/core.*.so $MONOTONIC_ALIGN/ 44 ''; 45 46 propagatedBuildInputs = [ 47 espeak-phonemizer 48 librosa 49 numpy 50 onnxruntime 51 pytorch-lightning 52 torch 53 ]; 54 55 pythonImportsCheck = [ 56 "piper_train" 57 ]; 58 59 doCheck = false; # no tests 60}