Skip to content

Commit

Permalink
Update: 最低限必要な箇所だけを VOICEVOX / VOICEVOX ENGINE から AivisSpeech / Aivis…
Browse files Browse the repository at this point in the history
…Speech Engine にリブランド

voicevox_engine (Python パッケージ) に関しては多くのコードから参照されていることから、追従時のコンフリクトを防ぐためあえて変更しなかった
また AivisSpeech では VOICEVOX CORE にあたるコンポーネントが存在しないが、実装上の処遇がまだ決まっていないため変更を見送った
  • Loading branch information
tsukumijima committed Mar 4, 2024
1 parent ae527c4 commit 474d56d
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 65 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bugreport.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ labels: バグ

<!-- 正しいと思う動作が明確であれば記載してください -->

## VOICEVOXのバージョン
## AivisSpeech のバージョン

0.?.0

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/featurerequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ labels: 機能向上

<!-- 実現方法について検討済みであるなら -->

## VOICEVOXのバージョン
## AivisSpeech のバージョン

0.?.0

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ labels: 要議論

<!-- ここに記載してください -->

## VOICEVOXのバージョン
## AivisSpeech のバージョン

0.?.0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
required: true

env:
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/aivisspeech-engine
PYTHON_VERSION: "3.11.3"
VOICEVOX_RESOURCE_VERSION: "0.16.0"
VOICEVOX_CORE_VERSION: "0.15.0"
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
BASE_IMAGE=${{ matrix.base_image }}
BASE_RUNTIME_IMAGE=${{ matrix.base_runtime_image }}
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
VOICEVOX_ENGINE_VERSION=${{ needs.config.outputs.version_or_latest }}
AIVISSPEECH_ENGINE_VERSION=${{ needs.config.outputs.version_or_latest }}
VOICEVOX_CORE_VERSION=${{ env.VOICEVOX_CORE_VERSION }}
VOICEVOX_RESOURCE_VERSION=${{ env.VOICEVOX_RESOURCE_VERSION }}
USE_GPU=${{ matrix.target == 'runtime-nvidia-env' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
- name: declare variables
id: vars
run: |
echo "package_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version }}" >> "$GITHUB_OUTPUT"
echo "package_name=aivisspeech-engine-${{ matrix.target }}-${{ needs.config.outputs.version }}" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
required: true

env:
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_engine
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/aivisspeech-engine
VERSION: |- # version指定時はversionを、それ以外はタグ名を使用
${{ (github.event.inputs || inputs).version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
id: vars
run: |
echo "release_url=${{ env.REPO_URL }}/releases/download/${{ env.VERSION }}" >> "$GITHUB_OUTPUT"
echo "package_name=voicevox_engine-${{ matrix.target }}-${{ env.VERSION }}" >> "$GITHUB_OUTPUT"
echo "package_name=aivisspeech-engine-${{ matrix.target }}-${{ env.VERSION }}" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4

Expand Down
32 changes: 16 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ EOF
FROM ${BASE_RUNTIME_IMAGE} AS runtime-env
ARG DEBIAN_FRONTEND=noninteractive

WORKDIR /opt/voicevox_engine
WORKDIR /opt/aivisspeech-engine

# ca-certificates: pyopenjtalk dictionary download
# build-essential: pyopenjtalk local build
Expand Down Expand Up @@ -225,33 +225,33 @@ COPY --from=download-core-env /opt/voicevox_core /opt/voicevox_core
COPY --from=download-onnxruntime-env /opt/onnxruntime /opt/onnxruntime

# Add local files
ADD ./voicevox_engine /opt/voicevox_engine/voicevox_engine
ADD ./docs /opt/voicevox_engine/docs
ADD ./run.py ./presets.yaml ./default.csv ./engine_manifest.json /opt/voicevox_engine/
ADD ./build_util/generate_licenses.py /opt/voicevox_engine/build_util/
ADD ./speaker_info /opt/voicevox_engine/speaker_info
ADD ./ui_template /opt/voicevox_engine/ui_template
ADD ./engine_manifest_assets /opt/voicevox_engine/engine_manifest_assets
ADD ./voicevox_engine /opt/aivisspeech-engine/voicevox_engine
ADD ./docs /opt/aivisspeech-engine/docs
ADD ./run.py ./presets.yaml ./default.csv ./engine_manifest.json /opt/aivisspeech-engine/
ADD ./build_util/generate_licenses.py /opt/aivisspeech-engine/build_util/
ADD ./speaker_info /opt/aivisspeech-engine/speaker_info
ADD ./ui_template /opt/aivisspeech-engine/ui_template
ADD ./engine_manifest_assets /opt/aivisspeech-engine/engine_manifest_assets

# Replace version
ARG VOICEVOX_ENGINE_VERSION=latest
RUN sed -i "s/__version__ = \"latest\"/__version__ = \"${VOICEVOX_ENGINE_VERSION}\"/" /opt/voicevox_engine/voicevox_engine/__init__.py
RUN sed -i "s/\"version\": \"999\\.999\\.999\"/\"version\": \"${VOICEVOX_ENGINE_VERSION}\"/" /opt/voicevox_engine/engine_manifest.json
ARG AIVISSPEECH_ENGINE_VERSION=latest
RUN sed -i "s/__version__ = \"latest\"/__version__ = \"${AIVISSPEECH_ENGINE_VERSION}\"/" /opt/aivisspeech-engine/voicevox_engine/__init__.py
RUN sed -i "s/\"version\": \"999\\.999\\.999\"/\"version\": \"${AIVISSPEECH_ENGINE_VERSION}\"/" /opt/aivisspeech-engine/engine_manifest.json

# Generate licenses.json
ADD ./requirements-license.txt /tmp/
RUN <<EOF
set -eux

cd /opt/voicevox_engine
cd /opt/aivisspeech-engine

# Define temporary env vars
# /home/user/.local/bin is required to use the commands installed by pip
export PATH="/home/user/.local/bin:${PATH:-}"

gosu user /opt/python/bin/pip3 install -r /tmp/requirements-license.txt
gosu user /opt/python/bin/python3 build_util/generate_licenses.py > /opt/voicevox_engine/engine_manifest_assets/dependency_licenses.json
cp /opt/voicevox_engine/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json
gosu user /opt/python/bin/python3 build_util/generate_licenses.py > /opt/aivisspeech-engine/engine_manifest_assets/dependency_licenses.json
cp /opt/aivisspeech-engine/engine_manifest_assets/dependency_licenses.json /opt/aivisspeech-engine/licenses.json
EOF

# Keep this layer separated to use layer cache on download failed in local build
Expand Down Expand Up @@ -280,7 +280,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/aivisspeech-engine/README.md" "https://raw.githubusercontent.com/VOICEVOX/voicevox_resource/${VOICEVOX_RESOURCE_VERSION}/engine/README.md"
EOF

# Create container start shell
Expand All @@ -289,7 +289,7 @@ COPY --chmod=775 <<EOF /entrypoint.sh
set -eux

# Display README for engine
cat /opt/voicevox_engine/README.md > /dev/stderr
cat /opt/aivisspeech-engine/README.md > /dev/stderr

exec "\$@"
EOF
Expand Down
22 changes: 11 additions & 11 deletions build_util/generate_licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ def generate_licenses() -> List[License]:
)

# VOICEVOX CORE
with urllib.request.urlopen(
"https://raw.githubusercontent.com/VOICEVOX/voicevox_core/main/LICENSE"
) as res:
licenses.append(
License(
name="VOICEVOX CORE",
version=None,
license="MIT license",
text=res.read().decode(),
)
)
# with urllib.request.urlopen(
# "https://raw.githubusercontent.com/VOICEVOX/voicevox_core/main/LICENSE"
# ) as res:
# licenses.append(
# License(
# name="VOICEVOX CORE",
# version=None,
# license="MIT license",
# text=res.read().decode(),
# )
# )

# VOICEVOX ENGINE
with urllib.request.urlopen(
Expand Down
2 changes: 1 addition & 1 deletion engine_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "AivisSpeech Engine",
"brand_name": "AivisSpeech",
"uuid": "1b4a5014-d9fd-11ee-b97d-83c170a68ed3",
"version": "0.1.0",
"version": "999.999.999",
"url": "https://github.com/Aivis-Project/AivisSpeech-Engine",
"command": "run",
"port": 10101,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ multi_line_output = 3
use_parentheses = true

[tool.poetry]
name = "voicevox_engine"
name = "AivisSpeech-Engine"
version = "0.0.0"
description = ""
authors = ["Hiroshiba <[email protected]>"]
Expand Down
14 changes: 7 additions & 7 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def generate_app(
root_dir = engine_root()

app = FastAPI(
title="VOICEVOX Engine",
description="VOICEVOXの音声合成エンジンです。",
title="AivisSpeech Engine",
description="AivisSpeech の音声合成エンジンです。",
version=__version__,
)

Expand Down Expand Up @@ -1428,7 +1428,7 @@ def main() -> None:
if output_log_utf8:
set_output_log_utf8()

parser = argparse.ArgumentParser(description="VOICEVOX のエンジンです。")
parser = argparse.ArgumentParser(description="AivisSpeech のエンジンです。")
parser.add_argument(
"--host",
type=str,
Expand All @@ -1442,10 +1442,10 @@ def main() -> None:
"--use_gpu", action="store_true", help="GPUを使って音声合成するようになります。"
)
parser.add_argument(
"--voicevox_dir",
"--aivisspeech_dir",
type=Path,
default=None,
help="VOICEVOXのディレクトリパスです。",
help="AivisSpeechのディレクトリパスです。",
)
parser.add_argument(
"--voicelib_dir",
Expand Down Expand Up @@ -1540,7 +1540,7 @@ def main() -> None:
default=None,
help=(
"プリセットファイルを指定できます。"
"指定がない場合、環境変数 VV_PRESET_FILE、--voicevox_dirのpresets.yaml、"
"指定がない場合、環境変数 VV_PRESET_FILE、--aivisspeech_dirのpresets.yaml、"
"実行ファイルのディレクトリのpresets.yamlを順に探します。"
),
)
Expand All @@ -1562,7 +1562,7 @@ def main() -> None:

# Synthesis Engine
use_gpu: bool = args.use_gpu
voicevox_dir: Path | None = args.voicevox_dir
voicevox_dir: Path | None = args.aivisspeech_dir
voicelib_dirs: list[Path] | None = args.voicelib_dir
runtime_dirs: list[Path] | None = args.runtime_dir
enable_mock: bool = args.enable_mock
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions test/e2e/single_api/__snapshots__/test_setting_api.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@
<!DOCTYPE html>

<!--
VOICEVOXエンジンの設定ページです
AivisSpeechエンジンの設定ページです
VueとBootstrapを使っています。
ライブラリを読み込んだあと、Vueコンポーネントの初期化が完了してからUIを表示します。
-->

<html lang="ja">
<head>
<meta charset="utf-8" />
<title>VOICEVOX Engine 設定</title>
<link
rel="shortcut icon"
href="https://voicevox.hiroshiba.jp/favicon-32x32.png"
/>
<title>AivisSpeech Engine 設定</title>

<style>
.before-init-fadein {
Expand Down Expand Up @@ -103,7 +99,7 @@
<label class="form-label">ユーザー辞書のエクスポート</label>
<div class="col-12">
<a
download="VOICEVOXユーザー辞書.json"
download="AivisSpeechユーザー辞書.json"
class="btn btn-primary mb-3"
href="/user_dict"
@click="showToastWithMessage('辞書をエクスポートしました。');"
Expand Down
10 changes: 3 additions & 7 deletions ui_template/ui.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<!DOCTYPE html>

<!--
VOICEVOXエンジンの設定ページです
AivisSpeechエンジンの設定ページです
VueとBootstrapを使っています。
ライブラリを読み込んだあと、Vueコンポーネントの初期化が完了してからUIを表示します。
-->

<html lang="ja">
<head>
<meta charset="utf-8" />
<title>VOICEVOX Engine 設定</title>
<link
rel="shortcut icon"
href="https://voicevox.hiroshiba.jp/favicon-32x32.png"
/>
<title>AivisSpeech Engine 設定</title>

<style>
.before-init-fadein {
Expand Down Expand Up @@ -100,7 +96,7 @@ <h1 class="mb-3">{{brandName}} エンジン 設定</h1>
<label class="form-label">ユーザー辞書のエクスポート</label>
<div class="col-12">
<a
download="VOICEVOXユーザー辞書.json"
download="AivisSpeechユーザー辞書.json"
class="btn btn-primary mb-3"
href="/user_dict"
@click="showToastWithMessage('辞書をエクスポートしました。');"
Expand Down
6 changes: 2 additions & 4 deletions voicevox_engine/utility/path_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ def is_development() -> bool:

def get_save_dir() -> Path:
# FIXME: ファイル保存場所をエンジン固有のIDが入ったものにする
# FIXME: Windowsは`voicevox-engine/voicevox-engine`ディレクトリに保存されているので
# `VOICEVOX/voicevox-engine`に変更する
if is_development():
app_name = "voicevox-engine-dev"
app_name = "AivisSpeech-Engine-Dev"
else:
app_name = "voicevox-engine"
app_name = "AivisSpeech-Engine"
return Path(user_data_dir(app_name))


Expand Down

0 comments on commit 474d56d

Please sign in to comment.