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

/connect_wavesを追加 #109

Merged
merged 9 commits into from
Sep 24, 2021
Merged

Conversation

takana-v
Copy link
Member

ref https://github.com/Hiroshiba/voicevox/issues/107

概要

複数のwavファイルをbase64エンコードしたもののリストを投げるとそれを一つにしたwavファイルを返す/connect_wavesを追加します。

まだ動作未テストのためDraftです。

@takana-v takana-v marked this pull request as ready for review September 24, 2021 09:18
@takana-v
Copy link
Member Author

waveを使っていましたが、既に使用しているモジュールであるpysoundfileを使用するように変更しました。
mock環境で正しく接続されることをテスト済です。

run.py Outdated
if len(waves) == 0:
raise HTTPException(status_code=422, detail="wavファイルが含まれていません")

waves_nparray = []
Copy link
Member

Choose a reason for hiding this comment

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

ここに書くには処理が大きく、テストが書きにくそうなので、関数として切り出し頂けると!
エラーハンドリングが少しややこしいですが、関数内でHTTPExceptionをraiseしてしまっても良いかなと思いました。

Copy link
Member Author

Choose a reason for hiding this comment

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

Hiroshiba@357f316 で関数として切り出ししました

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 bb681d0 into VOICEVOX:master Sep 24, 2021
@takana-v takana-v deleted the add_connect_waves branch September 24, 2021 12:48
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.

2 participants