Browse Source

Fixed workflow tts feature audition (#4867)

Charlie.Wei 10 months ago
parent
commit
d058a234ba

+ 1 - 1
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
             )
 

+ 1 - 0
web/app/components/base/features/feature-panel/text-to-speech/index.tsx

@@ -47,6 +47,7 @@ const TextToSpeech = ({
         { languageInfo?.example && (
           <AudioBtn
             value={languageInfo?.example}
+            voice={voiceItem?.value}
             noCache={false}
             isAudition={true}
           />