Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fixed workflow tts feature audition (#4867)

Charlie.Weid058a234ba76
diff --git a/api/controllers/console/app/audio.py b/api/controllers/console/app/audio.py
index aa10eb52fa6..51322c92d3e 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 f2f067a61e3..2480a190771 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 && (
<AudioBtn
value={languageInfo?.example}
+ voice={voiceItem?.value}
noCache={false}
isAudition={true}
/>