mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 19:44:45 +08:00
refactor: refactor podcast genration stability (#11)
This commit is contained in:
@@ -16,9 +16,9 @@ def tts_node(state: PodcastState):
|
||||
tts_client = _create_tts_client()
|
||||
for line in state["script"].lines:
|
||||
tts_client.voice_type = (
|
||||
"BV033_streaming" if line.speaker == "male" else "BV034_streaming"
|
||||
"BV002_streaming" if line.speaker == "male" else "BV001_streaming"
|
||||
)
|
||||
result = tts_client.text_to_speech(line.text, speed_ratio=1.05)
|
||||
result = tts_client.text_to_speech(line.paragraph, speed_ratio=1.05)
|
||||
if result["success"]:
|
||||
audio_data = result["audio_data"]
|
||||
audio_chunk = base64.b64decode(audio_data)
|
||||
|
||||
Reference in New Issue
Block a user