Skip to content

Commit

Permalink
Merge branch 'master' into add/xx_label_val
Browse files Browse the repository at this point in the history
  • Loading branch information
tarepan committed Feb 4, 2024
2 parents 9a137a2 + 843bd76 commit fc8ea3f
Show file tree
Hide file tree
Showing 72 changed files with 11,903 additions and 557 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:
env:
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine
PYTHON_VERSION: "3.11.3"
VOICEVOX_RESOURCE_VERSION: "0.14.4"
VOICEVOX_CORE_VERSION: "0.14.5"
VOICEVOX_RESOURCE_VERSION: "0.16.0"
VOICEVOX_CORE_VERSION: "0.15.0"

defaults:
run:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ on:

env:
PYTHON_VERSION: "3.11.3"
VOICEVOX_RESOURCE_VERSION: "0.14.4"
VOICEVOX_CORE_VERSION: "0.14.5"
VOICEVOX_RESOURCE_VERSION: "0.16.0"
VOICEVOX_CORE_VERSION: "0.15.0"

defaults:
run:
Expand Down Expand Up @@ -464,10 +464,10 @@ jobs:
LIBONNXRUNTIME_PATH=download/onnxruntime/lib/libonnxruntime.so
fi
pyinstaller --noconfirm run.spec -- \
--libcore_path="$LIBCORE_PATH" \
--libonnxruntime_path="$LIBONNXRUNTIME_PATH" \
--core_model_dir_path="download/core/model"
CORE_MODEL_DIR_PATH="download/core/model" \
LIBCORE_PATH="$LIBCORE_PATH" \
LIBONNXRUNTIME_PATH="$LIBONNXRUNTIME_PATH" \
pyinstaller --noconfirm run.spec
- name: Gather DLL dependencies to dist/run/ (Windows)
if: startsWith(matrix.os, 'windows-')
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ EOF
# assert VOICEVOX_CORE_VERSION >= 0.11.0 (ONNX)
ARG TARGETPLATFORM
ARG USE_GPU=false
ARG VOICEVOX_CORE_VERSION=0.14.5
ARG VOICEVOX_CORE_VERSION=0.15.0

RUN <<EOF
set -eux
Expand Down Expand Up @@ -275,7 +275,7 @@ RUN <<EOF
EOF

# Download Resource
ARG VOICEVOX_RESOURCE_VERSION=0.14.4
ARG VOICEVOX_RESOURCE_VERSION=0.16.0
RUN <<EOF
set -eux

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ echo -n "こんにちは、音声合成の世界へようこそ" >text.txt

curl -s \
-X POST \
"127.0.0.1:50021/audio_query?style_id=1"\
"127.0.0.1:50021/audio_query?speaker=1"\
--get --data-urlencode [email protected] \
> query.json

curl -s \
-H "Content-Type: application/json" \
-X POST \
-d @query.json \
"127.0.0.1:50021/synthesis?style_id=1" \
"127.0.0.1:50021/synthesis?speaker=1" \
> audio.wav
```

生成される音声はサンプリングレートが 24000Hz と少し特殊なため、音声プレーヤーによっては再生できない場合があります。

`style_id` に指定する値は `/speakers` エンドポイントで得られます
`speaker` に指定する値は `/speakers` エンドポイントで得られる `style_id` です。互換性のために `speaker` という名前になっています

### 読み方を AquesTalk 風記法で取得・修正

Expand Down Expand Up @@ -99,7 +99,7 @@ echo -n "ディープラーニングは万能薬ではありません" >text.txt

curl -s \
-X POST \
"127.0.0.1:50021/audio_query?style_id=1" \
"127.0.0.1:50021/audio_query?speaker=1" \
--get --data-urlencode [email protected] \
> query.json

Expand All @@ -111,7 +111,7 @@ cat query.json | grep -o -E "\"kana\":\".*\""
echo -n "ディイプラ'アニングワ/バンノ'オヤクデワ/アリマセ'ン" > kana.txt
curl -s \
-X POST \
"127.0.0.1:50021/accent_phrases?style_id=1&is_kana=true" \
"127.0.0.1:50021/accent_phrases?speaker=1&is_kana=true" \
--get --data-urlencode [email protected] \
> newphrases.json

Expand All @@ -122,7 +122,7 @@ curl -s \
-H "Content-Type: application/json" \
-X POST \
-d @newquery.json \
"127.0.0.1:50021/synthesis?style_id=1" \
"127.0.0.1:50021/synthesis?speaker=1" \
> audio.wav
```

Expand Down Expand Up @@ -238,7 +238,7 @@ curl -s \
-H "Content-Type: application/json" \
-X POST \
-d @query.json \
"127.0.0.1:50021/synthesis?style_id=$style_id" \
"127.0.0.1:50021/synthesis?speaker=$style_id" \
> audio.wav
```

Expand All @@ -255,7 +255,7 @@ echo -n "モーフィングを利用することで、2種類の声を混ぜ

curl -s \
-X POST \
"127.0.0.1:50021/audio_query?style_id=0"\
"127.0.0.1:50021/audio_query?speaker=8"\
--get --data-urlencode [email protected] \
> query.json

Expand All @@ -264,7 +264,7 @@ curl -s \
-H "Content-Type: application/json" \
-X POST \
-d @query.json \
"127.0.0.1:50021/synthesis?style_id=0" \
"127.0.0.1:50021/synthesis?speaker=8" \
> audio.wav

export MORPH_RATE=0.5
Expand All @@ -274,17 +274,17 @@ curl -s \
-H "Content-Type: application/json" \
-X POST \
-d @query.json \
"127.0.0.1:50021/synthesis_morphing?base_style_id=0&target_style_id=1&morph_rate=$MORPH_RATE" \
"127.0.0.1:50021/synthesis_morphing?base_speaker=8&target_speaker=10&morph_rate=$MORPH_RATE" \
> audio.wav

export MORPH_RATE=0.9

# query、base_style_id、target_style_idが同じ場合はキャッシュが使用されるため比較的高速に生成される
# query、base_speaker、target_speakerが同じ場合はキャッシュが使用されるため比較的高速に生成される
curl -s \
-H "Content-Type: application/json" \
-X POST \
-d @query.json \
"127.0.0.1:50021/synthesis_morphing?base_style_id=0&target_style_id=1&morph_rate=$MORPH_RATE" \
"127.0.0.1:50021/synthesis_morphing?base_speaker=8&target_speaker=10&morph_rate=$MORPH_RATE" \
> audio.wav
```

