nixpkgs/pkgs/tools/audio/piper/train.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.0 KiB
Nix
Raw Normal View History

{ piper-tts
, python3
2023-01-12 23:41:50 +00:00
}:
let
python = python3.override {
packageOverrides = self: super: {
};
};
in
python.pkgs.buildPythonPackage {
inherit (piper-tts) version src;
2023-01-12 23:41:50 +00:00
pname = "piper-train";
2023-01-12 23:41:50 +00:00
format = "setuptools";
sourceRoot = "${piper-tts.src.name}/src/python";
2023-01-12 23:41:50 +00:00
nativeBuildInputs = with python.pkgs; [
2023-01-12 23:41:50 +00:00
cython
];
postBuild = ''
make -C piper_train/vits/monotonic_align
2023-01-12 23:41:50 +00:00
'';
postInstall = ''
export MONOTONIC_ALIGN=$out/${python.sitePackages}/piper_train/vits/monotonic_align/monotonic_align
2023-01-12 23:41:50 +00:00
mkdir -p $MONOTONIC_ALIGN
cp -v ./piper_train/vits/monotonic_align/piper_train/vits/monotonic_align/core.*.so $MONOTONIC_ALIGN/
2023-01-12 23:41:50 +00:00
'';
propagatedBuildInputs = with python.pkgs; [
2023-01-12 23:41:50 +00:00
espeak-phonemizer
librosa
numpy
onnxruntime
piper-phonemize
2023-01-12 23:41:50 +00:00
pytorch-lightning
torch
];
pythonImportsCheck = [
"piper_train"
2023-01-12 23:41:50 +00:00
];
doCheck = false; # no tests
meta = piper-tts.meta // {
# requires torch<2, pytorch-lightning~=1.7
broken = true;
};
2023-01-12 23:41:50 +00:00
}