narrow-laptop-64001
08/25/2025, 2:41 PMleave_voicemail()
- DO NOT treat voicemail prompts as patient responses
- DO NOT continue with normal conversation flow
- DO NOT say anything before calling the function
- Wait for completion
Remember: The leave_voicemail() function will handle the entire voicemail message and end the call automatically. Do not speak anything else once you detect voicemail and after the function call has been completed.
---tall-airline-16756
08/25/2025, 2:41 PMtall-airline-16756
08/25/2025, 2:42 PMnarrow-laptop-64001
08/25/2025, 2:43 PMtall-airline-16756
08/25/2025, 2:44 PMtranscription_node feature to filter out any unwanted bits. This way, you can easily specify the exact phrases or patterns you want to remove or replace while the transcription is happening.
Here’s a simple example to show you how it works:
async def transcription_node(self, text: AsyncIterable[str], model_settings: ModelSettings):
"""Filter voicemail transcription content."""
filters = {
"It seems like I reached your voicemail. I’ll leave a message with the appointment reminder. Thanks and have a great day": "",
# Add other unwanted phrases here
}
async def process_text():
async for chunk in text:
processed = chunk
for unwanted, replacement in filters.items():
processed = processed.replace(unwanted, replacement)
yield processed
return process_text()
Just pop the exact line you want to remove into the filters dictionary, and it’ll be taken out of the transcription output. If you want a hand setting this up or have any questions, feel free to reach out—I’m here to help!
Sources: Pipeline nodes and hooks | LiveKit Docs | livekit-agents/livekit/agents/voice/agent.py | pipeline-llm/transcription_node.py | Voice pipeline nodes | LiveKit Docsnarrow-laptop-64001
08/25/2025, 3:13 PMtall-airline-16756
08/25/2025, 3:15 PM