fix:empty voice occurs when xinference CosyVoice tts model (#7958)
This commit is contained in:
parent
0bc19c3fbf
commit
83494cb4f5
1 changed files with 5 additions and 0 deletions
|
|
@ -174,6 +174,11 @@ class XinferenceText2SpeechModel(TTSModel):
|
||||||
return voices[language]
|
return voices[language]
|
||||||
elif 'all' in voices:
|
elif 'all' in voices:
|
||||||
return voices['all']
|
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']
|
return self.model_voices['__default']['all']
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue