Skip to content

Commit

Permalink
Merge branch 'release-0.14' into buffer-0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Nov 18, 2023
2 parents 86123f2 + 304a425 commit ea0a25a
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 99 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ on:
required: true

env:
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/voicevox_nemo_engine
PYTHON_VERSION: "3.11.3"
VOICEVOX_RESOURCE_VERSION: "0.14.4"
VOICEVOX_CORE_VERSION: "0.14.5"
VOICEVOX_RESOURCE_VERSION: "0.14.0"
VOICEVOX_CORE_VERSION: "0.14.0"

defaults:
run:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: VOICEVOX/voicevox_resource
repository: VOICEVOX/voicevox_nemo_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:

env:
PYTHON_VERSION: "3.11.3"
VOICEVOX_RESOURCE_VERSION: "0.14.4"
VOICEVOX_CORE_VERSION: "0.14.5"
VOICEVOX_RESOURCE_VERSION: "0.14.0"
VOICEVOX_CORE_VERSION: "0.14.0"

defaults:
run:
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: VOICEVOX/voicevox_resource
repository: VOICEVOX/voicevox_nemo_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

Expand All @@ -418,7 +418,7 @@ jobs:
env:
VOICEVOX_CORE_ASSET_NAME: ${{ matrix.voicevox_core_asset_prefix }}-${{ env.VOICEVOX_CORE_VERSION }}
run: |
curl -L "https://github.com/VOICEVOX/voicevox_core/releases/download/${{ env.VOICEVOX_CORE_VERSION }}/${{ env.VOICEVOX_CORE_ASSET_NAME }}.zip" > download/${{ env.VOICEVOX_CORE_ASSET_NAME }}.zip
curl -L "https://github.com/VOICEVOX/voicevox_nemo_core/releases/download/${{ env.VOICEVOX_CORE_VERSION }}/${{ env.VOICEVOX_CORE_ASSET_NAME }}.zip" > download/${{ env.VOICEVOX_CORE_ASSET_NAME }}.zip
# NOTE: Windows 版コアのみ PowerShell の Compress-Archive コマンドレットを用いて zip を作成している(デフォルト状態では zip コマンドが存在していないため)。
# このコマンドはバージョンによっては作成した zip 内のパスの区切り文字がバックスラッシュになる。 (cf. https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/48)
# unzip コマンドはこのような zip ファイルを解凍できるものの、終了コード 1 を報告して CI が落ちてしまう。
Expand Down
8 changes: 4 additions & 4 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.14.0

RUN <<EOF
set -eux
Expand All @@ -46,7 +46,7 @@ RUN <<EOF

