Pipecat
This guide walks you through integrating Smallest AI TTS into a Pipecat voice pipeline. Pipecat is an open-source Python framework for building real-time voice and multimodal conversational AI agents using a frame-based architecture.
Code Examples Repository
You can find the full example for this setup in the Pipecat repository:
Pipecat Example — Smallest AI TTS
Common Steps
1. Create a Virtual Environment
To ensure your Python environment is isolated, create a virtual environment:
Activate the virtual environment:
-
On Linux/Mac:
-
On Windows:
2. Install Pipecat with Smallest AI support
Install the pipecat-ai package with the smallest extra, which includes WebSocket streaming support:
For running the full voice-agent example with Daily transport, also install:
3. Set Up a Daily Room
Pipecat uses Daily as its WebRTC transport layer. Sign in at Daily Dashboard and create a room to get a room URL and API key.
4. Create a .env File
Create a .env file in the project root directory with the following keys:
Usage
Initialising SmallestTTSService
Import and configure the service in your Pipecat pipeline:
Available configuration options:
Running the Full Voice Agent Example
The example script at examples/foundational/07zl-interruptible-smallest.py sets up a complete interruptible voice bot using:
- STT: Deepgram (real-time WebSocket transcription)
- LLM: OpenAI GPT-4o
- TTS: Smallest AI Lightning v3.1 (WebSocket streaming)
- Transport: Daily WebRTC
Run it with:
Or connect to a specific Daily room directly:
Notes
- The
SmallestTTSServiceuses WebSocket streaming for low-latency, real-time audio delivery — ideal for live voice agents. - The service is interruptible: if a user speaks while the bot is talking, audio generation stops immediately and the pipeline re-engages.
- Ensure that you have added the correct API keys in the
.envfile before running the scripts. - For any issues or questions, feel free to open an issue in the Pipecat repository or contact us on Discord.

