mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 19:49:04 +08:00
fix:empty voice occurs when xinference CosyVoice tts model (#7958)
This commit is contained in:
parent
0bc19c3fbf
commit
83494cb4f5
@ -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']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user