fix: issue where an error occurs when invoking TTS without selecting a voice (#5046)

This commit is contained in:
takatost
2024-06-09 20:28:24 +08:00
committed by GitHub
parent 2573b138bf
commit 5986841e27
3 changed files with 9 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ class TextApi(WebApiResource):
app_model=app_model,
text=request.form['text'],
end_user=end_user.external_user_id,
voice=request.form['voice'] if request.form.get('voice') else app_model.app_model_config.text_to_speech_dict.get('voice'),
voice=request.form['voice'] if request.form.get('voice') else None,
streaming=False
)