# Download Core
VOICEVOX_CORE_ASSET_NAME=${VOICEVOX_CORE_ASSET_PREFIX}-${VOICEVOX_CORE_VERSION}
wget -nv --show-progress -c -O "./${VOICEVOX_CORE_ASSET_NAME}.zip" "https://github.com/VOICEVOX/voicevox_core/releases/download/${VOICEVOX_CORE_VERSION}/${VOICEVOX_CORE_ASSET_NAME}.zip"
wget -nv --show-progress -c -O "./${VOICEVOX_CORE_ASSET_NAME}.zip" "https://github.com/VOICEVOX/voicevox_nemo_core/releases/download/${VOICEVOX_CORE_VERSION}/${VOICEVOX_CORE_ASSET_NAME}.zip"
unzip "./${VOICEVOX_CORE_ASSET_NAME}.zip"
mkdir -p core
mv "${VOICEVOX_CORE_ASSET_NAME}"/* core
Expand Down Expand Up @@ -271,12 +271,12 @@ RUN <<EOF
EOF

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

# README
wget -nv --show-progress -c -O "/opt/voicevox_engine/README.md" "https://raw.githubusercontent.com/VOICEVOX/voicevox_resource/${VOICEVOX_RESOURCE_VERSION}/engine/README.md"
wget -nv --show-progress -c -O "/opt/voicevox_engine/README.md" "https://raw.githubusercontent.com/VOICEVOX/voicevox_nemo_resource/${VOICEVOX_RESOURCE_VERSION}/voicevox_nemo/engine/README.md"
EOF

# Create container start shell
Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# VOICEVOX NEMO ENGINE

[VOICEVOX Nemo](https://voicevox.hiroshiba.jp/nemo/) のエンジンです。
実態は HTTP サーバーなので、リクエストを送信すればテキスト音声合成できます。

(エディターは [VOICEVOX](https://github.com/VOICEVOX/voicevox/) のマルチエンジン機能を利用、
コアは [VOICEVOX NEMO CORE](https://github.com/VOICEVOX/voicevox_nemo_core/) に詳細があります。)

## ダウンロード

[こちら](https://github.com/VOICEVOX/voicevox_nemo_engine/releases/latest)から対応するエンジンをダウンロードしてください。

## API ドキュメント・サンプル

サーバーのデフォルトのポート番号は `50121` です。それ以外は [VOICEVOX ENGINE](https://github.com/VOICEVOX/voicevox_engine/) と同じです。

## Docker イメージ

### CPU

```bash
docker pull voicevox/voicevox_nemo_engine:cpu-ubuntu20.04-latest
docker run --rm -it -p '127.0.0.1:50021:50021' voicevox/voicevox_nemo_engine:cpu-ubuntu20.04-latest
```

### GPU

```bash
docker pull voicevox/voicevox_nemo_engine:nvidia-ubuntu20.04-latest
docker run --rm --gpus all -p '127.0.0.1:50021:50021' voicevox/voicevox_nemo_engine:nvidia-ubuntu20.04-latest
```

<details><summary>Fork元のVOICEVOX ENGINEのREADME</summary>

# VOICEVOX ENGINE

[![build](https://github.com/VOICEVOX/voicevox_engine/actions/workflows/build.yml/badge.svg)](https://github.com/VOICEVOX/voicevox_engine/actions/workflows/build.yml)
Expand Down Expand Up @@ -629,6 +663,8 @@ VOICEVOX エディターにうまく読み込ませられないときは、エ
**[voicevox-client](https://github.com/tuna2134/voicevox-client) [@tuna2134](https://github.com/tuna2134)** ・・・ VOICEVOX ENGINE のための Python ラッパー
</details> <!-- Fork元のVOICEVOX ENGINEのREADME -->
## ライセンス
LGPL v3 と、ソースコードの公開が不要な別ライセンスのデュアルライセンスです。
Expand Down
6 changes: 3 additions & 3 deletions build_util/check_release_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import soundfile

base_url = "http://127.0.0.1:50021/"
base_url = "http://localhost:50121/"


def test_release_build(dist_dir: Path, skip_run_process: bool) -> None:
Expand All @@ -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": "10001", "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=10001", 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/process_voicevox_resource.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ if [ ! -v DOWNLOAD_RESOURCE_PATH ]; then
fi

rm -r speaker_info
cp -r $DOWNLOAD_RESOURCE_PATH/character_info speaker_info
cp -r $DOWNLOAD_RESOURCE_PATH/voicevox_nemo/character_info speaker_info

# キャラクター情報の前処理をする
python $DOWNLOAD_RESOURCE_PATH/scripts/clean_character_info.py \
--character_info_dir speaker_info/

# マニフェスト
jq -s '.[0] * .[1]' engine_manifest.json $DOWNLOAD_RESOURCE_PATH/engine/engine_manifest.json \
jq -s '.[0] * .[1]' engine_manifest.json $DOWNLOAD_RESOURCE_PATH/voicevox_nemo/engine/engine_manifest.json \
> engine_manifest.json.tmp
mv engine_manifest.json.tmp engine_manifest.json

python build_util/merge_update_infos.py \
engine_manifest_assets/update_infos.json \
$DOWNLOAD_RESOURCE_PATH/engine/engine_manifest_assets/update_infos.json \
$DOWNLOAD_RESOURCE_PATH/voicevox_nemo/engine/engine_manifest_assets/update_infos.json \
engine_manifest_assets/update_infos.json

for f in $(ls $DOWNLOAD_RESOURCE_PATH/engine/engine_manifest_assets/* | grep -v update_infos.json); do
for f in $(ls $DOWNLOAD_RESOURCE_PATH/voicevox_nemo/engine/engine_manifest_assets/* | grep -v update_infos.json); do
cp $f ./engine_manifest_assets/
done
2 changes: 2 additions & 0 deletions default.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
coeiroink,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,コエイロインク,コエイロインク,5/7,C1
CoeFont,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,コエフォント,コエフォント,3/5,C1
coefont,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,コエフォント,コエフォント,3/5,C1
Nemo,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,ネモ,ネモ,1/2,C1
nemo,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,ネモ,ネモ,1/2,C1
TALQu,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,トーク,トーク,0/3,C1
talqu,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,トーク,トーク,0/3,C1
VOICEVOX,1348,1348,0,名詞,固有名詞,一般,*,*,*,*,ボイスボックス,ボイスボックス,4/7,C1
Expand Down
79 changes: 2 additions & 77 deletions engine_manifest_assets/update_infos.json
Original file line number Diff line number Diff line change
@@ -1,82 +1,7 @@
[
{
"version": "0.14.6",
"descriptions": [
"キャラクター「栗田まろん」「あいえるたん」「満別花丸」「琴詠ニア」を追加"
],
"contributors": []
},
{
"version": "0.14.5",
"descriptions": [
"キャラクター「中国うさぎ」を追加",
"キャラクター「波音リツ」「もち子さん」のスタイルを追加"
],
"contributors": []
},
{
"version": "0.14.4",
"descriptions": [
"キャラクター「春歌ナナ」「猫使アル」「猫使ビィ」を追加",
"バグ修正"
],
"contributors": ["Hiroshiba"]
},
{
"version": "0.14.3",
"descriptions": [
"キャラクター「†聖騎士 紅桜†」「雀松朱司」「麒ヶ島宗麟」を追加",
"同時書き込みで辞書が破損する問題を修正"
],
"contributors": ["Hiroshiba"]
},
{
"version": "0.14.2",
"descriptions": ["DirectML版の生成が遅い問題を修正"],
"contributors": []
},
{
"version": "0.14.1",
"descriptions": ["AquesTalkライクな記法で生成した音声のバグを修正"],
"contributors": []
},
{
"version": "0.14.0",
"descriptions": [
"コアをRust言語に移行",
"セキュリティアップデート",
"スタイルごとに異なる立ち絵の提供を可能に",
"VVPPファイルの提供",
"設定GUIの提供",
"プリセットの保存",
"モーフィングAPIの仕様変更",
"DirectML利用時に適したGPUを自動選択",
"開発環境の向上",
"バグ修正"
],
"contributors": [
"aoirint",
"Appletigerv",
"haru3me",
"Hiroshiba",
"ksk001100",
"masinc",
"misogihagi",
"My-MC",
"nebocco",
"PickledChair",
"qryxip",
"qwerty2501",
"sabonerune",
"sarisia",
"Segu-g",
"sevenc-nanashi",
"shigobu",
"smly",
"takana-v",
"ts-klassen",
"whiteball",
"y-chan"
]
"descriptions": ["VOICEVOX Nemoを追加"],
"contributors": []
}
]
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ def main() -> None:
parser.add_argument(
"--host", type=str, default="127.0.0.1", help="接続を受け付けるホストアドレスです。"
)
parser.add_argument("--port", type=int, default=50021, help="接続を受け付けるポート番号です。")
parser.add_argument("--port", type=int, default=50121, help="接続を受け付けるポート番号です。")
parser.add_argument(
"--use_gpu", action="store_true", help="指定するとGPUを使って音声合成するようになります。"
)
Expand Down
4 changes: 2 additions & 2 deletions voicevox_engine/utility/path_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def get_save_dir():
# FIXME: Windowsは`voicevox-engine/voicevox-engine`ディレクトリに保存されているので
# `VOICEVOX/voicevox-engine`に変更する
if is_development():
app_name = "voicevox-engine-dev"
app_name = "voicevox-nemo-engine-dev"
else:
app_name = "voicevox-engine"
app_name = "voicevox-nemo-engine"
return Path(user_data_dir(app_name))


Expand Down

0 comments on commit ea0a25a

Please sign in to comment.