Skip to content

Commit

Permalink
Merge branch 'master' into pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
y-chan authored Nov 6, 2022
2 parents 49a6f6f + 0dec9dc commit 6061409
Show file tree
Hide file tree
Showing 27 changed files with 518 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bugreport.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug Report
about: 不具合の報告
labels: bug
labels: バグ
---

## 不具合の内容
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/featurerequest.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature Request
about: 機能要望・改善提案
labels: enhancement
labels: 機能向上
---

## 内容
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Question
about: 質問 (既存のIssueや一般事例を良く調べてからしてください)
labels: question
labels: 要議論
---

## 質問の内容
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ on:
types:
- created
workflow_dispatch:
inputs:
version:
description: "バージョン情報(A.BB.C / A.BB.C-preview.D)"
required: true

env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/voicevox_engine
PYTHON_VERSION: "3.8.10"
VOICEVOX_RESOURCE_VERSION: "0.13.0-preview.3"
VOICEVOX_CORE_VERSION: "0.12.5"
VOICEVOX_RESOURCE_VERSION: "0.13.2"
VOICEVOX_CORE_VERSION: "0.13.2"
VOICEVOX_ENGINE_VERSION:
|- # releaseのときはタグが、それ以外はlatestがバージョン名に
${{ github.event.release.tag_name != '' && github.event.release.tag_name || 'latest' }}
|- # releaseタグ名か、workflow_dispatchでのバージョン名か、latestが入る
${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}

jobs:
build-docker:
Expand Down Expand Up @@ -79,29 +83,29 @@ jobs:
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-linux-x64-gpu-1.10.0.tgz

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Download VOICEVOX RESOURCE
- name: Prepare VOICEVOX RESOURCE cache
uses: actions/cache@v2
uses: actions/cache@v3
id: voicevox-resource-cache
with:
key: voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

- name: Checkout VOICEVOX RESOURCE
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
Expand All @@ -115,7 +119,7 @@ jobs:
run: bash build_util/merge_voicevox_resource.bash

- name: Build and Deploy Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
env:
IMAGE_TAG:
|- # If it's a release, add the version, otherwise add the `latest`
Expand Down
39 changes: 19 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ on:
env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/voicevox_engine
PYTHON_VERSION: "3.8.10"
VOICEVOX_RESOURCE_VERSION: "0.13.0-preview.3"
VOICEVOX_CORE_VERSION: "0.12.5"
VOICEVOX_RESOURCE_VERSION: "0.13.2"
VOICEVOX_CORE_VERSION: "0.13.2"
VOICEVOX_ENGINE_VERSION:
|- # releaseタグ名か、workflow_dispatchでのバージョン名か、latestが入る
${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}

jobs:
build-all:
environment: ${{ github.event.inputs.code_signing == 'true' && 'code_signing' }} # コード署名用のenvironment
environment: ${{ github.event.inputs.code_signing == 'true' && 'code_signing' || '' }} # コード署名用のenvironment
strategy:
matrix:
include:
Expand Down Expand Up @@ -79,7 +78,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Show disk space (debug info)
shell: bash
Expand All @@ -104,7 +103,7 @@ jobs:
# Download CUDA
- name: Prepare CUDA DLL cache
if: matrix.cuda_version != ''
uses: actions/cache@v2
uses: actions/cache@v3
id: cuda-dll-cache
with:
# update this key when ONNX Runtime CUDA dependency changed
Expand Down Expand Up @@ -161,7 +160,7 @@ jobs:

- name: Prepare cuDNN cache
if: matrix.cudnn_url != ''
uses: actions/cache@v2
uses: actions/cache@v3
id: cudnn-dll-cache
with:
# update this key when ONNX Runtime cuDNN dependency changed
Expand Down Expand Up @@ -253,7 +252,7 @@ jobs:

- name: Cache DirectML
if: endswith(matrix.artifact_name, '-directml')
uses: actions/cache@v2
uses: actions/cache@v3
id: directml-cache
with:
key: directml-cache-v1-${{ hashFiles('download/directml_url.txt') }}
Expand All @@ -278,7 +277,7 @@ jobs:
run: echo "${{ matrix.onnxruntime_url }}" > download/onnxruntime_url.txt

- name: Prepare ONNX Runtime cache
uses: actions/cache@v2
uses: actions/cache@v3
id: onnxruntime-cache
with:
key: ${{ matrix.os }}-onnxruntime-${{ hashFiles('download/onnxruntime_url.txt') }}-v1
Expand Down Expand Up @@ -319,15 +318,15 @@ jobs:
# Download VOICEVOX RESOURCE
- name: Prepare VOICEVOX RESOURCE cache
uses: actions/cache@v2
uses: actions/cache@v3
id: voicevox-resource-cache
with:
key: voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

