> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AwaazAI Frame Serializer

> AwaazAIFrameSerializer converts between Pipecat frames and Awaaz AI's telephony WebSocket streaming protocol.

> [!NOTE]
>
> **Community-maintained integration.** This service is built and
> maintained by
> [awaazde](https://github.com/awaazde)
> . Pipecat does not test or officially support it. Please report issues and
> request changes on the
> [source repository](https://github.com/awaazde/pipecat-awaazai)
> . Learn more about
> [community integrations](https://docs.pipecat.ai/api-reference/server/services/community-integrations.md)
> .

## Overview

`AwaazAIFrameSerializer` converts between Pipecat frames and the [Awaaz AI](https://www.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.

> [card] [Source Repository](https://github.com/awaazde/pipecat-awaazai)
>
> Source code, examples, and issues for the Awaaz AI integration

> [card] [PyPI Package](https://pypi.org/project/pipecat-awaazai/)
>
> The `pipecat-awaazai` package on PyPI

> [card] [Awaaz AI](https://www.awaaz.ai/)
>
> Learn about Awaaz AI's telephony stack and request a demo number

> [card] [Documentation](https://docs.awaaz.de/)
>
> Awaaz AI voice hosting docs and message formats

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-awaazai
```

## Prerequisites

To host an agent on the Awaaz AI telephony stack you need:

1. **Awaaz AI phone number**: Purchase a phone number from
   [Awaaz AI](https://www.awaaz.ai/). Request a demo number via the
   [Book a Demo form](https://www.awaaz.ai/#Book-Demo).
2. **A public websocket endpoint**: Expose your bot's websocket so Awaaz AI can
   connect to it (for example, by tunneling with `ngrok` during development).

The serializer itself does not require any API keys. The provider's message
formats are documented in the [Awaaz AI docs](https://docs.awaaz.de/).

## Configuration

Constructor parameters for `AwaazAIFrameSerializer`:

**stream\_sid** `str` *required*

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.

**params** `AwaazAIFrameSerializer.InputParams` (default: InputParams())

Optional serializer input parameters. See [InputParams](#inputparams) below.

### InputParams

Passed via the `params` 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. |

> [!NOTE]
>
> See the [source repository](https://github.com/awaazde/pipecat-awaazai) for
> the authoritative, up-to-date list of parameters and message formats.

## Usage

Wire the serializer into a `FastAPIWebsocketTransport`. The `stream_sid` is read
from the initial websocket `start` message Awaaz AI sends when a call connects.

```python theme={null}
from pipecat_awaazai import AwaazAIFrameSerializer
from pipecat.transports.websocket.fastapi import (
    FastAPIWebsocketTransport,
    FastAPIWebsocketParams,
)

serializer = AwaazAIFrameSerializer(stream_sid=stream_id)

transport = FastAPIWebsocketTransport(
    websocket=websocket_client,
    params=FastAPIWebsocketParams(
        audio_in_enabled=True,
        audio_out_enabled=True,
        add_wav_header=False,
        serializer=serializer,
    ),
)
```

See the [source repository](https://github.com/awaazde/pipecat-awaazai) for a
complete `bot.py` example, including parsing `stream_sid` from the initial
websocket messages and running the bot behind an `ngrok` tunnel.

## Compatibility

Tested with Pipecat v0.0.101 and Python 3.10+. Check the [source
repository](https://github.com/awaazde/pipecat-awaazai) for the latest tested
version and changelog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.