🚀 Auto-deploy: BotVPS atualizado em 21/04/2026 20:51:24
This commit is contained in:
4
main.py
4
main.py
@@ -155,8 +155,8 @@ async def web_chat_audio(audio: UploadFile = File(...), is_auth: bool = Depends(
|
||||
reply = await query_agent_async(text)
|
||||
|
||||
# 4. Gera áudio da resposta (TTS)
|
||||
# Se houver <REFINED>, usa apenas ele para o áudio. Caso contrário, usa tudo.
|
||||
refined_match = re.search(r'<REFINED>(.*?)</REFINED>', reply, flags=re.DOTALL)
|
||||
# Se houver RESUMO:, usa apenas ele para o áudio. Caso contrário, usa tudo.
|
||||
refined_match = re.search(r'RESUMO:\s*(.*)', reply, flags=re.DOTALL | re.IGNORECASE)
|
||||
audio_text = refined_match.group(1).strip() if refined_match else reply
|
||||
filename = await text_to_speech_async(audio_text)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user