mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
Merge branch 'feat/enhance-multi-modal-support' into deploy/dev
This commit is contained in:
commit
dee5d0911e
|
@ -27,7 +27,7 @@ class PodcastAudioGeneratorTool(BuiltinTool):
|
|||
) -> tuple[int, Union[AudioSegment, str], Optional[AudioSegment]]:
|
||||
try:
|
||||
response = client.audio.speech.create(model="tts-1", voice=voice, input=line.strip())
|
||||
audio = AudioSegment.from_file(io.BytesIO(response.content))
|
||||
audio = AudioSegment.from_file(io.BytesIO(response.content), format="wav")
|
||||
silence_duration = random.uniform(0.1, 1.5)
|
||||
silence = PodcastAudioGeneratorTool._generate_silence(silence_duration)
|
||||
return index, audio, silence
|
||||
|
|
Loading…
Reference in New Issue
Block a user