Skip to content

Commit

Permalink
wheelを利用したexampleをわかりやすく (#421)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README.md

* update 0.14.3

* Update README.md

* ディレクトリ名を訂正

* `## 準備`に移動

* "tag/{version}" → "latest"

Co-authored-by: Hiroshiba <[email protected]>

* バージョンを載せない

Co-authored-by: Hiroshiba <[email protected]>

* "tag/{version}" → "latest"

Co-authored-by: Hiroshiba <[email protected]>

* `git clone`を省く

Co-authored-by: Hiroshiba <[email protected]>

* example/pythonに直接ダウンロード

* `--dict-dir`のデフォルト値を変更

* Apply suggestions from code review

Co-authored-by: Ryo Yamashita <[email protected]>

* code blockを閉じる

Co-authored-by: Hiroshiba <[email protected]>

* Update example/python/README.md

Co-authored-by: Ryo Yamashita <[email protected]>

---------

Co-authored-by: Ryo Yamashita <[email protected]>
Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
3 people authored May 18, 2023
1 parent da84ce3 commit 67b3938
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
44 changes: 40 additions & 4 deletions example/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,45 @@ voicevox_core ライブラリ の Python バインディングを使った音声

## 準備

TODO
1. wheelパッケージのインストールをします。

`[バージョン]`の部分は適宜書き換えてください。

```console
pip install https://github.com/VOICEVOX/voicevox_core/releases/download/[バージョン]/voicevox_core-[バージョン]+cpu-cp38-abi3-linux_x86_64.whl
```

cpu-cp38-abi3-linux_x86_64のところはアーキテクチャやOSによって適宜読み替えてください。
https://github.com/VOICEVOX/voicevox_core/releases/latest


2. ダウンローダーを使って環境構築します。

linux/macの場合

download-linux-x64のところはアーキテクチャやOSによって適宜読み替えてください。
https://github.com/VOICEVOX/voicevox_core/releases/latest#%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%80

```console
binary=download-linux-x64
curl -sSfL https://github.com/VOICEVOX/voicevox_core/releases/latest/download/${binary} -o download
chmod +x download
./download -o ./example/python
# いくつかのファイルは不要なので消すことができます
#rm -r ./example/python/{model,VERSION,*voicevox_core*}
```

windowsの場合

```console
Invoke-WebRequest https://github.com/VOICEVOX/voicevox_core/releases/latest/download/download-windows-x64.exe -OutFile ./download.exe
./download -o ./example/python
Remove-Item -Recurse ./example/python/model,./example/python/VERSION,./example/python/*voicevox_core*
```

TODO:

- Python インタプリタ ≧3.8 + venv
- voicevox_core_python_api の whl (`pip install`)
- onnxruntime の DLL (/README.md と同様)
- open_jtalk_dic_utf_8-1.11 (/README.md と同様)

## 実行

Expand All @@ -30,7 +63,10 @@ optional arguments:
話者IDを指定
```

## 実行例

```console
cd voicevox_core/example/python
python ./run.py
[DEBUG] run.py: voicevox_core.METAS=[Meta(name='四国めたん', styles=[Style(name='ノーマル', id=2), Style(name='あまあま', id=0), Style(name='ツンツン', id=6), Style(name='セクシー', id=4), Style(name='ささやき', id=36), Style(name='ヒソヒソ', id=37)], speaker_uuid='7ffcb7ce-00ec-4bdc-82cd-45a8889e43ff', version='0.14.3'), Meta(name='ずんだもん', styles=[Style(name='ノーマル', id=3), Style(name='あまあま', id=1), Style(name='ツンツン', id=7), Style(name='セクシー', id=5), Style(name='ささやき', id=22), Style(name='ヒソヒソ', id=38)], speaker_uuid='388f246b-8c41-4ac1-8e2d-5d79f3ff56d9', version='0.14.3'), Meta(name='春日部つむぎ', styles=[Style(name='ノーマル', id=8)], speaker_uuid='35b2c544-660e-401e-b503-0e14c635303a', version='0.14.3'), Meta(name='雨晴はう', styles=[Style(name='ノーマル', id=10)], speaker_uuid='3474ee95-c274-47f9-aa1a-8322163d96f1', version='0.14.3'), Meta(name='波音リツ', styles=[Style(name='ノーマル', id=9)], speaker_uuid='b1a81618-b27b-40d2-b0ea-27a9ad408c4b', version='0.14.3'), Meta(name='玄野武宏', styles=[Style(name='ノーマル', id=11), Style(name='喜び', id=39), Style(name='ツンギレ', id=40), Style(name='悲しみ', id=41)], speaker_uuid='c30dc15a-0992-4f8d-8bb8-ad3b314e6a6f', version='0.14.3'), Meta(name=' 白上虎太郎', styles=[Style(name='ふつう', id=12), Style(name='わーい', id=32), Style(name='びくびく', id=33), Style(name='おこ', id=34), Style(name='びえー ん', id=35)], speaker_uuid='e5020595-5c5d-4e87-b849-270a518d0dcf', version='0.14.3'), Meta(name='青山龍星', styles=[Style(name='ノーマル', id=13)], speaker_uuid='4f51116a-d9ee-4516-925d-21f183e2afad', version='0.14.3'), Meta(name='冥鳴ひまり', styles=[Style(name='ノーマル', id=14)], speaker_uuid='8eaad775-3119-417e-8cf4-2a10bfd592c8', version='0.14.3'), Meta(name='九州そら', styles=[Style(name='ノーマル', id=16), Style(name='あまあま', id=15), Style(name='ツンツン', id=18), Style(name='セクシー', id=17), Style(name='ささやき', id=19)], speaker_uuid='481fb609-6446-4870-9f46-90c4dd623403', version='0.14.3'), Meta(name='もち子さん', styles=[Style(name='ノーマル', id=20)], speaker_uuid='9f3ee141-26ad-437e-97bd-d22298d02ad2', version='0.14.3'), Meta(name='剣崎雌雄', styles=[Style(name='ノーマル', id=21)], speaker_uuid='1a17ca16-7ee5-4ea5-b191-2f02ace24d21', version='0.14.3'), Meta(name='WhiteCUL', styles=[Style(name='ノーマル', id=23), Style(name='たのしい', id=24), Style(name='かなしい', id=25), Style(name='びえーん', id=26)], speaker_uuid='67d5d8da-acd7-4207-bb10-b5542d3a663b', version='0.14.3'), Meta(name='後鬼', styles=[Style(name='人間ver.', id=27), Style(name='ぬいぐるみver.', id=28)], speaker_uuid='0f56c2f2-644c-49c9-8989-94e11f7129d0', version='0.14.3'), Meta(name='No.7', styles=[Style(name='ノーマル', id=29), Style(name='アナウンス', id=30), Style(name='読み聞かせ', id=31)], speaker_uuid='044830d2-f23b-44d6-ac0d-b5d733caa900', version='0.14.3'), Meta(name='ちび式じい', styles=[Style(name='ノーマル', id=42)], speaker_uuid='468b8e94-9da4-4f7a-8715-a22a48844f9e', version='0.14.3'), Meta(name='櫻歌ミコ', styles=[Style(name='ノーマル', id=43), Style(name='第二形態', id=44), Style(name='ロリ', id=45)], speaker_uuid='0693554c-338e-4790-8982-b9c6d476dc69', version='0.14.3'), Meta(name='小夜/SAYO', styles=[Style(name='ノーマル', id=46)], speaker_uuid='a8cc6d22-aad0-4ab8-bf1e-2f843924164a', version='0.14.3'), Meta(name='ナースロボ_タイプT', styles=[Style(name='ノーマル', id=47), Style(name='楽々', id=48), Style(name='恐怖', id=49), Style(name='内緒話', id=50)], speaker_uuid='882a636f-3bac-431a-966d-c5e6bba9f949', version='0.14.3'), Meta(name='†聖騎士 紅桜†', styles=[Style(name='ノーマル', id=51)], speaker_uuid='471e39d2-fb11-4c8c-8d89-4b322d2498e0', version='0.14.3'), Meta(name='雀松朱司', styles=[Style(name='ノーマル', id=52)], speaker_uuid='0acebdee-a4a5-4e12-a695-e19609728e30', version='0.14.3'), Meta(name='麒ヶ島宗麟', styles=[Style(name='ノーマル', id=53)], speaker_uuid='7d1e7ba7-f957-40e5-a3fc-da49f769ab65', version='0.14.3'), Meta(name='春歌ナナ', styles=[Style(name='ノーマル', id=54)], speaker_uuid='ba5d2428-f7e0-4c20-ac41-9dd56e9178b4', version='0.14.3'), Meta(name='猫使アル', styles=[Style(name='ノーマル', id=55), Style(name='おちつき', id=56), Style(name='うきうき', id=57)], speaker_uuid='00a5c10c-d3bd-459f-83fd-43180b521a44', version='0.14.3'), Meta(name='猫使ビィ', styles=[Style(name='ノーマル', id=58), Style(name='おちつき', id=59), Style(name='人見知り', id=60)], speaker_uuid='c20a2254-0349-4470-9fc8-e5c0f8cf3404', version='0.14.3')]
[DEBUG] run.py: voicevox_core.SUPPORTED_DEVICES=SupportedDevices(cpu=True, cuda=False, dml=False)
Expand Down
2 changes: 1 addition & 1 deletion example/python/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def parse_args() -> Tuple[AccelerationMode, Path, str, Path, int]:
)
argparser.add_argument(
"--dict-dir",
default="./voicevox_core/open_jtalk_dic_utf_8-1.11",
default="./open_jtalk_dic_utf_8-1.11",
type=Path,
help="Open JTalkの辞書ディレクトリ",
)
Expand Down

0 comments on commit 67b3938

Please sign in to comment.