Overview
AwaazAIFrameSerializer converts between Pipecat frames and the Awaaz AI
telephony media stream, enabling real-time voice agents over a websocket. It is
designed to be wired into a FastAPIWebsocketTransport so you can host a Pipecat
agent on Awaaz AI’s telephony stack and reach it over an Indian phone number.
Source Repository
Source code, examples, and issues for the Awaaz AI integration
PyPI Package
The
pipecat-awaazai package on PyPIAwaaz AI
Learn about Awaaz AI’s telephony stack and request a demo number
Documentation
Awaaz AI voice hosting docs and message formats
Installation
This is a community-maintained package distributed separately frompipecat-ai:
Prerequisites
To host an agent on the Awaaz AI telephony stack you need:- Awaaz AI phone number: Purchase a phone number from Awaaz AI. Request a demo number via the Book a Demo form.
- A public websocket endpoint: Expose your bot’s websocket so Awaaz AI can
connect to it (for example, by tunneling with
ngrokduring development).
Configuration
Constructor parameters forAwaazAIFrameSerializer:
The Awaaz AI stream identifier for the call. It is included in the outgoing
media and clear events sent back to Awaaz AI. Typically parsed from the
initial websocket start message.Optional serializer input parameters. See InputParams below.
InputParams
Passed via theparams constructor argument using
AwaazAIFrameSerializer.InputParams(...).
| Parameter | Type | Default | Description |
|---|---|---|---|
awaaz_ai_sample_rate | int | 8000 | Sample rate of the Awaaz AI media stream. |
sample_rate | int | 8000 | Sample rate used for deserialized inbound audio. |
See the source repository for
the authoritative, up-to-date list of parameters and message formats.
Usage
Wire the serializer into aFastAPIWebsocketTransport. The stream_sid is read
from the initial websocket start message Awaaz AI sends when a call connects.
bot.py example, including parsing stream_sid from the initial
websocket messages and running the bot behind an ngrok tunnel.