Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

整理: モジュール docstring を追加 #1278

Merged
merged 14 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions voicevox_engine/app/application.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""ASGI application の生成"""

from pathlib import Path

from fastapi import FastAPI
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/app/dependencies.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""FastAPI dependencies"""

from dataclasses import dataclass

from fastapi import HTTPException
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/cancellable_engine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""キャンセル可能な音声合成"""

import asyncio
import queue
import sys
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/core/core_adapter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""VOICEVOX CORE のアダプター"""

import json
import threading
from dataclasses import dataclass
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/core/core_initializer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""VOICEVOX CORE インスタンスの生成"""

import json
import os
import sys
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/core/core_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""VOICEVOX CORE の Python ラッパー"""

import os
import platform
from ctypes import _Pointer # noqa: F401
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/dev/core/mock.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""CoreWrapper のモック"""

import json
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/dev/tts_engine/mock.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""TTSEngine のモック"""

import copy
from logging import getLogger
from typing import Any
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/engine_manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""エンジンマニフェスト関連の処理"""

# マルチエンジン環境下においては、エンジンのバージョンがエディタのバージョンより
# 古くなる可能性が十分に考えられる。その場合、エディタ側がEngineManifestの情報不足によって
# エラーを吐いて表示が崩壊する可能性がある。これを防止するため、EngineManifest関連の定義を
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/library/library_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""音声ライブラリの管理"""

import base64
import json
import os
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/metas/Metas.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""話者情報と話者メタ情報"""

from enum import Enum
from typing import Literal, NewType

Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/metas/MetasStore.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""話者情報と話者メタ情報の管理"""

import json
from copy import deepcopy
from pathlib import Path
Expand Down
9 changes: 9 additions & 0 deletions voicevox_engine/model.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion voicevox_engine/preset/preset_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""プリセットのモデルとエラー"""
"""プリセット関連の処理"""

from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/setting/setting_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""エンジン設定関連の処理"""

from enum import Enum
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/tts_pipeline/connect_base64_waves.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""音声データの結合"""

import base64
import io

Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/tts_pipeline/phoneme.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""音素"""

from typing import Literal

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/tts_pipeline/text_analyzer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""テキスト解析"""

import re
from dataclasses import dataclass
from itertools import chain
Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/tts_pipeline/tts_engine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""音声合成エンジン"""

import copy
import math

Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/utility/core_version_utility.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""バージョンに関する utility"""
tarepan marked this conversation as resolved.
Show resolved Hide resolved

from semver.version import Version


Expand Down
2 changes: 2 additions & 0 deletions voicevox_engine/utility/path_utility.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""パスに関する utility"""
tarepan marked this conversation as resolved.
Show resolved Hide resolved

import os
import sys
import traceback
Expand Down