> ## Documentation Index
> Fetch the complete documentation index at: https://daily-docs-pr-4892.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Wavix

> Frame serializer for the Wavix WebSocket media streaming protocol

export const CommunityMaintained = ({maintainer, maintainerUrl, repo}) => <Note>
    <strong>Community-maintained integration.</strong> This service is built and
    maintained by{" "}
    <a href={maintainerUrl} target="_blank" rel="noreferrer">
      {maintainer}
    </a>
    . Pipecat does not test or officially support it. Please report issues and
    request changes on the{" "}
    <a href={repo} target="_blank" rel="noreferrer">
      source repository
    </a>
    . Learn more about{" "}
    <a href="/api-reference/server/services/community-integrations">
      community integrations
    </a>
    .
  </Note>;

<CommunityMaintained maintainer="wavix" maintainerUrl="https://github.com/wavix" repo="https://github.com/wavix/pipecat-wavix" />

## Overview

`WavixFrameSerializer` converts audio between Pipecat frames and the
[Wavix](https://wavix.com/) WebSocket media stream format, enabling bidirectional
audio streaming between a Pipecat pipeline and Wavix telephony. It is used with
`FastAPIWebsocketTransport` to build voice-enabled applications over Wavix calls.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/wavix/pipecat-wavix">
    Source code, examples, and issues for the Wavix integration
  </Card>

  <Card title="PyPI Package" icon="cube" href="https://pypi.org/project/pipecat-wavix/">
    The `pipecat-wavix` package on PyPI
  </Card>

  <Card title="Wavix" icon="book" href="https://wavix.com/">
    Wavix telephony platform and developer documentation
  </Card>

  <Card title="Create Account" icon="key" href="https://docs.wavix.com/getting-started/create-account">
    Sign up for a Wavix account and provision a phone number
  </Card>
</CardGroup>

## Installation

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

```bash theme={null}
pip install pipecat-wavix
```

## Prerequisites

### Wavix Account Setup

Before using the Wavix serializer, you need:

1. **Wavix Account**: Sign up at [Wavix](https://docs.wavix.com/getting-started/create-account)
2. **Phone Number**: Provision a Wavix phone number with voice capabilities

### Required Environment Variables

* `WAVIX_API_KEY`: Your Wavix API key

The example bots in the source repository also use `OPENAI_API_KEY`,
`DEEPGRAM_API_KEY`, and `CARTESIA_API_KEY` for the speech and LLM services in the
pipeline.

## Configuration

The serializer is constructed with a `stream_id` and an optional `InputParams`
object.

<ParamField path="stream_id" type="str" required>
  The Wavix media stream identifier, used to address outbound messages.
</ParamField>

<ParamField path="params" type="WavixFrameSerializer.InputParams" default="None">
  Serializer configuration. Defaults to `WavixFrameSerializer.InputParams()`
  when not provided. See [Input Parameters](#input-parameters) below.
</ParamField>

### Input Parameters

Configuration passed via the `params` constructor argument using
`WavixFrameSerializer.InputParams(...)`.

| Parameter           | Type            | Default     | Description                                                                |
| ------------------- | --------------- | ----------- | -------------------------------------------------------------------------- |
| `wavix_sample_rate` | `int`           | `24000`     | The WebSocket wire sample rate expected by Wavix.                          |
| `sample_rate`       | `Optional[int]` | `None`      | The internal Pipecat input sample rate. Typically `16000` for STT and VAD. |
| `audio_track`       | `Optional[str]` | `"inbound"` | Track filter applied to inbound media. Set to `None` to disable filtering. |

<Note>
  Wavix uses a fixed media format: PCM16, 24 kHz, mono, little-endian, 20 ms
  frames. See the [source repository](https://github.com/wavix/pipecat-wavix)
  for the authoritative, up-to-date list of parameters.
</Note>

## Usage

Wire the serializer into a `FastAPIWebsocketTransport`:

```python theme={null}
from pipecat_wavix import WavixFrameSerializer
from pipecat.transports.network.fastapi_websocket import (
    FastAPIWebsocketTransport,
    FastAPIWebsocketParams,
)

WAVIX_SAMPLE_RATE = 24000
BOT_SAMPLE_RATE = 16000

serializer = WavixFrameSerializer(
    stream_id=stream_id,
    params=WavixFrameSerializer.InputParams(
        wavix_sample_rate=WAVIX_SAMPLE_RATE,
        sample_rate=BOT_SAMPLE_RATE,
        audio_track="inbound",
    ),
)

transport = FastAPIWebsocketTransport(
    websocket=websocket,
    params=FastAPIWebsocketParams(
        audio_in_enabled=True,
        audio_in_passthrough=True,
        audio_in_sample_rate=BOT_SAMPLE_RATE,
        audio_out_enabled=True,
        audio_out_sample_rate=WAVIX_SAMPLE_RATE,
        add_wav_header=False,
        serializer=serializer,
        audio_out_10ms_chunks=2,
        fixed_audio_packet_size=960,
    ),
)
```

Outbound audio is automatically converted to Wavix's required format: PCM16,
24 kHz, mono, little-endian, 20 ms frames. See the
[source repository](https://github.com/wavix/pipecat-wavix) for complete
`server.py` and `bot.py` examples, including webhook handling and call control.

## Compatibility

Built against `pipecat-ai==0.0.105` (per the package dependencies). Check the
[source repository](https://github.com/wavix/pipecat-wavix) for the latest tested
version and changelog.