- name: Checkout VOICEVOX RESOURCE
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
Expand Down Expand Up @@ -490,7 +489,7 @@ jobs:
# https://github.com/actions/toolkit/blob/ea81280a4d48fb0308d40f8f12ae00d117f8acb9/packages/artifact/src/internal/artifact-client.ts#L147
# https://github.com/dawidd6/action-download-artifact/blob/af92a8455a59214b7b932932f2662fdefbd78126/main.js#L113
- name: Upload artifact
uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
# env:
# VERSIONED_ARTIFACT_NAME: |
# ${{ format('{0}-{1}', matrix.artifact_name, (env.VOICEVOX_ENGINE_VERSION != 'latest' && env.VOICEVOX_ENGINE_VERSION) || github.sha) }}
Expand All @@ -512,7 +511,7 @@ jobs:
- windows-directml
- windows-nvidia
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install dependencies
run: |
Expand All @@ -521,7 +520,7 @@ jobs:
p7zip-full
- name: Download and extract artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}/
Expand All @@ -536,13 +535,13 @@ jobs:
mv archives.txt "${{ matrix.artifact_name }}.7z.txt"
- name: Upload splitted archives to Release assets
uses: svenstaro/upload-release-action@v2
uses: softprops/action-gh-release@v1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VOICEVOX_ENGINE_VERSION }}
prelease: ${{ github.event.inputs.prerelease }}
file_glob: true
file: ${{ matrix.artifact_name }}.7z.*
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_ENGINE_VERSION }}
files: |-
${{ matrix.artifact_name }}.7z.*
target_commitish: ${{ github.sha }}

run-release-test-workflow:
if: (github.event.release.tag_name || github.event.inputs.version) != ''
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
path: ~\AppData\Local\pip\Cache

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: pip
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Upload coverage result
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: report
path: report/
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ EOF

# assert VOICEVOX_CORE_VERSION >= 0.11.0 (ONNX)
ARG VOICEVOX_CORE_ASSET_PREFIX=voicevox_core-linux-x64-cpu
ARG VOICEVOX_CORE_VERSION=0.12.5
ARG VOICEVOX_CORE_VERSION=0.13.2
RUN <<EOF
set -eux

Expand Down Expand Up @@ -244,7 +244,7 @@ RUN <<EOF
EOF

