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.

fix:empty voice occurs when xinference CosyVoice tts model (#7958)

呆萌闷油瓶83494cb4f573
diff --git a/api/core/model_runtime/model_providers/xinference/tts/tts.py b/api/core/model_runtime/model_providers/xinference/tts/tts.py
index bfa752df8cd..8cc99fef7c2 100644
--- a/api/core/model_runtime/model_providers/xinference/tts/tts.py
+++ b/api/core/model_runtime/model_providers/xinference/tts/tts.py
@@ -174,6 +174,11 @@ class XinferenceText2SpeechModel(TTSModel):
return voices[language]
elif 'all' in voices:
return voices['all']
+ else:
+ all_voices = []
+ for lang, lang_voices in voices.items():
+ all_voices.extend(lang_voices)
+ return all_voices
return self.model_voices['__default']['all']