main
HuangHai 4 months ago
parent 01231640c6
commit 8413f75f2e

@ -314,7 +314,9 @@ async def reply(person_id: str = Form(...),
# 调用 TTS 生成 MP3
uuid_str = str(uuid.uuid4())
timestamp = int(time.time())
tts_file = f"audio/{uuid_str}_{timestamp}.mp3"
# 生成年月日的目录名称
audio_dir = f"audio/{time.strftime('%Y-%m-%d', time.localtime())}"
tts_file = f"{audio_dir}_{uuid_str}_{timestamp}.mp3"
# 生成 TTS 音频数据(不落盘)
t = TTS(None) # 传入 None 表示不保存到本地文件

Loading…
Cancel
Save