lol

voicevox-engine: 0.23.0 -> 0.24.0

TomaSajt c675af8e fad46aab

+44 -149
+19 -19
pkgs/by-name/vo/voicevox-engine/make-installable.patch
··· 1 1 diff --git a/pyproject.toml b/pyproject.toml 2 - index fa23446..6a7705c 100644 2 + index 42a636b..209893f 100644 3 3 --- a/pyproject.toml 4 4 +++ b/pyproject.toml 5 - @@ -40,7 +40,20 @@ use_parentheses = true 6 - datas = "datas" # PyInstaller's argument 5 + @@ -23,6 +23,21 @@ dependencies = [ 6 + "uvicorn>=0.34.0", 7 + ] 7 8 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"] } 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", 20 22 +] 21 23 + 22 - +[tool.poetry.scripts] 23 - +voicevox-engine = "run:main" 24 + [tool.uv] 25 + default-groups = [] 24 26 25 - [tool.poetry.dependencies] 26 - python = "~3.11"
-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;
+14 -18
pkgs/by-name/vo/voicevox-engine/package.nix
··· 2 2 lib, 3 3 fetchFromGitHub, 4 4 python3Packages, 5 - replaceVars, 6 5 voicevox-core, 7 6 }: 8 7 9 8 python3Packages.buildPythonApplication rec { 10 9 pname = "voicevox-engine"; 11 - version = "0.23.0"; 10 + version = "0.24.0"; 12 11 pyproject = true; 13 12 14 13 src = fetchFromGitHub { 15 14 owner = "VOICEVOX"; 16 15 repo = "voicevox_engine"; 17 16 tag = version; 18 - hash = "sha256-kuWpLnDKRYcfV9FxYLeR6FmQFO2K12KxJx/Y/4MwhbM="; 17 + hash = "sha256-LFbKnNv+NNfA6dvgVGr8fGr+3o5/sAyZ8XFZan2EJUY="; 19 18 }; 20 19 21 20 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 - }) 21 + # this patch makes the package installable via hatchling 22 + ./make-installable.patch 27 23 ]; 28 24 29 25 build-system = with python3Packages; [ 30 - poetry-core 26 + hatchling 31 27 ]; 32 28 33 29 dependencies = ··· 35 31 passthru.pyopenjtalk 36 32 ] 37 33 ++ (with python3Packages; [ 38 - numpy 39 34 fastapi 40 35 jinja2 36 + kanalizer 37 + numpy 38 + platformdirs 39 + pydantic 41 40 python-multipart 42 - uvicorn 43 - soundfile 41 + pyworld 44 42 pyyaml 45 - pyworld 46 43 semver 47 - platformdirs 44 + setuptools 45 + soundfile 48 46 soxr 49 - pydantic 50 47 starlette 48 + uvicorn 51 49 ]); 52 50 53 51 pythonRemoveDeps = [ 54 52 # upstream wants fastapi-slim, but we provide fastapi instead 55 53 "fastapi-slim" 56 54 ]; 57 - 58 - pythonRelaxDeps = true; 59 55 60 56 preConfigure = '' 61 57 # copy demo metadata to temporary directory ··· 103 99 owner = "VOICEVOX"; 104 100 repo = "voicevox_resource"; 105 101 tag = version; 106 - hash = "sha256-6pxx+ebNzXd3qbrFa4gfMDM2e5XANo3ZPzSAegKoJBE="; 102 + hash = "sha256-/L7gqskzg7NFBO6Jg2MEMYuQeZK58hTWrRypTE42nGg="; 107 103 }; 108 104 109 105 pyopenjtalk = python3Packages.callPackage ./pyopenjtalk.nix { };
+11 -20
pkgs/by-name/vo/voicevox-engine/pyopenjtalk.nix
··· 4 4 buildPythonPackage, 5 5 fetchFromGitHub, 6 6 fetchzip, 7 + 7 8 setuptools, 8 - cython_0, 9 + setuptools-scm, 10 + cython, 9 11 cmake, 10 12 numpy, 11 13 oldest-supported-numpy, 12 - six, 13 14 tqdm, 14 15 }: 15 16 ··· 22 23 in 23 24 buildPythonPackage { 24 25 pname = "pyopenjtalk"; 25 - version = "0-unstable-2023-09-08"; 26 + version = "0-unstable-2025-04-23"; 26 27 pyproject = true; 27 28 29 + # needed because setuptools-scm doesn't like the 0-unstable format 30 + env.SETUPTOOLS_SCM_PRETEND_VERSION = "0.0.1"; 31 + 28 32 src = fetchFromGitHub { 29 33 owner = "VOICEVOX"; 30 34 repo = "pyopenjtalk"; 31 - rev = "b35fc89fe42948a28e33aed886ea145a51113f88"; 32 - hash = "sha256-DbZkCMdirI6wSRUQSJrkojyjGmViqGeQPO0kSKiw2gE="; 35 + rev = "74703b034dd90a1f199f49bb70bf3b66b1728a86"; 36 + hash = "sha256-UUUYoVEqENKux5N7ucbjcnrZ2+ewwxwP8S0WksaJEAQ="; 33 37 fetchSubmodules = true; 34 38 }; 35 39 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 40 build-system = [ 49 41 setuptools 50 - cython_0 42 + setuptools-scm 43 + cython 51 44 cmake 52 45 numpy 53 46 oldest-supported-numpy ··· 56 49 dontUseCmakeConfigure = true; 57 50 58 51 dependencies = [ 59 - setuptools # imports pkg_resources at runtime 60 52 numpy 61 - six 62 53 tqdm 63 54 ]; 64 55