Expand Down
4 changes: 2 additions & 2 deletions build_util/check_release_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def test_release_build(dist_dir: Path, skip_run_process: bool) -> None:
# テキスト -> クエリ
text = "こんにちは、音声合成の世界へようこそ"
req = Request(
base_url + "audio_query?" + urlencode({"style_id": "1", "text": text}),
base_url + "audio_query?" + urlencode({"speaker": "1", "text": text}),
method="POST",
)
with urlopen(req) as res:
query = json.loads(res.read().decode("utf-8"))

# クエリ -> 音声
req = Request(base_url + "synthesis?style_id=1", method="POST")
req = Request(base_url + "synthesis?speaker=1", method="POST")
req.add_header("Content-Type", "application/json")
req.data = json.dumps(query).encode("utf-8")
with urlopen(req) as res:
Expand Down
8 changes: 4 additions & 4 deletions build_util/make_docs.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import json
from pathlib import Path

from voicevox_engine.dev.core import MockCoreWrapper
from voicevox_engine.dev.core.mock import MockCoreWrapper
from voicevox_engine.dev.tts_engine.mock import MockTTSEngine
from voicevox_engine.preset import PresetManager
from voicevox_engine.setting import USER_SETTING_PATH, SettingLoader
from voicevox_engine.preset.PresetManager import PresetManager
from voicevox_engine.setting.SettingLoader import USER_SETTING_PATH, SettingLoader
from voicevox_engine.tts_pipeline.tts_engine import CoreAdapter
from voicevox_engine.utility import engine_root
from voicevox_engine.utility.path_utility import engine_root


def generate_api_docs_html(schema: str) -> str:
Expand Down
2 changes: 2 additions & 0 deletions docs/VOICEVOX音声合成エンジンとの連携.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
- バージョンが上がっても、`/audio_query`で返ってくる値をそのまま`/synthesis`に POST すれば音声合成できるようにする予定です
- `AudioQuery`のパラメータは増えますが、なるべくデフォルト値で以前と変わらない音声が生成されるようにします
- バージョン 0.7 から音声スタイルが実装されました。スタイルの情報は`/speakers`から取得できます
- スタイルの情報にある`style_id``speaker`に指定することで、今まで通り音声合成ができます
- style_id の指定先が speaker なのは互換性のためです
7 changes: 6 additions & 1 deletion engine_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"port": 50021,
"icon": "engine_manifest_assets/icon.png",
"default_sampling_rate": 24000,
"frame_rate": 93.75,
"terms_of_service": "engine_manifest_assets/terms_of_service.md",
"update_infos": "engine_manifest_assets/update_infos.json",
"dependency_licenses": "engine_manifest_assets/dependency_licenses.json",
"supported_vvlib_manifest_version": "0.15.0",
"supported_features": {
"adjust_mora_pitch": {
"type": "bool",
Expand Down Expand Up @@ -54,6 +54,11 @@
"value": true,
"name": "2種類のスタイルでモーフィングした音声を合成"
},
"sing" : {
"type": "bool",
"value": true,
"name": "歌唱音声合成"
},
"manage_library": {
"type": "bool",
"value": true,
Expand Down
54 changes: 54 additions & 0 deletions engine_manifest_assets/update_infos.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
[
{
"version": "0.16.0",
"descriptions": [
"ソングAPIを追加",
"キャラクター「四国めたん」「ずんだもん」「春日部つむぎ」「雨晴はう」「波音リツ」のハミングを追加",
"キャラクター「波音リツ」のソングを追加"
],
"contributors": ["Hiroshiba", "y-chan"]
},
{
"version": "0.15.1",
"descriptions": ["ビルド成果物のディレクトリ構造を元に戻した"],
"contributors": []
},
{
"version": "0.15.0",
"descriptions": [
"/validate_kana APIを追加",
"起動時のエンジン設定項目追加",
"ユーザー辞書のインポート・エクスポート機能追加",
"ビルド成果物のディレクトリ構造を変更",
"書き込み系APIを一括で無効化可能に",
"開発環境の向上",
"バグ修正"
],
"contributors": [
"aoirint",
"FujisakiEx",
"Hiroshiba",
"K-shir0",
"My-MC",
"nagi-miaow",
"okaits",
"raa0121",
"sabonerune",
"sevenc-nanashi",
"siketyan",
"stmtk1",
"takana-v",
"tarepan",
"tomoish",
"tuna2134",
"weweweok",
"whiteball",
"y-chan"
]
},
{
"version": "0.14.7",
"descriptions": [
"キャラクター「小夜」「ずんだもん」「もち子さん」「青山龍星」のスタイルを追加・更新"
],
"contributors": []
},
{
"version": "0.14.6",
"descriptions": [
Expand Down
Loading

0 comments on commit fc8ea3f

Please sign in to comment.