diff --git a/api/controllers/console/app/audio.py b/api/controllers/console/app/audio.py index aa10eb52fa..51322c92d3 100644 --- a/api/controllers/console/app/audio.py +++ b/api/controllers/console/app/audio.py @@ -85,7 +85,7 @@ class ChatMessageTextApi(Resource): response = AudioService.transcript_tts( app_model=app_model, text=request.form['text'], - 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'], streaming=False ) diff --git a/web/app/components/base/features/feature-panel/text-to-speech/index.tsx b/web/app/components/base/features/feature-panel/text-to-speech/index.tsx index f2f067a61e..2480a19077 100644 --- a/web/app/components/base/features/feature-panel/text-to-speech/index.tsx +++ b/web/app/components/base/features/feature-panel/text-to-speech/index.tsx @@ -47,6 +47,7 @@ const TextToSpeech = ({ { languageInfo?.example && (