larynx-train: init at larynx.version
This commit is contained in:
parent
9ecd6c4c2d
commit
adcf940602
61
pkgs/development/python-modules/larynx-train/default.nix
Normal file
61
pkgs/development/python-modules/larynx-train/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, larynx
|
||||||
|
|
||||||
|
# build
|
||||||
|
, cython
|
||||||
|
, python
|
||||||
|
|
||||||
|
# propagates
|
||||||
|
, espeak-phonemizer
|
||||||
|
, librosa
|
||||||
|
, numpy
|
||||||
|
, onnxruntime
|
||||||
|
, pytorch-lightning
|
||||||
|
, torch
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
inherit (larynx) version src meta;
|
||||||
|
|
||||||
|
pname = "larynx-train";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
sourceRoot = "source/src/python";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cython
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace requirements.txt \
|
||||||
|
--replace "onnxruntime~=1.11.0" "onnxruntime" \
|
||||||
|
--replace "pytorch-lightning~=1.7.0" "pytorch-lightning" \
|
||||||
|
--replace "torch~=1.11.0" "torch"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
make -C larynx_train/vits/monotonic_align
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
export MONOTONIC_ALIGN=$out/${python.sitePackages}/larynx_train/vits/monotonic_align/monotonic_align
|
||||||
|
mkdir -p $MONOTONIC_ALIGN
|
||||||
|
cp -v ./larynx_train/vits/monotonic_align/larynx_train/vits/monotonic_align/core.*.so $MONOTONIC_ALIGN/
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
espeak-phonemizer
|
||||||
|
librosa
|
||||||
|
numpy
|
||||||
|
onnxruntime
|
||||||
|
pytorch-lightning
|
||||||
|
torch
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"larynx_train"
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false; # no tests
|
||||||
|
}
|
|
@ -9102,6 +9102,8 @@ with pkgs;
|
||||||
|
|
||||||
larynx = callPackage ../tools/audio/larynx { };
|
larynx = callPackage ../tools/audio/larynx { };
|
||||||
|
|
||||||
|
larynx-train = with python3Packages; toPythonApplication larynx-train;
|
||||||
|
|
||||||
latex2html = callPackage ../tools/misc/latex2html { };
|
latex2html = callPackage ../tools/misc/latex2html { };
|
||||||
|
|
||||||
lazycli = callPackage ../tools/misc/lazycli { };
|
lazycli = callPackage ../tools/misc/lazycli { };
|
||||||
|
|
|
@ -5156,6 +5156,8 @@ self: super: with self; {
|
||||||
|
|
||||||
lark = callPackage ../development/python-modules/lark { };
|
lark = callPackage ../development/python-modules/lark { };
|
||||||
|
|
||||||
|
larynx-train = callPackage ../development/python-modules/larynx-train { };
|
||||||
|
|
||||||
latexcodec = callPackage ../development/python-modules/latexcodec { };
|
latexcodec = callPackage ../development/python-modules/latexcodec { };
|
||||||
|
|
||||||
latexify-py = callPackage ../development/python-modules/latexify-py { };
|
latexify-py = callPackage ../development/python-modules/latexify-py { };
|
||||||
|
|
Loading…
Reference in a new issue