🚀 Auto-deploy: BotVPS atualizado em 21/04/2026 20:51:24

This commit is contained in:
2026-04-21 20:51:24 +00:00
parent c538fdb9c2
commit 8161c35655
5 changed files with 13 additions and 12 deletions

View File

@@ -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)