forked from mirrors/nixpkgs
commit
6c0970d40c
|
@ -7,14 +7,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "gruut-ipa";
|
||||
version = "0.11.0";
|
||||
version = "0.12.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhasspy";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "08n79v60jhkz5vhychsicjz4bhz8v4gb2djmz5dfdaivyr0h3bsf";
|
||||
sha256 = "sha256-6pMdBKbp++/5321rc8A2euOSXZCHzHg+wmaEaMZ0egw=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -5,11 +5,15 @@
|
|||
, fetchFromGitHub
|
||||
, Babel
|
||||
, gruut-ipa
|
||||
, dateparser
|
||||
, jsonlines
|
||||
, num2words
|
||||
, python-crfsuite
|
||||
, dataclasses
|
||||
, python
|
||||
, networkx
|
||||
, glibcLocales
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -17,6 +21,7 @@ let
|
|||
"cs"
|
||||
"de"
|
||||
"es"
|
||||
"en"
|
||||
"fr"
|
||||
"it"
|
||||
"nl"
|
||||
|
@ -28,19 +33,21 @@ let
|
|||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "gruut";
|
||||
version = "1.2.3";
|
||||
version = "2.2.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhasspy";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qY4xsoVk1hyY9dYmVXaqDRjcShUQmp8VZOzAQNiC6EM=";
|
||||
sha256 = "sha256-9vj3x2IjTso8ksN1cqe5frwg0Y3GhOB6bPWvaBSBOf8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "Babel~=2.8.0" "Babel"
|
||||
--replace "Babel~=2.8.0" "Babel" \
|
||||
--replace "dateparser~=1.0.0" "dateparser" \
|
||||
--replace "gruut_lang_en~=2.0.0" "gruut_lang_en"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -49,16 +56,28 @@ buildPythonPackage rec {
|
|||
jsonlines
|
||||
num2words
|
||||
python-crfsuite
|
||||
dateparser
|
||||
networkx
|
||||
] ++ lib.optionals (pythonOlder "3.7") [
|
||||
dataclasses
|
||||
] ++ (map (lang: callPackage ./language-pack.nix {
|
||||
inherit lang version format src;
|
||||
}) langPkgs);
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${python.interpreter} -m unittest discover
|
||||
runHook postCheck
|
||||
checkInputs = [ glibcLocales pytestCheckHook ];
|
||||
|
||||
disabledTests = [
|
||||
# https://github.com/rhasspy/gruut/issues/25
|
||||
"test_lexicon_external"
|
||||
|
||||
# requires mishkal library
|
||||
"test_fa"
|
||||
"test_ar"
|
||||
"test_lb"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export LC_ALL=en_US.utf-8
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
# USAGE:
|
||||
|
@ -16,18 +15,19 @@
|
|||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "tts";
|
||||
version = "0.4.1";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "coqui-ai";
|
||||
repo = "TTS";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ZcQUgr+1XTmXoyf2WNsP8Hept42JTFmKXdo0kcU6QWU=";
|
||||
sha256 = "sha256-8a68iFbqqKwtZvufu1Vnv6hGHIQ3HU34wjuQsmr1NUA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i requirements.txt \
|
||||
-e 's!librosa==[^"]*!librosa!' \
|
||||
-e 's!gruut\[.*\]~=2.0.0!gruut!' \
|
||||
-e 's!mecab-python3==[^"]*!mecab-python3!' \
|
||||
-e 's!numba==[^"]*!numba!' \
|
||||
-e 's!numpy==[^"]*!numpy!' \
|
||||
|
@ -86,6 +86,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
"test_multiscale_stft_loss"
|
||||
# Requires network acccess to download models
|
||||
"test_synthesize"
|
||||
"test_run_all_models"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
|
|
Loading…
Reference in a new issue