We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2971406 commit 1e8e3a9Copy full SHA for 1e8e3a9
apps/setting/models_provider/impl/aliyun_bai_lian_model_provider/model/tts.py
@@ -46,6 +46,8 @@ def text_to_speech(self, text):
46
from dashscope.audio.tts_v2 import SpeechSynthesizer
47
synthesizer = SpeechSynthesizer(model=self.model, **self.params)
48
audio = synthesizer.call(text)
49
+ if audio is None:
50
+ raise Exception('Failed to generate audio')
51
if type(audio) == str:
52
print(audio)
53
raise Exception(audio)
0 commit comments