voicevox: 0.23.0 -> 0.24.1; voicevox-engine: 0.23.0 -> 0.24.0; voicevox-core: 0.15.7 -> 0.15.8; python313Packages.kanalizer: init at 0.1.1 (#420296)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "voicevox-core";
|
||||
version = "0.15.7";
|
||||
version = "0.15.8";
|
||||
|
||||
src = finalAttrs.passthru.sources.${stdenv.hostPlatform.system};
|
||||
|
||||
@@ -42,19 +42,19 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
{
|
||||
"x86_64-linux" = fetchCoreArtifact {
|
||||
id = "linux-x64";
|
||||
hash = "sha256-7FgrJ1HlB8l5MHd2KM4lYRx2bYdxrD2+su1G33/ugUA=";
|
||||
hash = "sha256-n0rYSMR5wgjAtlQ4DWRAhJW/VevGG/Mmj6lXieG1U78=";
|
||||
};
|
||||
"aarch64-linux" = fetchCoreArtifact {
|
||||
id = "linux-arm64";
|
||||
hash = "sha256-fD7YMTo9jeB4vJibnVwX8VrukCUeAwS6VXGOr3VXG+c=";
|
||||
hash = "sha256-GOgBH0UinZMiNszTp2CWJKT9prTi84KH3V9fxpmweeU=";
|
||||
};
|
||||
"x86_64-darwin" = fetchCoreArtifact {
|
||||
id = "osx-x64";
|
||||
hash = "sha256-5h9qEKbdcvip50TLs3vf6lXkSv24VEjOrx6CTUo7Q4Q=";
|
||||
hash = "sha256-8TRlu1ztPciKDX9Igr0TKcyLzP8WRwTN9F11MjXNNW8=";
|
||||
};
|
||||
"aarch64-darwin" = fetchCoreArtifact {
|
||||
id = "osx-arm64";
|
||||
hash = "sha256-0bFLhvP7LqDzuk3pyM9QZfc8eLMW0IgqVkaXsuS3qlY=";
|
||||
hash = "sha256-6Na7LBZg2bWaX1VN6r6zdyg0mszBNn0e7u+cmqKVuY0=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index fa23446..6a7705c 100644
|
||||
index 42a636b..209893f 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -40,7 +40,20 @@ use_parentheses = true
|
||||
datas = "datas" # PyInstaller's argument
|
||||
@@ -23,6 +23,21 @@ dependencies = [
|
||||
"uvicorn>=0.34.0",
|
||||
]
|
||||
|
||||
[tool.poetry]
|
||||
-package-mode = false
|
||||
+name = "voicevox-engine"
|
||||
+version = "@version@"
|
||||
+authors = []
|
||||
+description = ""
|
||||
+packages = [ { include = "voicevox_engine" } ]
|
||||
+include = [
|
||||
+ { path = "resources/**/*", format = ["sdist", "wheel"] },
|
||||
+ { path = "run.py", format = ["sdist", "wheel"] },
|
||||
+ { path = "engine_manifest.json", format = ["sdist", "wheel"] },
|
||||
+ { path = "presets.yaml", format = ["sdist", "wheel"] }
|
||||
+[project.scripts]
|
||||
+voicevox-engine = "run:main"
|
||||
+
|
||||
+[build-system]
|
||||
+requires = ["hatchling"]
|
||||
+build-backend = "hatchling.build"
|
||||
+
|
||||
+[tool.hatch.build]
|
||||
+only-include = [
|
||||
+ "voicevox_engine",
|
||||
+ "resources",
|
||||
+ "run.py",
|
||||
+ "engine_manifest.json",
|
||||
+]
|
||||
+
|
||||
+[tool.poetry.scripts]
|
||||
+voicevox-engine = "run:main"
|
||||
[tool.uv]
|
||||
default-groups = []
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "~3.11"
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
diff --git a/lib/open_jtalk/src/mecab/src/char_property.h b/lib/open_jtalk/src/mecab/src/char_property.h
|
||||
index 35f4b05..9c904ba 100644
|
||||
--- a/lib/open_jtalk/src/mecab/src/char_property.h
|
||||
+++ b/lib/open_jtalk/src/mecab/src/char_property.h
|
||||
@@ -37,7 +37,7 @@ class CharProperty {
|
||||
inline const char *seekToOtherType(const char *begin, const char *end,
|
||||
CharInfo c, CharInfo *fail,
|
||||
size_t *mblen, size_t *clen) const {
|
||||
- register const char *p = begin;
|
||||
+ const char *p = begin;
|
||||
*clen = 0;
|
||||
while (p != end && c.isKindOf(*fail = getCharInfo(p, end, mblen))) {
|
||||
p += *mblen;
|
||||
diff --git a/lib/open_jtalk/src/mecab/src/darts.h b/lib/open_jtalk/src/mecab/src/darts.h
|
||||
index 91b2eae..d6736cf 100644
|
||||
--- a/lib/open_jtalk/src/mecab/src/darts.h
|
||||
+++ b/lib/open_jtalk/src/mecab/src/darts.h
|
||||
@@ -404,10 +404,10 @@ class DoubleArrayImpl {
|
||||
T result;
|
||||
set_result(result, -1, 0);
|
||||
|
||||
- register array_type_ b = array_[node_pos].base;
|
||||
- register array_u_type_ p;
|
||||
+ array_type_ b = array_[node_pos].base;
|
||||
+ array_u_type_ p;
|
||||
|
||||
- for (register size_t i = 0; i < len; ++i) {
|
||||
+ for (size_t i = 0; i < len; ++i) {
|
||||
p = b +(node_u_type_)(key[i]) + 1;
|
||||
if (static_cast<array_u_type_>(b) == array_[p].check)
|
||||
b = array_[p].base;
|
||||
@@ -431,12 +431,12 @@ class DoubleArrayImpl {
|
||||
size_t node_pos = 0) const {
|
||||
if (!len) len = length_func_()(key);
|
||||
|
||||
- register array_type_ b = array_[node_pos].base;
|
||||
- register size_t num = 0;
|
||||
- register array_type_ n;
|
||||
- register array_u_type_ p;
|
||||
+ array_type_ b = array_[node_pos].base;
|
||||
+ size_t num = 0;
|
||||
+ array_type_ n;
|
||||
+ array_u_type_ p;
|
||||
|
||||
- for (register size_t i = 0; i < len; ++i) {
|
||||
+ for (size_t i = 0; i < len; ++i) {
|
||||
p = b; // + 0;
|
||||
n = array_[p].base;
|
||||
if ((array_u_type_) b == array_[p].check && n < 0) {
|
||||
@@ -469,8 +469,8 @@ class DoubleArrayImpl {
|
||||
size_t len = 0) const {
|
||||
if (!len) len = length_func_()(key);
|
||||
|
||||
- register array_type_ b = array_[node_pos].base;
|
||||
- register array_u_type_ p;
|
||||
+ array_type_ b = array_[node_pos].base;
|
||||
+ array_u_type_ p;
|
||||
|
||||
for (; key_pos < len; ++key_pos) {
|
||||
p = b +(node_u_type_)(key[key_pos]) + 1;
|
||||
diff --git a/lib/open_jtalk/src/mecab/src/dictionary.cpp b/lib/open_jtalk/src/mecab/src/dictionary.cpp
|
||||
index 5717d4d..3ab6e1f 100644
|
||||
--- a/lib/open_jtalk/src/mecab/src/dictionary.cpp
|
||||
+++ b/lib/open_jtalk/src/mecab/src/dictionary.cpp
|
||||
@@ -66,7 +66,7 @@ int progress_bar_darts(size_t current, size_t total) {
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
-struct pair_1st_cmp: public std::binary_function<bool, T1, T2> {
|
||||
+struct pair_1st_cmp {
|
||||
bool operator()(const std::pair<T1, T2> &x1,
|
||||
const std::pair<T1, T2> &x2) {
|
||||
return x1.first < x2.first;
|
||||
diff --git a/lib/open_jtalk/src/mecab/src/viterbi.cpp b/lib/open_jtalk/src/mecab/src/viterbi.cpp
|
||||
index 6277fe9..5ccefb7 100644
|
||||
--- a/lib/open_jtalk/src/mecab/src/viterbi.cpp
|
||||
+++ b/lib/open_jtalk/src/mecab/src/viterbi.cpp
|
||||
@@ -318,11 +318,11 @@ template <bool IsAllPath> bool connect(size_t pos, Node *rnode,
|
||||
const Connector *connector,
|
||||
Allocator<Node, Path> *allocator) {
|
||||
for (;rnode; rnode = rnode->bnext) {
|
||||
- register long best_cost = 2147483647;
|
||||
+ long best_cost = 2147483647;
|
||||
Node* best_node = 0;
|
||||
for (Node *lnode = end_node_list[pos]; lnode; lnode = lnode->enext) {
|
||||
- register int lcost = connector->cost(lnode, rnode); // local cost
|
||||
- register long cost = lnode->cost + lcost;
|
||||
+ int lcost = connector->cost(lnode, rnode); // local cost
|
||||
+ long cost = lnode->cost + lcost;
|
||||
|
||||
if (cost < best_cost) {
|
||||
best_node = lnode;
|
||||
@@ -2,32 +2,28 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3Packages,
|
||||
replaceVars,
|
||||
voicevox-core,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "voicevox-engine";
|
||||
version = "0.23.0";
|
||||
version = "0.24.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VOICEVOX";
|
||||
repo = "voicevox_engine";
|
||||
tag = version;
|
||||
hash = "sha256-kuWpLnDKRYcfV9FxYLeR6FmQFO2K12KxJx/Y/4MwhbM=";
|
||||
hash = "sha256-LFbKnNv+NNfA6dvgVGr8fGr+3o5/sAyZ8XFZan2EJUY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# the upstream package only uses poetry for dependency management, not for package definition
|
||||
# this patch makes the package installable via poetry-core
|
||||
(replaceVars ./make-installable.patch {
|
||||
inherit version;
|
||||
})
|
||||
# this patch makes the package installable via hatchling
|
||||
./make-installable.patch
|
||||
];
|
||||
|
||||
build-system = with python3Packages; [
|
||||
poetry-core
|
||||
hatchling
|
||||
];
|
||||
|
||||
dependencies =
|
||||
@@ -35,19 +31,21 @@ python3Packages.buildPythonApplication rec {
|
||||
passthru.pyopenjtalk
|
||||
]
|
||||
++ (with python3Packages; [
|
||||
numpy
|
||||
fastapi
|
||||
jinja2
|
||||
python-multipart
|
||||
uvicorn
|
||||
soundfile
|
||||
pyyaml
|
||||
pyworld
|
||||
semver
|
||||
kanalizer
|
||||
numpy
|
||||
platformdirs
|
||||
soxr
|
||||
pydantic
|
||||
python-multipart
|
||||
pyworld
|
||||
pyyaml
|
||||
semver
|
||||
setuptools
|
||||
soundfile
|
||||
soxr
|
||||
starlette
|
||||
uvicorn
|
||||
]);
|
||||
|
||||
pythonRemoveDeps = [
|
||||
@@ -55,8 +53,6 @@ python3Packages.buildPythonApplication rec {
|
||||
"fastapi-slim"
|
||||
];
|
||||
|
||||
pythonRelaxDeps = true;
|
||||
|
||||
preConfigure = ''
|
||||
# copy demo metadata to temporary directory
|
||||
mv resources/character_info test_character_info
|
||||
@@ -103,7 +99,7 @@ python3Packages.buildPythonApplication rec {
|
||||
owner = "VOICEVOX";
|
||||
repo = "voicevox_resource";
|
||||
tag = version;
|
||||
hash = "sha256-6pxx+ebNzXd3qbrFa4gfMDM2e5XANo3ZPzSAegKoJBE=";
|
||||
hash = "sha256-/L7gqskzg7NFBO6Jg2MEMYuQeZK58hTWrRypTE42nGg=";
|
||||
};
|
||||
|
||||
pyopenjtalk = python3Packages.callPackage ./pyopenjtalk.nix { };
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchzip,
|
||||
|
||||
setuptools,
|
||||
cython_0,
|
||||
setuptools-scm,
|
||||
cython,
|
||||
cmake,
|
||||
numpy,
|
||||
oldest-supported-numpy,
|
||||
six,
|
||||
tqdm,
|
||||
}:
|
||||
|
||||
@@ -22,32 +23,24 @@ let
|
||||
in
|
||||
buildPythonPackage {
|
||||
pname = "pyopenjtalk";
|
||||
version = "0-unstable-2023-09-08";
|
||||
version = "0-unstable-2025-04-23";
|
||||
pyproject = true;
|
||||
|
||||
# needed because setuptools-scm doesn't like the 0-unstable format
|
||||
env.SETUPTOOLS_SCM_PRETEND_VERSION = "0.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VOICEVOX";
|
||||
repo = "pyopenjtalk";
|
||||
rev = "b35fc89fe42948a28e33aed886ea145a51113f88";
|
||||
hash = "sha256-DbZkCMdirI6wSRUQSJrkojyjGmViqGeQPO0kSKiw2gE=";
|
||||
rev = "74703b034dd90a1f199f49bb70bf3b66b1728a86";
|
||||
hash = "sha256-UUUYoVEqENKux5N7ucbjcnrZ2+ewwxwP8S0WksaJEAQ=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# this patch fixes the darwin build
|
||||
# open_jtalk uses mecab, which uses the register keyword and std::binary_function, which are not allowed in c++17
|
||||
# this patch removes them
|
||||
./mecab-remove-deprecated.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'setuptools<v60.0' 'setuptools'
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
cython_0
|
||||
setuptools-scm
|
||||
cython
|
||||
cmake
|
||||
numpy
|
||||
oldest-supported-numpy
|
||||
@@ -56,9 +49,7 @@ buildPythonPackage {
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
dependencies = [
|
||||
setuptools # imports pkg_resources at runtime
|
||||
numpy
|
||||
six
|
||||
tqdm
|
||||
];
|
||||
|
||||
|
||||
@@ -11,39 +11,38 @@ index cc5e2b9..29140f8 100644
|
||||
"executionArgs": [],
|
||||
"host": "http://127.0.0.1:50021"
|
||||
}
|
||||
diff --git a/electron-builder.config.js b/electron-builder.config.js
|
||||
index 10bd7dc..4597b23 100644
|
||||
--- a/electron-builder.config.js
|
||||
+++ b/electron-builder.config.js
|
||||
@@ -38,18 +38,6 @@ const isArm64 = process.arch === "arm64";
|
||||
diff --git a/electron-builder.config.cjs b/electron-builder.config.cjs
|
||||
index d2a21b4..7b338c0 100644
|
||||
--- a/electron-builder.config.cjs
|
||||
+++ b/electron-builder.config.cjs
|
||||
@@ -40,17 +40,6 @@ const isArm64 = process.arch === "arm64";
|
||||
// cf: https://k-hyoda.hatenablog.com/entry/2021/10/23/000349#%E8%BF%BD%E5%8A%A0%E5%B1%95%E9%96%8B%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%85%88%E3%81%AE%E8%A8%AD%E5%AE%9A
|
||||
const extraFilePrefix = isMac ? "MacOS/" : "";
|
||||
|
||||
-const sevenZipFile = fs
|
||||
- .readdirSync(path.resolve(__dirname, "vendored", "7z"))
|
||||
- .find(
|
||||
- // Windows: 7za.exe, Linux: 7zzs, macOS: 7zz
|
||||
- (fileName) => ["7za.exe", "7zzs", "7zz"].includes(fileName),
|
||||
- );
|
||||
-const sevenZipFile = readdirSync(resolve(__dirname, "vendored", "7z")).find(
|
||||
- // Windows: 7za.exe, Linux: 7zzs, macOS: 7zz
|
||||
- (fileName) => ["7za.exe", "7zzs", "7zz"].includes(fileName),
|
||||
-);
|
||||
-
|
||||
-if (!sevenZipFile) {
|
||||
- throw new Error(
|
||||
- "7z binary file not found. Run `node ./tools/download7z.js` first.",
|
||||
- "7z binary file not found. Run `node ./tools/download7z.ts` first.",
|
||||
- );
|
||||
-}
|
||||
|
||||
-
|
||||
/** @type {import("electron-builder").Configuration} */
|
||||
const builderOptions = {
|
||||
@@ -91,14 +79,6 @@ const builderOptions = {
|
||||
beforeBuild: async () => {
|
||||
@@ -91,14 +80,6 @@ const builderOptions = {
|
||||
from: "build/README.txt",
|
||||
to: extraFilePrefix + "README.txt",
|
||||
},
|
||||
- {
|
||||
- from: VOICEVOX_ENGINE_DIR,
|
||||
- to: path.join(extraFilePrefix, "vv-engine"),
|
||||
- to: join(extraFilePrefix, "vv-engine"),
|
||||
- },
|
||||
- {
|
||||
- from: path.resolve(__dirname, "vendored", "7z", sevenZipFile),
|
||||
- from: resolve(__dirname, "vendored", "7z", sevenZipFile),
|
||||
- to: extraFilePrefix + sevenZipFile,
|
||||
- },
|
||||
],
|
||||
|
||||
@@ -2,31 +2,37 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
replaceVars,
|
||||
pnpm_9,
|
||||
nodejs,
|
||||
makeDesktopItem,
|
||||
replaceVars,
|
||||
|
||||
copyDesktopItems,
|
||||
makeWrapper,
|
||||
electron,
|
||||
_7zz,
|
||||
voicevox-engine,
|
||||
dart-sass,
|
||||
jq,
|
||||
makeWrapper,
|
||||
moreutils,
|
||||
nodejs,
|
||||
pnpm_9,
|
||||
|
||||
_7zz,
|
||||
electron,
|
||||
voicevox-engine,
|
||||
}:
|
||||
|
||||
let
|
||||
pnpm = pnpm_9;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "voicevox";
|
||||
version = "0.23.0";
|
||||
version = "0.24.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VOICEVOX";
|
||||
repo = "voicevox";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-wCC4wl5LPJVJQtV+X795rIXnURseQYiCZ9B6YujTFFw=";
|
||||
hash = "sha256-2MXJOLt14zpoahYjd3l3q5UxT2yK/g/jksHO4Q7W6HA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./unlock-node-and-pnpm-versions.patch
|
||||
(replaceVars ./hardcode-paths.patch {
|
||||
sevenzip_path = lib.getExe _7zz;
|
||||
voicevox_engine_path = lib.getExe voicevox-engine;
|
||||
@@ -34,26 +40,41 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# unlock the overly specific pnpm package version pin
|
||||
jq 'del(.packageManager)' package.json | sponge package.json
|
||||
|
||||
substituteInPlace package.json \
|
||||
--replace-fail "999.999.999" "$version" \
|
||||
--replace-fail ' && electron-builder --config electron-builder.config.js --publish never' ""
|
||||
--replace-fail ' && electron-builder --config electron-builder.config.cjs --publish never' ""
|
||||
'';
|
||||
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
patches
|
||||
postPatch
|
||||
;
|
||||
hash = "sha256-IuyDHAomaGEvGbN4gLpyPfZGm/pF9XK+BkXSipaM7NQ=";
|
||||
|
||||
# let's just be safe and add these explicitly to nativeBuildInputs
|
||||
# even though the fetcher already uses them in its implementation
|
||||
nativeBuildInputs = [
|
||||
jq
|
||||
moreutils
|
||||
];
|
||||
|
||||
hash = "sha256-RKgqFmHQnjHS7yeUIbH9awpNozDOCCHplc/bmfxmMyg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
dart-sass
|
||||
jq
|
||||
makeWrapper
|
||||
pnpm_9.configHook
|
||||
moreutils
|
||||
nodejs
|
||||
pnpm.configHook
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
copyDesktopItems
|
||||
@@ -67,9 +88,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# force sass-embedded to use our own sass instead of the bundled one
|
||||
# force sass-embedded to use our own sass from PATH instead of the bundled one
|
||||
substituteInPlace node_modules/sass-embedded/dist/lib/src/compiler-path.js \
|
||||
--replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["${lib.getExe dart-sass}"];'
|
||||
--replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["dart-sass"];'
|
||||
|
||||
cp -r ${electron.dist} electron-dist
|
||||
chmod -R u+w electron-dist
|
||||
@@ -79,7 +100,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
pnpm exec electron-builder \
|
||||
--dir \
|
||||
--config electron-builder.config.js \
|
||||
--config electron-builder.config.cjs \
|
||||
-c.electronDist=electron-dist \
|
||||
-c.electronVersion=${electron.version}
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
diff --git a/package.json b/package.json
|
||||
index d0a58b4..b57b91c 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -4,13 +4,6 @@
|
||||
"author": "Hiroshiba Kazuyuki",
|
||||
"private": true,
|
||||
"main": "./dist/main.js",
|
||||
- "engines": {
|
||||
- "node": ">=22.14.0 <23"
|
||||
- },
|
||||
- "volta": {
|
||||
- "node": "22.14.0"
|
||||
- },
|
||||
- "packageManager": "pnpm@10.3.0",
|
||||
"scripts": {
|
||||
"// --- lint ---": "",
|
||||
"lint": "eslint .",
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "kanalizer";
|
||||
version = "0.1.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VOICEVOX";
|
||||
repo = "kanalizer";
|
||||
tag = version;
|
||||
hash = "sha256-6GxTVlc0Ec80LYQoGgLVRVoi05u6vwt5WGkd4UYX2Lg=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/infer";
|
||||
|
||||
model =
|
||||
let
|
||||
modelTag = "v5";
|
||||
in
|
||||
fetchurl {
|
||||
url = "https://huggingface.co/VOICEVOX/kanalizer-model/resolve/${modelTag}/model/c2k.safetensors";
|
||||
hash = "sha256-sKhunAsN9Uwz2O1+eFQN8fh09eq67cFotTtLHsWJBRM=";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace Cargo.toml \
|
||||
--replace-fail 'version = "0.0.0"' 'version = "${version}"'
|
||||
|
||||
ln -s "$model" crates/kanalizer-rs/models/model-c2k.safetensors
|
||||
'';
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
src
|
||||
sourceRoot
|
||||
;
|
||||
hash = "sha256-2vnld5ReLsjm0kRoRAXhm+d0yj7AjfEr83xXhuyPbOU=";
|
||||
};
|
||||
|
||||
buildAndTestSubdir = "crates/kanalizer-py";
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.cargoSetupHook
|
||||
rustPlatform.maturinBuildHook
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "kanalizer" ];
|
||||
|
||||
meta = {
|
||||
description = "Library that guesses the Japanese pronounciation of English words";
|
||||
homepage = "https://github.com/VOICEVOX/kanalizer";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ tomasajt ];
|
||||
sourceProvenance = with lib.sourceTypes; [
|
||||
fromSource
|
||||
binaryNativeCode # the model file
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -7571,6 +7571,8 @@ self: super: with self; {
|
||||
|
||||
kalshi-python = callPackage ../development/python-modules/kalshi-python { };
|
||||
|
||||
kanalizer = callPackage ../development/python-modules/kanalizer { };
|
||||
|
||||
kanidm = callPackage ../development/python-modules/kanidm { };
|
||||
|
||||
kaptan = callPackage ../development/python-modules/kaptan { };
|
||||
|
||||
Reference in New Issue
Block a user