From ae1c624bac6380e2b2f6714e56849a40764ed152 Mon Sep 17 00:00:00 2001 From: tsukumi Date: Mon, 11 Mar 2024 22:45:04 +0900 Subject: [PATCH] =?UTF-8?q?Update:=20pyopenjtalk=20=E3=82=92=20pyopenjtalk?= =?UTF-8?q?-dict=20=E3=81=AB=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88=20?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E8=BF=BD=E5=8A=A0=E3=81=95=E3=82=8C=E3=81=9F?= =?UTF-8?q?=20r9y9/pyopenjtalk=20=E6=9C=AC=E5=AE=B6=E3=81=AE=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=83=BC=E8=BE=9E=E6=9B=B8=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=81=97=E3=81=9F=20=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E6=B8=88=E3=81=BF=20wheel=20=E3=81=8C=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=81=9F=E3=82=81=E3=80=81=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E7=92=B0=E5=A2=83=E3=81=8C=E4=B8=8D=E8=A6=81=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E3=83=A1=E3=83=AA=E3=83=83=E3=83=88=E3=82=82?= =?UTF-8?q?=E3=81=82=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 69 ++++++++++++++++++++------ pyproject.toml | 2 +- voicevox_engine/user_dict/user_dict.py | 4 +- 3 files changed, 56 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index c30a535f..49cc45b4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "altgraph" @@ -1636,13 +1636,56 @@ files = [ ] [[package]] -name = "pyopenjtalk" -version = "0.3.2+b35fc89" +name = "pyopenjtalk-dict" +version = "0.3.4.dev1" description = "A python wrapper for OpenJTalk" optional = false python-versions = "*" -files = [] -develop = false +files = [ + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f66bf0c0bb256073854844703ba8dcc1c72c91fcee200e415912426968f3817"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66c21f414c77c16dde56cec0d7c3e2c7ce4c2e6c4850c30a206d00dbdba1aeb9"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b68fe2b4bf5a2745cb0f397d2a7ca799273e8753d014556a4dcbb97378b94261"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:92546ab430d75f8067a5421cef140a7399472bb536e86bfb03b3c0b3082f651d"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:88d0fc88e48d3c38ee4572b38d4ce4076b2a393ae711187b3e5ec364e1638c08"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-win32.whl", hash = "sha256:bb265d0445bd5b79e9ffef5992796fecb663064f7fc1ad85cd6854381a1d1048"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp310-cp310-win_amd64.whl", hash = "sha256:0d4e9de66fc39efa7f7f533a5dc22c016f882e255f9277d1742f1d5bff3a6fe3"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:830c48e08d85de1b04fdce40bf0904e51096652826aa14a57338c38feba86df3"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b1f2100f0c86e34bfb808ba3d5c80e2449d98c6ce3f7419d61add27268a5fab8"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a48ac9a90986bd1e9d86ef10fb1e49db70e7271cb53b1c6224540c61aa1c08da"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:612e7d9e48f77560086e2443e0503da17e99ccf3805c473db5d1c5356e15a640"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6ab070d6aa7a4af032922b97d31cf43806105186613f12a38a8448f94ef2549a"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-win32.whl", hash = "sha256:d3be2b2064350a6cc07c28e7ee32c33a32404cbd34ab8effb270f42decb89a3f"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp311-cp311-win_amd64.whl", hash = "sha256:ecbc355d154624d7c09622b7b863684e686bb99b493a3b3ba8bde9cc6a96433f"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6ddfac62622526fd7a825a6f0ead8e5a20045dc7096d9c4ea139dcff760f07d9"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4d245aa54035ce2c450d51156efa60d6acd607f0e63736829aca50f018d66ebe"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4ffd7f73981c554677707c4c5a4c2020dc4bb66e0d3230468968915ed426d4a"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:e10e03e812f469bc38ddec6f7d13a5ec7feeb30af71f57f73f4c718364a42f38"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bee4a82e47eb77345d1dcaedfc5d78ebbf6168237e61ceb9d0eb75c137fa6bcc"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-win32.whl", hash = "sha256:0f67f4a1b935af380311cd63cfe6cea1e3de45b6ef69de88b17604aba2e65999"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp312-cp312-win_amd64.whl", hash = "sha256:a50f74e30f8f1c7617ea4229ac284bbb21a20705e8baca0d825a7b5dbc9174e7"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:9e65ba5b56c3da0af3bce9be9ecc02cc5d360a0cc315b497116fb3b0ff21b784"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84f16e868468412a084bed8ff34831b2155d9896431bb61c0c81beca97518364"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9eec7e5519fb88250a5a058c8a212851353dfd64a8768ec896ab668aa31b94f"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:0c9663d826e42b92850b2bd2e592902bf8e7ad7789a11ffbc676cae48b1ea1f4"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2adbd0aa03e49573f8d7a36475bcfb1a3bc62cf9b2bb355832c94ff0de60b3b7"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-win32.whl", hash = "sha256:8499d8f23282b29f88fae5f734b483fe505ecbfad83539bb27c9cf44239aa663"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp37-cp37m-win_amd64.whl", hash = "sha256:17207511b84be410188a71b2a8eb9e25a6167176b85b813a3f9b877f70c27149"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9853e7d28354aa4995cc8071255efd8662526593fbb6e9e354c500f95deb22c4"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0920ca35b384cdac6ddc10cabd50e8414f419c1fa81c7a8dac45666fc3ced7a"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fde6653060bbd50dff2e75e6cfc9838370b320ffdffa80f5347f7dbc1e716011"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:59f9f303e0abbeba40262d542a4ead9a714e61ddd524a761ecf75f4334740ee2"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6171871b1c0399535c2d33e7502cdcfb8bea81d47cbe06d3f377fc2b3c5b5b71"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-win32.whl", hash = "sha256:689403c9bab6796c659b368c3f012e220b32db2ed57456f45b0563314927b29e"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp38-cp38-win_amd64.whl", hash = "sha256:bad1a397c635f34813703a67bdda73702f00797df40a091d64d8fbfaa2f44f0b"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:da22ca7a901a2672ccc29b4f92c80a329b069231177a164e28ab87836eba1c9b"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6cf023aa166f075e26c0fc69b3160b8208f14c79b0f5687ec177ac718a260c0"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f14d4086316614349b3b724c8512d785c605098630bba9d84b6d81176d8b32f"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:45e96e7a4026fc8ea027a1e4360bc515989a38db54e10878985549c8c254b2bd"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0772a2f40507186b8c41c368912f4c869e3cfbdd35267751fdcb1bfe18ff1e8c"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-win32.whl", hash = "sha256:84dd8e11aff9b6cbb77c913ee1de378b3ba1df435e8ef74fa2dd0b92ad36a597"}, + {file = "pyopenjtalk_dict-0.3.4.dev1-cp39-cp39-win_amd64.whl", hash = "sha256:0c3299de33374c3483d439c99b4e8fba1db53c50d00b1e298ee132fbe95235fb"}, + {file = "pyopenjtalk_dict-0.3.4.dev1.tar.gz", hash = "sha256:4306ba918414ae799d7f9a99fa87c461835d0e046fe22460bd6cd7536e6e1a3f"}, +] [package.dependencies] numpy = ">=1.20.0" @@ -1651,16 +1694,10 @@ tqdm = "*" [package.extras] dev = ["black (>=19.19b0,<=20.8)", "click (<8.1.0)", "cython (>=0.21.0,<3.0.0)", "flake8 (>=3.7,<4)", "flake8-bugbear", "importlib-metadata (<5.0)", "isort (>=4.3,<5.2.0)", "mypy (<=0.910)", "pysen", "types-decorator", "types-setuptools"] -docs = ["Jinja2 (>=3.0.1)", "ipython", "jupyter", "nbsphinx (>=0.8.6)", "pandoc", "sphinx_rtd_theme"] +docs = ["Jinja2 (>=3.0.1)", "ipython", "jupyter", "nbsphinx (>=0.8.6)", "pandoc", "sphinx-rtd-theme"] marine = ["marine (>=0.0.5)"] test = ["pytest", "scipy"] -[package.source] -type = "git" -url = "https://github.com/VOICEVOX/pyopenjtalk" -reference = "b35fc89fe42948a28e33aed886ea145a51113f88" -resolved_reference = "b35fc89fe42948a28e33aed886ea145a51113f88" - [[package]] name = "pyproject-hooks" version = "1.0.0" @@ -2154,13 +2191,13 @@ files = [ [[package]] name = "tqdm" -version = "4.66.1" +version = "4.66.2" description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" files = [ - {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"}, - {file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"}, + {file = "tqdm-4.66.2-py3-none-any.whl", hash = "sha256:1ee4f8a893eb9bef51c6e35730cebf234d5d0b6bd112b0271e10ed7c24a02bd9"}, + {file = "tqdm-4.66.2.tar.gz", hash = "sha256:6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531"}, ] [package.dependencies] @@ -2374,4 +2411,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "dd531f8d707d026b99b62be8b8eb5e8bae09a971b0df699aa9f5fe30f0bcdb6e" +content-hash = "c240bd879150de088ff6726ec2324ed07ba297e7fbb624ffa8ea4dbad625753a" diff --git a/pyproject.toml b/pyproject.toml index 6a1a6100..a95b24fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ soundfile = "^0.12.1" pyyaml = "^6.0" pyworld = "^0.3.0" jinja2 = "^3.1.2" # NOTE: required by fastapi -pyopenjtalk = { git = "https://github.com/VOICEVOX/pyopenjtalk", rev = "b35fc89fe42948a28e33aed886ea145a51113f88" } +pyopenjtalk-dict = "^0.3.4.dev1" semver = "^3.0.0" platformdirs = "^3.10.0" soxr = "^0.3.6" diff --git a/voicevox_engine/user_dict/user_dict.py b/voicevox_engine/user_dict/user_dict.py index cf31de6e..1803e74f 100644 --- a/voicevox_engine/user_dict/user_dict.py +++ b/voicevox_engine/user_dict/user_dict.py @@ -126,7 +126,7 @@ def update_dict( tmp_csv_path.write_text(csv_text, encoding="utf-8") # 辞書.csvをOpenJTalk用にコンパイル - pyopenjtalk.create_user_dict(str(tmp_csv_path), str(tmp_compiled_path)) + pyopenjtalk.mecab_dict_index(str(tmp_csv_path), str(tmp_compiled_path)) if not tmp_compiled_path.is_file(): raise RuntimeError("辞書のコンパイル時にエラーが発生しました。") @@ -134,7 +134,7 @@ def update_dict( pyopenjtalk.unset_user_dict() tmp_compiled_path.replace(compiled_dict_path) if compiled_dict_path.is_file(): - pyopenjtalk.set_user_dict(str(compiled_dict_path.resolve(strict=True))) + pyopenjtalk.update_global_jtalk_with_user_dict(str(compiled_dict_path.resolve(strict=True))) except Exception as e: print("Error: Failed to update dictionary.", file=sys.stderr)