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

整理: 合成系の HTTPException をドメインから移動 #1310

Merged
merged 2 commits into from
May 29, 2024

Conversation

tarepan
Copy link
Contributor

@tarepan tarepan commented May 23, 2024

内容

概要: 合成系の HTTPException をドメインから移動してリファクタリング

Sing 機能はリリース優先で実装された経緯があり、現在の ENGINE の実装規約に則っていない箇所が複数ある。
HTTPException のドメインミスマッチはその一例であり、現在でもその状況が続いている。
Sing に閉じたエラーであるため、Sing 用エラーを定義しこれを router でキャッチすれば最小実装でドメインから HTTPException を分離できる。

また CancellableEngine はごく初期からの実装であり、HTTPException のドメイン分離規約がない時代の実装が残っている。これもキャンセル可能合成に閉じたエラーであるため、専用エラーと router キャッチで分離が可能である。

このような背景から、合成系の HTTPException をドメインから移動するリファクタリングを提案します。

関連 Issue

無し

@tarepan tarepan requested a review from a team as a code owner May 23, 2024 08:22
@tarepan tarepan requested review from Hiroshiba and removed request for a team May 23, 2024 08:22
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error忘れはたぶんそうな気がするのでそこだけ!

voicevox_engine/tts_pipeline/tts_engine.py Outdated Show resolved Hide resolved
voicevox_engine/app/routers/tts_pipeline.py Outdated Show resolved Hide resolved
@tarepan
Copy link
Contributor Author

tarepan commented May 27, 2024

@Hiroshiba
全指摘箇所の反映・テストパスを確認しました。Re-review よろしくお願いします。

@@ -31,6 +31,12 @@
UPSPEAK_PITCH_MAX = 6.5


class TalkSingInvalidInputError(Exception):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TTSEngineという名前が良い感じになったら、良い感じになった名前InputErrorが良さそうなのかなとか思いました!

まあ、VOICEVOX ENGINEでEngineという名前が使われてるので、現TTSEngineはEngineと呼ばないなにか良い名前があると良いのかもですねぇ。。

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@Hiroshiba Hiroshiba merged commit 8aa4ba8 into VOICEVOX:master May 29, 2024
4 checks passed
@tarepan tarepan deleted the refactor/domain_http_exception branch May 29, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants