tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
voicevox-engine: 0.23.0 -> 0.24.0
TomaSajt
8 months ago
c675af8e
fad46aab
+44
-149
4 changed files
expand all
collapse all
unified
split
pkgs
by-name
vo
voicevox-engine
make-installable.patch
mecab-remove-deprecated.patch
package.nix
pyopenjtalk.nix
+19
-19
pkgs/by-name/vo/voicevox-engine/make-installable.patch
···
1
diff --git a/pyproject.toml b/pyproject.toml
2
-
index fa23446..6a7705c 100644
3
--- a/pyproject.toml
4
+++ b/pyproject.toml
5
-
@@ -40,7 +40,20 @@ use_parentheses = true
6
-
datas = "datas" # PyInstaller's argument
0
7
8
-
[tool.poetry]
9
-
-package-mode = false
10
-
+name = "voicevox-engine"
11
-
+version = "@version@"
12
-
+authors = []
13
-
+description = ""
14
-
+packages = [ { include = "voicevox_engine" } ]
15
-
+include = [
16
-
+ { path = "resources/**/*", format = ["sdist", "wheel"] },
17
-
+ { path = "run.py", format = ["sdist", "wheel"] },
18
-
+ { path = "engine_manifest.json", format = ["sdist", "wheel"] },
19
-
+ { path = "presets.yaml", format = ["sdist", "wheel"] }
0
20
+]
21
+
22
-
+[tool.poetry.scripts]
23
-
+voicevox-engine = "run:main"
24
25
-
[tool.poetry.dependencies]
26
-
python = "~3.11"
···
1
diff --git a/pyproject.toml b/pyproject.toml
2
+
index 42a636b..209893f 100644
3
--- a/pyproject.toml
4
+++ b/pyproject.toml
5
+
@@ -23,6 +23,21 @@ dependencies = [
6
+
"uvicorn>=0.34.0",
7
+
]
8
9
+
+[project.scripts]
10
+
+voicevox-engine = "run:main"
11
+
+
12
+
+[build-system]
13
+
+requires = ["hatchling"]
14
+
+build-backend = "hatchling.build"
15
+
+
16
+
+[tool.hatch.build]
17
+
+only-include = [
18
+
+ "voicevox_engine",
19
+
+ "resources",
20
+
+ "run.py",
21
+
+ "engine_manifest.json",
22
+]
23
+
24
+
[tool.uv]
25
+
default-groups = []
26
0
0
-92
pkgs/by-name/vo/voicevox-engine/mecab-remove-deprecated.patch
···
1
-
diff --git a/lib/open_jtalk/src/mecab/src/char_property.h b/lib/open_jtalk/src/mecab/src/char_property.h
2
-
index 35f4b05..9c904ba 100644
3
-
--- a/lib/open_jtalk/src/mecab/src/char_property.h
4
-
+++ b/lib/open_jtalk/src/mecab/src/char_property.h
5
-
@@ -37,7 +37,7 @@ class CharProperty {
6
-
inline const char *seekToOtherType(const char *begin, const char *end,
7
-
CharInfo c, CharInfo *fail,
8
-
size_t *mblen, size_t *clen) const {
9
-
- register const char *p = begin;
10
-
+ const char *p = begin;
11
-
*clen = 0;
12
-
while (p != end && c.isKindOf(*fail = getCharInfo(p, end, mblen))) {
13
-
p += *mblen;
14
-
diff --git a/lib/open_jtalk/src/mecab/src/darts.h b/lib/open_jtalk/src/mecab/src/darts.h
15
-
index 91b2eae..d6736cf 100644
16
-
--- a/lib/open_jtalk/src/mecab/src/darts.h
17
-
+++ b/lib/open_jtalk/src/mecab/src/darts.h
18
-
@@ -404,10 +404,10 @@ class DoubleArrayImpl {
19
-
T result;
20
-
set_result(result, -1, 0);
21
-
22
-
- register array_type_ b = array_[node_pos].base;
23
-
- register array_u_type_ p;
24
-
+ array_type_ b = array_[node_pos].base;
25
-
+ array_u_type_ p;
26
-
27
-
- for (register size_t i = 0; i < len; ++i) {
28
-
+ for (size_t i = 0; i < len; ++i) {
29
-
p = b +(node_u_type_)(key[i]) + 1;
30
-
if (static_cast<array_u_type_>(b) == array_[p].check)
31
-
b = array_[p].base;
32
-
@@ -431,12 +431,12 @@ class DoubleArrayImpl {
33
-
size_t node_pos = 0) const {
34
-
if (!len) len = length_func_()(key);
35
-
36
-
- register array_type_ b = array_[node_pos].base;
37
-
- register size_t num = 0;
38
-
- register array_type_ n;
39
-
- register array_u_type_ p;
40
-
+ array_type_ b = array_[node_pos].base;
41
-
+ size_t num = 0;
42
-
+ array_type_ n;
43
-
+ array_u_type_ p;
44
-
45
-
- for (register size_t i = 0; i < len; ++i) {
46
-
+ for (size_t i = 0; i < len; ++i) {
47
-
p = b; // + 0;
48
-
n = array_[p].base;
49
-
if ((array_u_type_) b == array_[p].check && n < 0) {
50
-
@@ -469,8 +469,8 @@ class DoubleArrayImpl {
51
-
size_t len = 0) const {
52
-
if (!len) len = length_func_()(key);
53
-
54
-
- register array_type_ b = array_[node_pos].base;
55
-
- register array_u_type_ p;
56
-
+ array_type_ b = array_[node_pos].base;
57
-
+ array_u_type_ p;
58
-
59
-
for (; key_pos < len; ++key_pos) {
60
-
p = b +(node_u_type_)(key[key_pos]) + 1;
61
-
diff --git a/lib/open_jtalk/src/mecab/src/dictionary.cpp b/lib/open_jtalk/src/mecab/src/dictionary.cpp
62
-
index 5717d4d..3ab6e1f 100644
63
-
--- a/lib/open_jtalk/src/mecab/src/dictionary.cpp
64
-
+++ b/lib/open_jtalk/src/mecab/src/dictionary.cpp
65
-
@@ -66,7 +66,7 @@ int progress_bar_darts(size_t current, size_t total) {
66
-
}
67
-
68
-
template <typename T1, typename T2>
69
-
-struct pair_1st_cmp: public std::binary_function<bool, T1, T2> {
70
-
+struct pair_1st_cmp {
71
-
bool operator()(const std::pair<T1, T2> &x1,
72
-
const std::pair<T1, T2> &x2) {
73
-
return x1.first < x2.first;
74
-
diff --git a/lib/open_jtalk/src/mecab/src/viterbi.cpp b/lib/open_jtalk/src/mecab/src/viterbi.cpp
75
-
index 6277fe9..5ccefb7 100644
76
-
--- a/lib/open_jtalk/src/mecab/src/viterbi.cpp
77
-
+++ b/lib/open_jtalk/src/mecab/src/viterbi.cpp
78
-
@@ -318,11 +318,11 @@ template <bool IsAllPath> bool connect(size_t pos, Node *rnode,
79
-
const Connector *connector,
80
-
Allocator<Node, Path> *allocator) {
81
-
for (;rnode; rnode = rnode->bnext) {
82
-
- register long best_cost = 2147483647;
83
-
+ long best_cost = 2147483647;
84
-
Node* best_node = 0;
85
-
for (Node *lnode = end_node_list[pos]; lnode; lnode = lnode->enext) {
86
-
- register int lcost = connector->cost(lnode, rnode); // local cost
87
-
- register long cost = lnode->cost + lcost;
88
-
+ int lcost = connector->cost(lnode, rnode); // local cost
89
-
+ long cost = lnode->cost + lcost;
90
-
91
-
if (cost < best_cost) {
92
-
best_node = lnode;
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+14
-18
pkgs/by-name/vo/voicevox-engine/package.nix
···
2
lib,
3
fetchFromGitHub,
4
python3Packages,
5
-
replaceVars,
6
voicevox-core,
7
}:
8
9
python3Packages.buildPythonApplication rec {
10
pname = "voicevox-engine";
11
-
version = "0.23.0";
12
pyproject = true;
13
14
src = fetchFromGitHub {
15
owner = "VOICEVOX";
16
repo = "voicevox_engine";
17
tag = version;
18
-
hash = "sha256-kuWpLnDKRYcfV9FxYLeR6FmQFO2K12KxJx/Y/4MwhbM=";
19
};
20
21
patches = [
22
-
# the upstream package only uses poetry for dependency management, not for package definition
23
-
# this patch makes the package installable via poetry-core
24
-
(replaceVars ./make-installable.patch {
25
-
inherit version;
26
-
})
27
];
28
29
build-system = with python3Packages; [
30
-
poetry-core
31
];
32
33
dependencies =
···
35
passthru.pyopenjtalk
36
]
37
++ (with python3Packages; [
38
-
numpy
39
fastapi
40
jinja2
0
0
0
0
41
python-multipart
42
-
uvicorn
43
-
soundfile
44
pyyaml
45
-
pyworld
46
semver
47
-
platformdirs
0
48
soxr
49
-
pydantic
50
starlette
0
51
]);
52
53
pythonRemoveDeps = [
54
# upstream wants fastapi-slim, but we provide fastapi instead
55
"fastapi-slim"
56
];
57
-
58
-
pythonRelaxDeps = true;
59
60
preConfigure = ''
61
# copy demo metadata to temporary directory
···
103
owner = "VOICEVOX";
104
repo = "voicevox_resource";
105
tag = version;
106
-
hash = "sha256-6pxx+ebNzXd3qbrFa4gfMDM2e5XANo3ZPzSAegKoJBE=";
107
};
108
109
pyopenjtalk = python3Packages.callPackage ./pyopenjtalk.nix { };
···
2
lib,
3
fetchFromGitHub,
4
python3Packages,
0
5
voicevox-core,
6
}:
7
8
python3Packages.buildPythonApplication rec {
9
pname = "voicevox-engine";
10
+
version = "0.24.0";
11
pyproject = true;
12
13
src = fetchFromGitHub {
14
owner = "VOICEVOX";
15
repo = "voicevox_engine";
16
tag = version;
17
+
hash = "sha256-LFbKnNv+NNfA6dvgVGr8fGr+3o5/sAyZ8XFZan2EJUY=";
18
};
19
20
patches = [
21
+
# this patch makes the package installable via hatchling
22
+
./make-installable.patch
0
0
0
23
];
24
25
build-system = with python3Packages; [
26
+
hatchling
27
];
28
29
dependencies =
···
31
passthru.pyopenjtalk
32
]
33
++ (with python3Packages; [
0
34
fastapi
35
jinja2
36
+
kanalizer
37
+
numpy
38
+
platformdirs
39
+
pydantic
40
python-multipart
41
+
pyworld
0
42
pyyaml
0
43
semver
44
+
setuptools
45
+
soundfile
46
soxr
0
47
starlette
48
+
uvicorn
49
]);
50
51
pythonRemoveDeps = [
52
# upstream wants fastapi-slim, but we provide fastapi instead
53
"fastapi-slim"
54
];
0
0
55
56
preConfigure = ''
57
# copy demo metadata to temporary directory
···
99
owner = "VOICEVOX";
100
repo = "voicevox_resource";
101
tag = version;
102
+
hash = "sha256-/L7gqskzg7NFBO6Jg2MEMYuQeZK58hTWrRypTE42nGg=";
103
};
104
105
pyopenjtalk = python3Packages.callPackage ./pyopenjtalk.nix { };
+11
-20
pkgs/by-name/vo/voicevox-engine/pyopenjtalk.nix
···
4
buildPythonPackage,
5
fetchFromGitHub,
6
fetchzip,
0
7
setuptools,
8
-
cython_0,
0
9
cmake,
10
numpy,
11
oldest-supported-numpy,
12
-
six,
13
tqdm,
14
}:
15
···
22
in
23
buildPythonPackage {
24
pname = "pyopenjtalk";
25
-
version = "0-unstable-2023-09-08";
26
pyproject = true;
27
0
0
0
28
src = fetchFromGitHub {
29
owner = "VOICEVOX";
30
repo = "pyopenjtalk";
31
-
rev = "b35fc89fe42948a28e33aed886ea145a51113f88";
32
-
hash = "sha256-DbZkCMdirI6wSRUQSJrkojyjGmViqGeQPO0kSKiw2gE=";
33
fetchSubmodules = true;
34
};
35
36
-
patches = [
37
-
# this patch fixes the darwin build
38
-
# open_jtalk uses mecab, which uses the register keyword and std::binary_function, which are not allowed in c++17
39
-
# this patch removes them
40
-
./mecab-remove-deprecated.patch
41
-
];
42
-
43
-
postPatch = ''
44
-
substituteInPlace pyproject.toml \
45
-
--replace-fail 'setuptools<v60.0' 'setuptools'
46
-
'';
47
-
48
build-system = [
49
setuptools
50
-
cython_0
0
51
cmake
52
numpy
53
oldest-supported-numpy
···
56
dontUseCmakeConfigure = true;
57
58
dependencies = [
59
-
setuptools # imports pkg_resources at runtime
60
numpy
61
-
six
62
tqdm
63
];
64
···
4
buildPythonPackage,
5
fetchFromGitHub,
6
fetchzip,
7
+
8
setuptools,
9
+
setuptools-scm,
10
+
cython,
11
cmake,
12
numpy,
13
oldest-supported-numpy,
0
14
tqdm,
15
}:
16
···
23
in
24
buildPythonPackage {
25
pname = "pyopenjtalk";
26
+
version = "0-unstable-2025-04-23";
27
pyproject = true;
28
29
+
# needed because setuptools-scm doesn't like the 0-unstable format
30
+
env.SETUPTOOLS_SCM_PRETEND_VERSION = "0.0.1";
31
+
32
src = fetchFromGitHub {
33
owner = "VOICEVOX";
34
repo = "pyopenjtalk";
35
+
rev = "74703b034dd90a1f199f49bb70bf3b66b1728a86";
36
+
hash = "sha256-UUUYoVEqENKux5N7ucbjcnrZ2+ewwxwP8S0WksaJEAQ=";
37
fetchSubmodules = true;
38
};
39
0
0
0
0
0
0
0
0
0
0
0
0
40
build-system = [
41
setuptools
42
+
setuptools-scm
43
+
cython
44
cmake
45
numpy
46
oldest-supported-numpy
···
49
dontUseCmakeConfigure = true;
50
51
dependencies = [
0
52
numpy
0
53
tqdm
54
];
55