diff --git a/voicevox_engine/app/application.py b/voicevox_engine/app/application.py index 06a76dd67..3035b4a16 100644 --- a/voicevox_engine/app/application.py +++ b/voicevox_engine/app/application.py @@ -1,3 +1,5 @@ +"""ASGI application の生成""" + from pathlib import Path from fastapi import FastAPI diff --git a/voicevox_engine/app/dependencies.py b/voicevox_engine/app/dependencies.py index a68cdcffd..d846e2bfb 100644 --- a/voicevox_engine/app/dependencies.py +++ b/voicevox_engine/app/dependencies.py @@ -1,3 +1,5 @@ +"""FastAPI dependencies""" + from dataclasses import dataclass from fastapi import HTTPException diff --git a/voicevox_engine/cancellable_engine.py b/voicevox_engine/cancellable_engine.py index 985d042ac..70da62c5f 100644 --- a/voicevox_engine/cancellable_engine.py +++ b/voicevox_engine/cancellable_engine.py @@ -1,3 +1,5 @@ +"""キャンセル可能な音声合成""" + import asyncio import queue import sys diff --git a/voicevox_engine/core/core_adapter.py b/voicevox_engine/core/core_adapter.py index 95fe0725e..d14dd9550 100644 --- a/voicevox_engine/core/core_adapter.py +++ b/voicevox_engine/core/core_adapter.py @@ -1,3 +1,5 @@ +"""VOICEVOX CORE のアダプター""" + import json import threading from dataclasses import dataclass diff --git a/voicevox_engine/core/core_initializer.py b/voicevox_engine/core/core_initializer.py index b8a4bc5d1..5f7a9dc2a 100644 --- a/voicevox_engine/core/core_initializer.py +++ b/voicevox_engine/core/core_initializer.py @@ -1,3 +1,5 @@ +"""VOICEVOX CORE インスタンスの生成""" + import json import os import sys diff --git a/voicevox_engine/core/core_wrapper.py b/voicevox_engine/core/core_wrapper.py index 2f1e59544..7a6e1ae77 100644 --- a/voicevox_engine/core/core_wrapper.py +++ b/voicevox_engine/core/core_wrapper.py @@ -1,3 +1,5 @@ +"""VOICEVOX CORE の Python ラッパー""" + import os import platform from ctypes import _Pointer # noqa: F401 diff --git a/voicevox_engine/dev/core/mock.py b/voicevox_engine/dev/core/mock.py index 53fb64390..70ac50f89 100644 --- a/voicevox_engine/dev/core/mock.py +++ b/voicevox_engine/dev/core/mock.py @@ -1,3 +1,5 @@ +"""CoreWrapper のモック""" + import json from pathlib import Path diff --git a/voicevox_engine/dev/tts_engine/mock.py b/voicevox_engine/dev/tts_engine/mock.py index 0e9bcf055..f3856848d 100644 --- a/voicevox_engine/dev/tts_engine/mock.py +++ b/voicevox_engine/dev/tts_engine/mock.py @@ -1,3 +1,5 @@ +"""TTSEngine のモック""" + import copy from logging import getLogger from typing import Any diff --git a/voicevox_engine/engine_manifest.py b/voicevox_engine/engine_manifest.py index 9c93a6a81..037ee90b2 100644 --- a/voicevox_engine/engine_manifest.py +++ b/voicevox_engine/engine_manifest.py @@ -1,3 +1,5 @@ +"""エンジンマニフェスト関連の処理""" + # マルチエンジン環境下においては、エンジンのバージョンがエディタのバージョンより # 古くなる可能性が十分に考えられる。その場合、エディタ側がEngineManifestの情報不足によって # エラーを吐いて表示が崩壊する可能性がある。これを防止するため、EngineManifest関連の定義を diff --git a/voicevox_engine/library/library_manager.py b/voicevox_engine/library/library_manager.py index 1858beb28..6a039bfcf 100644 --- a/voicevox_engine/library/library_manager.py +++ b/voicevox_engine/library/library_manager.py @@ -1,3 +1,5 @@ +"""音声ライブラリの管理""" + import base64 import json import os diff --git a/voicevox_engine/metas/Metas.py b/voicevox_engine/metas/Metas.py index bc1e77db2..1fe421a8a 100644 --- a/voicevox_engine/metas/Metas.py +++ b/voicevox_engine/metas/Metas.py @@ -1,3 +1,5 @@ +"""話者情報と話者メタ情報""" + from enum import Enum from typing import Literal, NewType diff --git a/voicevox_engine/metas/MetasStore.py b/voicevox_engine/metas/MetasStore.py index 6fb31e689..bd8d8a4b3 100644 --- a/voicevox_engine/metas/MetasStore.py +++ b/voicevox_engine/metas/MetasStore.py @@ -1,3 +1,5 @@ +"""話者情報と話者メタ情報の管理""" + import json from dataclasses import dataclass from pathlib import Path diff --git a/voicevox_engine/model.py b/voicevox_engine/model.py index 0ff9b3210..bfdd83937 100644 --- a/voicevox_engine/model.py +++ b/voicevox_engine/model.py @@ -1,3 +1,12 @@ +""" +API と ENGINE 内部実装が共有するモデル + +このモジュールで定義されるモデル(データ構造)は API と ENGINE の 2 箇所から使われる。そのため +- モデルの変更は API 変更となるため慎重に検討する。 +- モデルの docstring や Field は API スキーマとして使われるため、ユーザー向けに丁寧に書く。 +- モデルクラスは FastAPI の制約から `BaseModel` を継承しなければならない。 +""" + from pydantic import BaseModel, Field from voicevox_engine.tts_pipeline.model import AccentPhrase diff --git a/voicevox_engine/preset/preset_manager.py b/voicevox_engine/preset/preset_manager.py index 910d6835b..4c3d8b7cb 100644 --- a/voicevox_engine/preset/preset_manager.py +++ b/voicevox_engine/preset/preset_manager.py @@ -1,4 +1,4 @@ -"""プリセットのモデルとエラー""" +"""プリセット関連の処理""" from pathlib import Path diff --git a/voicevox_engine/setting/setting_manager.py b/voicevox_engine/setting/setting_manager.py index 7f0008884..936148ef5 100644 --- a/voicevox_engine/setting/setting_manager.py +++ b/voicevox_engine/setting/setting_manager.py @@ -1,3 +1,5 @@ +"""エンジン設定関連の処理""" + from enum import Enum from pathlib import Path diff --git a/voicevox_engine/tts_pipeline/connect_base64_waves.py b/voicevox_engine/tts_pipeline/connect_base64_waves.py index 1a6bc4b87..d6753db8c 100644 --- a/voicevox_engine/tts_pipeline/connect_base64_waves.py +++ b/voicevox_engine/tts_pipeline/connect_base64_waves.py @@ -1,3 +1,5 @@ +"""音声データの結合""" + import base64 import io diff --git a/voicevox_engine/tts_pipeline/phoneme.py b/voicevox_engine/tts_pipeline/phoneme.py index 2d1642532..866811853 100644 --- a/voicevox_engine/tts_pipeline/phoneme.py +++ b/voicevox_engine/tts_pipeline/phoneme.py @@ -1,3 +1,5 @@ +"""音素""" + from typing import Literal import numpy as np diff --git a/voicevox_engine/tts_pipeline/text_analyzer.py b/voicevox_engine/tts_pipeline/text_analyzer.py index 28ed2b992..904c2de0b 100644 --- a/voicevox_engine/tts_pipeline/text_analyzer.py +++ b/voicevox_engine/tts_pipeline/text_analyzer.py @@ -1,3 +1,5 @@ +"""テキスト解析""" + import re from dataclasses import dataclass from itertools import chain diff --git a/voicevox_engine/tts_pipeline/tts_engine.py b/voicevox_engine/tts_pipeline/tts_engine.py index f3ca2064e..18e9d17b1 100644 --- a/voicevox_engine/tts_pipeline/tts_engine.py +++ b/voicevox_engine/tts_pipeline/tts_engine.py @@ -1,3 +1,5 @@ +"""音声合成エンジン""" + import copy import math diff --git a/voicevox_engine/utility/core_version_utility.py b/voicevox_engine/utility/core_version_utility.py index da005f011..91bb72eaa 100644 --- a/voicevox_engine/utility/core_version_utility.py +++ b/voicevox_engine/utility/core_version_utility.py @@ -1,3 +1,5 @@ +"""バージョンに関する utility""" + from semver.version import Version diff --git a/voicevox_engine/utility/path_utility.py b/voicevox_engine/utility/path_utility.py index 1dd511056..f99db2551 100644 --- a/voicevox_engine/utility/path_utility.py +++ b/voicevox_engine/utility/path_utility.py @@ -1,3 +1,5 @@ +"""パスに関する utility""" + import sys from pathlib import Path