TTSGate (voicemail/voicemail_detector.py)

pipecat · src/pipecat/extensions/voicemail/voicemail_detector.py · python · BSD-2-Clause
voice

Hold bot speech until voicemail detection resolves for outbound calls

# Source: https://github.com/pipecat-ai/pipecat | License: BSD-2-Clause | Copyright 2024–2026, Daily
# Provided via justclaw.it.com; keep this notice with the code.
#
# Copyright (c) 2024-2026, Daily
#
# SPDX-License-Identifier: BSD 2-Clause License
#

"""Voicemail detection for outbound calls.

A bot that places a call needs to know whether a person answered or the call
went to voicemail. :class:`VoicemailDetector` listens to what the other side
says and asks a classifier; until it has an answer, :class:`TTSGate` holds
the bot's speech back so a voicemail greeting is never talked over.

Any classifier will do. An
:class:`~pipecat.classifiers.llm.classifier.LLMClassifier` needs a service
with ``run_inference()``, so a realtime LLM cannot back the detector.
"""

import asyncio
from typing i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key