mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix(podcast_audio_generator): remove explicit format specification for audio file loading
This commit is contained in:
parent
760b18fe26
commit
9156cfd384
|
@ -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), format="mp3")
|
||||
audio = AudioSegment.from_file(io.BytesIO(response.content))
|
||||
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