Skip to content

Commit

Permalink
fix:empty voice occurs when xinference CosyVoice tts model (langgeniu…
Browse files Browse the repository at this point in the history
  • Loading branch information
leslie2046 authored and lau-td committed Oct 23, 2024
1 parent ab78fcf commit 975a0cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/core/model_runtime/model_providers/xinference/tts/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ def get_tts_model_voices(self, model: str, credentials: dict, language: Optional
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']

Expand Down

0 comments on commit 975a0cf

Please sign in to comment.