Skip to main content

pipecat-chariot

Chariot text-to-speech for Pipecat.

ChariotTTSService is a drop-in Pipecat TTSService backed by Chariot, which serves lifelike voices for Indian languages and English. Audio streams back as 16-bit mono PCM while the server is still generating, so playback starts before synthesis finishes.

This integration is built and maintained by Chariot, the company providing the service.

Pipecat compatibility

Tested with Pipecat v1.10.0. The package requires pipecat-ai>=1.7,<2 and Python 3.11 or newer, which is Pipecat's own floor.

Installation

uv add pipecat-chariot

or

pip install pipecat-chariot

Prerequisites

  1. Create an account at platform.chariot.in. New accounts include free credits.
  2. Copy an API key from the console.
  3. Optionally pick a voice from GET https://api.chariot.in/v1/voices. Without one the service uses a Chariot stock voice, so the example below runs on the API key alone.
export CHARIOT_API_KEY="your-api-key"
export CHARIOT_VOICE_ID="your-voice-uuid"   # optional

Usage

import os

from pipecat.pipeline.pipeline import Pipeline
from pipecat_chariot import ChariotTTSService

tts = ChariotTTSService(
    api_key=os.getenv("CHARIOT_API_KEY"),
    settings=ChariotTTSService.Settings(
        voice=os.getenv("CHARIOT_VOICE_ID"),
    ),
)

pipeline = Pipeline(
    [
        transport.input(),
        stt,
        user_aggregator,
        llm,
        tts,
        transport.output(),
        assistant_aggregator,
    ]
)

Configuration

Constructor parameters

Parameter Type Default Description
api_key str required Chariot API key. Falls back to CHARIOT_API_KEY.
voice_id str | None stock voice Voice UUID from GET /v1/voices. settings.voice takes precedence.
base_url str wss://api.chariot.in Override for a non-production endpoint.
sample_rate int | None 44100 Output rate in Hz. Chariot streams 44.1 kHz; a mismatch logs a warning.
model str | None account default Chariot TTS model. settings.model takes precedence.
speed float | None voice as recorded Speaking rate, one of the voice's pre-encoded rates. settings.speed takes precedence.
optimize_streaming_latency int 0 Latency optimization level, 0 to 4. Higher trades quality passes for speed.

Settings

Pass through ChariotTTSService.Settings(...). Updatable at runtime with TTSUpdateSettingsFrame.

Parameter Type Default Description
voice str stock voice Voice UUID.
model str | None account default Chariot TTS model.
speed float | None voice as recorded Speaking rate, one of the voice's pre-encoded rates.

Speaking rates are pre-encoded per voice and per model, so speed takes one of a fixed set rather than any value in a range; GET /v1/voices lists what each voice offers under each model. Voice, model and speed are fixed for the life of a session, because the voice codes they select are sent once at connect. Changing any of them reconnects, which the service handles for you. Leaving model or speed unset uses your account default, so a newly released model works without upgrading this package.

There is no language parameter. Any voice speaks any supported language, so the audio follows the text.

Run the example

The example is a full voice agent: Chariot speaks, and you can interrupt it mid-sentence.

git clone https://github.com/Chariot-AI/pipecat-chariot.git
cd pipecat-chariot
uv venv && uv pip install -e ".[dev]"
uv pip install "pipecat-ai[openai,silero,webrtc,runner]"
cp .env.example .env    # add CHARIOT_API_KEY and OPENAI_API_KEY
uv run python examples/voice_chariot.py

The example runs in the browser over WebRTC, so it needs no third party transport account. Open the URL it prints, allow the microphone, and talk. Speech to text and the LLM use OpenAI; swap in any Pipecat services you prefer.

ChariotTTSService itself is transport agnostic. It sits between the LLM and transport.output() and never sees the transport, so it works with any of them: Daily, LiveKit, telephony, WebSocket. The example demos WebRTC because that needs no account; to try another, add its key to transport_params and install its extra.

How it behaves

  • Streaming: audio frames are yielded while the server is still generating. Output is 16-bit mono PCM at 44.1 kHz, and every frame carries the rate the server declares in its audio.start event.
  • Interruptions: built on InterruptibleTTSService, the base class for websocket TTS services that support neither context IDs nor a cancel message. On interruption the socket is closed, which stops server side generation immediately.
  • Long text: the server caps its un-flushed buffer, so an over long utterance is sent as several word boundary segments, each flushed on its own. One generation segment per flush, contiguous audio.
  • Keepalive: a flush with nothing buffered is a server side no-op that still resets the idle timeout, so a quiet stretch does not drop the connection.
  • Turn boundaries: audio.done marks the end of one flushed segment, not the end of the turn. The turn closes when the LLM turn has completed and every segment sent has come back, so a multi sentence reply is never cut short and BotStoppedSpeakingFrame still tracks the real end of audio.
  • Errors: failures surface as Pipecat ErrorFrames rather than hanging the pipeline. An exhausted credit balance is reported as exactly that.

Tests

uv run pytest

Changelog

See CHANGELOG.md.

License

MIT

Metadata

Release files for pipecat-chariot 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipecat-chariot 0.1.1
File Size Uploaded Provenance Actions
pipecat_chariot-0.1.1.tar.gz 16.5 kB Without provenance Details for pipecat_chariot-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-chariot 0.1.1
File Interpreter ABI Platform Actions
pipecat_chariot-0.1.1-py3-none-any.whl Python 3 none any Details for pipecat_chariot-0.1.1-py3-none-any.whl

Total release size: 28.3 kB

Release files / pipecat_chariot-0.1.1.tar.gz

Download URL pipecat_chariot-0.1.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
825132c4dd8be2f926f9fa5463e65aac9968782f7ce80167c73c97eb5203ff6f
BLAKE2b-256 checksum
How to use checksums
a84a687b0b09e21dce338cf71d74cd6d40b6fdc789ffed3d8fcd1f306e651b22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / pipecat_chariot-0.1.1-py3-none-any.whl

Download URL pipecat_chariot-0.1.1-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96811a3d6c6a5b83485b4633fe8e94c2f68ad1ac961b9df5e7975c7bdea7c4c3
BLAKE2b-256 checksum
How to use checksums
b2b4dee83cb8236f25a0142597dfe3e248f907a9f2f03dfb04460b64c64c06bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for pipecat-chariot 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page