Skip to content

Commit

Permalink
Merge branch 'master' into merge-upstream-0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Aug 7, 2024
2 parents d399635 + 0c3ce40 commit 3fe9d1c
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 217 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-engine-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:
required: true

env:
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_nemo_engine
VOICEVOX_RESOURCE_VERSION: "0.20.0"
VOICEVOX_CORE_VERSION: "0.15.4"
VOICEVOX_CORE_VERSION: "0.15.0"

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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-engine-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

env:
VOICEVOX_RESOURCE_VERSION: "0.20.0"
VOICEVOX_CORE_VERSION: "0.15.4"
VOICEVOX_CORE_VERSION: "0.15.0"

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

Expand All @@ -424,7 +424,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
# 一度代入して actionlint のエラー回避 (詳細: NOTE 1)
OS=${{ matrix.os }}
if [[ $OS == mac-* ]]; then
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EOF
# assert VOICEVOX_CORE_VERSION >= 0.11.0 (ONNX)
ARG TARGETPLATFORM
ARG USE_GPU=false
ARG VOICEVOX_CORE_VERSION=0.15.4
ARG VOICEVOX_CORE_VERSION=0.15.0

RUN <<EOF
set -eux
Expand All @@ -48,7 +48,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 @@ -288,7 +288,7 @@ 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-engine-package.yml/badge.svg)](https://github.com/VOICEVOX/voicevox_engine/actions/workflows/build-engine-package.yml)
Expand Down Expand Up @@ -645,6 +679,8 @@ VOICEVOX エディターにうまく読み込ませられないときは、エ

**[voicevox-client](https://github.com/voicevox-client) [@voicevox-client](https://github.com/voicevox-client)** ・・・ VOICEVOX ENGINE の各言語向け API ラッパー

</details> <!-- Fork元のVOICEVOX ENGINEのREADME -->

## ライセンス

LGPL v3 と、ソースコードの公開が不要な別ライセンスのデュアルライセンスです。
Expand Down
200 changes: 2 additions & 198 deletions resources/engine_manifest_assets/update_infos.json
Original file line number Diff line number Diff line change
@@ -1,203 +1,7 @@
[
{
"version": "0.20.0",
"descriptions": [
"句読点などの無音時間の調整パラメータを追加",
"キャラクター情報のリソースをURLで返す機能追加",
"開発環境の向上"
],
"contributors": [
"Hiroshiba",
"nix6839",
"sabonerune",
"tarepan",
"weweweok",
"X-20A"
]
},
{
"version": "0.19.1",
"descriptions": ["キャラクター「後鬼」のスタイルを追加"],
"contributors": []
},
{
"version": "0.19.0",
"descriptions": ["ソング:音量取得APIを追加", "開発環境の向上"],
"contributors": ["sabonerune", "tarepan", "y-chan"]
},
{
"version": "0.18.1",
"descriptions": [
"キャラクター「†聖騎士 紅桜†」「雀松朱司」「麒ヶ島宗麟」「春歌ナナ」「猫使アル」「猫使ビィ」「中国うさぎ」のハミングを追加",
"キャラクター「栗田まろん」「あいえるたん」「満別花丸」「琴詠ニア」のハミングを追加",
"起動に必要なメモリ量を大幅に削減"
],
"contributors": ["Hiroshiba", "qryxip"]
},
{
"version": "0.18.0",
"descriptions": [
"キャラクター「WhiteCUL」「後鬼」「No.7」のハミングを追加",
"キャラクター「ちび式じい」「櫻歌ミコ」「小夜/SAYO」「ナースロボ_タイプT」のハミングを追加",
"キャラクター「四国めたん」「ずんだもん」「波音リツ」のハミングスタイルを追加",
"デフォルトで全てのCPUを使うことがあるバグを修正",
"デフォルトで127.0.0.1と::1を待ち受けるように変更",
"開発環境の向上"
],
"contributors": [
"Hiroshiba",
"sabonerune",
"siketyan",
"tarepan",
"tomoish"
]
},
{
"version": "0.17.1",
"descriptions": [
"キャラクター「玄野武宏」「白上虎太郎」「青山龍星」「冥鳴ひまり」「九州そら」のハミングを追加",
"キャラクター「もち子さん」「剣崎雌雄」のハミングを追加",
"バグ修正"
],
"contributors": ["PickledChair"]
},
{
"version": "0.17.0",
"descriptions": ["開発環境の向上"],
"contributors": ["Hiroshiba", "misogihagi", "tarepan", "tuna2134"]
},
{
"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": [
"キャラクター「栗田まろん」「あいえるたん」「満別花丸」「琴詠ニア」を追加"
],
"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 @@ -171,7 +171,7 @@ def read_cli_arguments(envs: Envs) -> CLIArgs:
help="接続を受け付けるホストアドレスです。",
)
parser.add_argument(
"--port", type=int, default=50021, help="接続を受け付けるポート番号です。"
"--port", type=int, default=50121, help="接続を受け付けるポート番号です。"
)
parser.add_argument(
"--use_gpu", action="store_true", help="GPUを使って音声合成するようになります。"
Expand Down
6 changes: 3 additions & 3 deletions tools/check_release_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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 Down Expand Up @@ -44,14 +44,14 @@ def test_release_build(dist_dir: Path, skip_run_process: bool) -> None:
# テキスト -> クエリ
text = "こんにちは、音声合成の世界へようこそ"
req = Request(
base_url + "audio_query?" + urlencode({"speaker": "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?speaker=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 tools/process_voicevox_resource.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ fi

# ダミーのキャラクター情報を置き換える
rm -r resources/character_info
cp -r "${DOWNLOAD_RESOURCE_PATH}/character_info" resources/character_info
cp -r "${DOWNLOAD_RESOURCE_PATH}/voicevox_nemo/character_info" resources/character_info

# キャラクター情報を前処理する
python "${DOWNLOAD_RESOURCE_PATH}/scripts/clean_character_info.py" \
--character_info_dir resources/character_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 tools/merge_update_infos.py \
resources/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" \
resources/engine_manifest_assets/update_infos.json

# リソースのマニフェストアセットをエンジンのディレクトリへ複製する
for f in "${DOWNLOAD_RESOURCE_PATH}"/engine/engine_manifest_assets/*; do
for f in "${DOWNLOAD_RESOURCE_PATH}"/voicevox_nemo/engine/engine_manifest_assets/*; do
if [ "$(basename "${f}")" != "update_infos.json" ]; then
cp "${f}" ./resources/engine_manifest_assets/
fi
Expand Down
Loading

0 comments on commit 3fe9d1c

Please sign in to comment.