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

OpenAPIのスナップショットテスト追加&不要なQueryを省く #992

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 12 additions & 12 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def get_core(core_version: Optional[str]) -> CoreAdapter:
)
def audio_query(
text: str,
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
core_version: str | None = None,
) -> AudioQuery:
Expand Down Expand Up @@ -371,7 +371,7 @@ def audio_query_from_preset(
)
def accent_phrases(
text: str,
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
is_kana: bool = False,
core_version: str | None = None,
Expand Down Expand Up @@ -407,7 +407,7 @@ def accent_phrases(
)
def mora_data(
accent_phrases: list[AccentPhrase],
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
core_version: str | None = None,
) -> list[AccentPhrase]:
Expand All @@ -425,7 +425,7 @@ def mora_data(
)
def mora_length(
accent_phrases: list[AccentPhrase],
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
core_version: str | None = None,
) -> list[AccentPhrase]:
Expand All @@ -443,7 +443,7 @@ def mora_length(
)
def mora_pitch(
accent_phrases: list[AccentPhrase],
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
core_version: str | None = None,
) -> list[AccentPhrase]:
Expand All @@ -468,7 +468,7 @@ def mora_pitch(
)
def synthesis(
query: AudioQuery,
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
enable_interrogative_upspeak: bool = Query( # noqa: B008
default=True,
Expand Down Expand Up @@ -511,7 +511,7 @@ def synthesis(
def cancellable_synthesis(
query: AudioQuery,
request: Request,
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
core_version: str | None = None,
) -> FileResponse:
Expand Down Expand Up @@ -552,7 +552,7 @@ def cancellable_synthesis(
)
def multi_synthesis(
queries: list[AudioQuery],
style_id: StyleId | None = Query(default=None), # noqa: B008
style_id: StyleId | None = None,
speaker: StyleId | None = Query(default=None, deprecated=True), # noqa: B008
core_version: str | None = None,
) -> FileResponse:
Expand Down Expand Up @@ -634,11 +634,11 @@ def morphable_targets(
)
def _synthesis_morphing(
query: AudioQuery,
base_style_id: StyleId | None = Query(default=None), # noqa: B008
base_style_id: StyleId | None = None,
base_speaker: (StyleId | None) = Query( # noqa: B008
default=None, deprecated=True
),
target_style_id: StyleId | None = Query(default=None), # noqa: B008
target_style_id: StyleId | None = None,
target_speaker: (StyleId | None) = Query( # noqa: B008
default=None, deprecated=True
),
Expand Down Expand Up @@ -1032,7 +1032,7 @@ def uninstall_library(library_uuid: str) -> Response:
def initialize_style_id(
style_id: StyleId,
skip_reinit: bool = Query( # noqa: B008
False, description="既に初期化済みのスタイルの再初期化をスキップするかどうか"
default=False, description="既に初期化済みのスタイルの再初期化をスキップするかどうか"
),
core_version: str | None = None,
) -> Response:
Expand All @@ -1059,7 +1059,7 @@ def is_initialized_style_id(
def initialize_speaker(
speaker: StyleId,
skip_reinit: bool = Query( # noqa: B008
False, description="既に初期化済みの話者の再初期化をスキップするかどうか"
default=False, description="既に初期化済みの話者の再初期化をスキップするかどうか"
),
core_version: str | None = None,
) -> Response:
Expand Down
Loading