Skip to main content

Overview

Maya Research maintains this integration for its text-to-speech API. Use MayaTTSService for conversational agents: it keeps a WebSocket open across turns, streams audio as it arrives, and cancels the active turn when the user interrupts. MayaHttpTTSService uses the HTTP streaming API. Both services support Maya 2 Native and Maya Calyx. The package handles the wire protocol, text chunks, and conversion to Pipecat audio frames. You can use it with an existing STT, LLM, and transport.

Source Repository

Installation, runnable examples, tests, and issue tracker

Maya API Reference

Current models, voices, languages, formats, and API behavior

Installation

Install the community package from its versioned Git release:
Or install into an existing Python environment:

Prerequisites

Request an API key from Maya Research, then set MAYA_API_KEY in the server environment. Keep the key out of browser code.

Configuration

Pass an API key and optional runtime settings to either service:

Settings

Pass these through MayaTTSService.Settings(...) or MayaHttpTTSService.Settings(...). Use a TTSUpdateSettingsFrame to change them during a conversation. Maya 2 Native offers Ananya and Arjun. Maya Calyx has a separate voice roster, including Aarav and Tarini. When changing models, change the voice in the same settings update. See the Maya API reference for the complete voice catalog. Clear a Native-only speed setting with speed=None when switching to Calyx. On Native, speed=None or speed=1.0 restores normal speed. Supported language codes are hi, bn, gu, kn, ml, mr, or, pa, ta, te, and en. en is Indian English. Leave language=None for mixed-language text. An explicit language that does not match the text can produce the wrong pronunciation even when the API accepts the request.

HTTP synthesis

Use the HTTP service in the same pipeline position:
Maya Calyx supports HTTP audio at 8, 16, and 24 kHz, with PCM or G.711 mu-law encoding. Maya 2 Native produces 24 kHz PCM. The integration converts provider audio to the PCM frames expected by Pipecat. See the package documentation for transport and audio-format options.

Usage

Place the service after your LLM and before your transport output. Keep the assistant context aggregator after the output transport:
The surrounding transport, stt, llm, and context_aggregator are your existing pipeline components. For a complete runnable example, follow the package README.

Text chunks and interruptions

Use the default sentence aggregation for streamed LLM output. The WebSocket service associates chunks with their Pipecat context and closes the turn when text generation finishes. Callers do not need to manage Maya context IDs, continuation flags, or cancellation messages. Use Pipecat’s interruption handling so playback stops as soon as the user interrupts. The service cancels generation and discards late audio for the interrupted context. Stopping generation alone cannot remove audio that a custom client has already buffered. Send plain text. Maya reads SSML and markup literally; use Pipecat’s text processing when your LLM produces markup. Maya does not provide word timestamps, so the integration cannot report exact word-level playback timing.
Validation found incomplete sentences in some Calyx/Amit HTTP responses. The package documents the provider-level reproduction and the tested Native default in its validation report. API acceptance is not a guarantee of voice or language quality.

Compatibility

This release requires and pins Pipecat v1.8.1. Check compatibility before adding it to an environment that requires another Pipecat version. See the package repository for the tested Python versions, release changelog, and validation results.