# Download Resource
ARG VOICEVOX_RESOURCE_VERSION=0.13.0-preview.3
ARG VOICEVOX_RESOURCE_VERSION=0.13.2
RUN <<EOF
set -eux

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
コアは [VOICEVOX CORE](https://github.com/VOICEVOX/voicevox_core/)
全体構成は [こちら](https://github.com/VOICEVOX/voicevox/blob/main/docs/%E5%85%A8%E4%BD%93%E6%A7%8B%E6%88%90.md) に詳細があります。)

## ダウンロード

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

## API ドキュメント

[API ドキュメント](https://voicevox.github.io/voicevox_engine/api/)をご参照ください。
Expand Down Expand Up @@ -263,6 +267,10 @@ curl -s -X GET "localhost:50021/speaker_info?speaker_uuid=7ffcb7ce-00ec-4bdc-82c
この API は実験的機能であり、エンジン起動時に引数で`--enable_cancellable_synthesis`を指定しないと有効化されません。
音声合成に必要なパラメータは`/synthesis`と同様です。

## アップデート

エンジンディレクトリ内にあるファイルを全て消去し、新しいものに置き換えてください。

## Docker イメージ

### CPU
Expand All @@ -287,6 +295,7 @@ Issue 側で取り組み始めたことを伝えるか、最初に Draft プル
## 環境構築

`Python 3.8.10` を用いて開発されています。
インストールするには、各 OS ごとの C/C++ コンパイラ、CMake が必要になります。

```bash
# 開発に必要なライブラリのインストール
Expand Down Expand Up @@ -323,6 +332,12 @@ python run.py --voicevox_dir=$VOICEVOX_DIR --voicelib_dir=$VOICELIB_DIR
python run.py --enable_mock
```

```bash
# ログをUTF8に変更
python run.py --output_log_utf8
# もしくは VV_OUTPUT_LOG_UTF8=1 python run.py
```

### CPU スレッド数を指定する

CPU スレッド数が未指定の場合は、論理コア数の半分か物理コア数が使われます。(殆どの CPU で、これは全体の処理能力の半分です)
Expand Down Expand Up @@ -434,7 +449,8 @@ pip-tools を用いて依存ライブラリのバージョンを固定してい
`requirements*.in`ファイルを修正後、以下のコマンドで更新できます。

```bash
pip-compile requirements.in
# pip>=22 の場合 pip-tools がエラーになります
pip-compile requirements.in # こちらを更新する場合は下2つも更新する必要があります。
pip-compile requirements-dev.in
pip-compile requirements-test.in
```
Expand Down
3 changes: 3 additions & 0 deletions default.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
キョウコ,1351,1351,0,名詞,固有名詞,人名,名,*,*,*,キョオコ,キョオコ,1/3,C1
玄野,1350,1350,5000,名詞,固有名詞,人名,姓,*,*,*,クロノ,クロノ,1/3,C1
剣崎,1350,1350,5000,名詞,固有名詞,人名,姓,*,*,*,ケンザキ,ケンザキ,1/4,C1
後鬼,1351,1351,0,名詞,固有名詞,人名,名,*,*,*,ゴキ,ゴキ,1/2,C1
虎太郎,1351,1351,5000,名詞,固有名詞,人名,名,*,*,*,コタロウ,コタロー,4/4,C1
琴葉,1350,1350,0,名詞,固有名詞,人名,姓,*,*,*,コトノハ,コトノハ,0/4,C1
四国,1350,1350,2200,名詞,固有名詞,人名,姓,*,*,*,シコク,シコク,1/3,C1
Expand All @@ -17,9 +18,11 @@
武宏,1351,1351,5000,名詞,固有名詞,人名,名,*,*,*,タケヒロ,タケヒロ,2/4,C1
月読,1350,1350,0,名詞,固有名詞,人名,姓,*,*,*,ツクヨミ,ツクヨミ,0/4,C1
つむぎ,1351,1351,7450,名詞,固有名詞,人名,名,*,*,*,ツムギ,ツムギ,0/3,C1
No.7,1351,1351,0,名詞,固有名詞,人名,名,*,*,*,ナンバーセブン,ナンバーセブン,5/7,C1
はう,1351,1351,5000,名詞,固有名詞,人名,名,*,*,*,ハウ,ハウ,1/2,C1
桜乃,1350,1350,0,名詞,固有名詞,人名,姓,*,*,*,ハルノ,ハルノ,1/3,C1
ひまり,1351,1351,7000,名詞,固有名詞,人名,名,*,*,*,ヒマリ,ヒマリ,0/3,C1
WhiteCUL,1351,1351,0,名詞,固有名詞,人名,名,*,*,*,ホワイトカル,ホワイトカル,5/6,C1
水奈瀬,1350,1350,0,名詞,固有名詞,人名,姓,*,*,*,ミナセ,ミナセ,2/3,C1
冥鳴,1350,1350,5000,名詞,固有名詞,人名,姓,*,*,*,メイメイ,メイメイ,1/4,C1
鳴花,1350,1350,0,名詞,固有名詞,人名,姓,*,*,*,メイカ,メイカ,1/3,C1
Expand Down
41 changes: 39 additions & 2 deletions engine_manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"manifest_version": "0.13.0",
"manifest_version": "0.13.1",
"name": "DUMMY VOICEVOX ENGINE",
"uuid": "c7b58856-bd56-4aa1-afb7-b8415f824b06",
"version": "999.999.999",
Expand All @@ -12,5 +12,42 @@
"update_infos": "engine_manifest_assets/update_infos.json",
"dependency_licenses": "engine_manifest_assets/dependency_licenses.json",
"downloadable_libraries_path": null,
"downloadable_libraries_url": null
"downloadable_libraries_url": null,
"supported_features": {
"adjust_mora_pitch": {
"type": "bool",
"value": true,
"name": "モーラごとの音高の調整"
},
"adjust_phoneme_length": {
"type": "bool",
"value": true,
"name": "音素ごとの長さの調整"
},
"adjust_speed_scale": {
"type": "bool",
"value": true,
"name": "全体の話速の調整"
},
"adjust_pitch_scale": {
"type": "bool",
"value": true,
"name": "全体の音高の調整"
},
"adjust_intonation_scale": {
"type": "bool",
"value": true,
"name": "全体の抑揚の調整"
},
"adjust_volume_scale": {
"type": "bool",
"value": true,
"name": "全体の音量の調整"
},
"interrogative_upspeak": {
"type": "bool",
"value": true,
"name": "疑問文の自動調整"
}
}
}
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pyinstaller==5.3
# via -r requirements-dev.in
pyinstaller-hooks-contrib==2022.8
# via pyinstaller
pyopenjtalk @ git+https://github.com/VOICEVOX/pyopenjtalk@50b0296a9e1b666e5a09a41ec9e9284a2a9b608f
pyopenjtalk @ git+https://github.com/VOICEVOX/pyopenjtalk@f4ade29ef9a4f43d8605103cb5bacc29e0b2ccae
# via -r requirements.in
python-multipart==0.0.5
# via -r requirements.in
Expand Down
Loading

0 comments on commit 6061409

Please sign in to comment.