Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
ux: Reorder voice cut actions to lower latency
Clémence Lesnée4a96c3e26e6
diff --git a/app/helpers/call_llm.py b/app/helpers/call_llm.pyindex 035b922..677cdfc 100644--- a/app/helpers/call_llm.py+++ b/app/helpers/call_llm.py@@ -161,14 +161,10 @@ async def load_llm_chat( # noqa: PLR0913, PLR0915if last_chat:last_chat.cancel()- # Stop TTS, clear the buffer and send a stop signal+ # Stop TTS tasktts_client.stop_speaking_async()- # Reset the recognition- stt_buffer.clear()- stt_complete_gate.clear()-- # Clear the audio buffer+ # Clear the out bufferwhile not audio_out.empty():audio_out.get_nowait()audio_out.task_done()@@ -176,6 +172,10 @@ async def load_llm_chat( # noqa: PLR0913, PLR0915# Send a stop signalawait audio_out.put(False)+ # Reset TTS buffer+ stt_buffer.clear()+ stt_complete_gate.clear()+async def _commit_answer(wait: bool,tool_blacklist: set[str] | None = None,