larynx-train: init at larynx.version

This commit is contained in:
Martin Weinelt 2023-01-13 00:41:50 +01:00
parent 9ecd6c4c2d
commit adcf940602
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
3 changed files with 65 additions and 0 deletions

View 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
}

View file

@ -9102,6 +9102,8 @@ with pkgs;
larynx = callPackage ../tools/audio/larynx { };
larynx-train = with python3Packages; toPythonApplication larynx-train;
latex2html = callPackage ../tools/misc/latex2html { };
lazycli = callPackage ../tools/misc/lazycli { };

View file

@ -5156,6 +5156,8 @@ self: super: with self; {
lark = callPackage ../development/python-modules/lark { };
larynx-train = callPackage ../development/python-modules/larynx-train { };
latexcodec = callPackage ../development/python-modules/latexcodec { };
latexify-py = callPackage ../development/python-modules/latexify-py { };