Skip to main content

Overview

ReadAloud is a streaming text-to-speech API built for voice agents and phone calls. ReadAloudHttpTTSService streams audio from the ReadAloud HTTP endpoint as it is generated, so a pipeline can start speaking within a few hundred milliseconds. It outputs 24 kHz, 16 kHz or 8 kHz PCM and mu-law or A-law, which suits Twilio and Telnyx media streams. The integration is maintained by the author of ReadAloud, the speech API provider.

Source Repository

Source code, runnable example and changelog

PyPI Package

The pipecat-readaloud package on PyPI

Installation

Last tested with Pipecat 1.12.0. The package requires pipecat-ai>=1.12,<2.

Prerequisites

  • A ReadAloud API key from readaloudai.org/developers. New keys include a small free allowance.
  • Set READALOUD_API_KEY in your application environment.

Configuration

Additional keyword arguments pass to Pipecat’s TTSService. voice and speed are runtime settings: change them with ReadAloudHttpTTSService.Settings(voice="default", speed=1.1) inside a TTSUpdateSettingsFrame(delta=...).

Usage

On interruption Pipecat cancels the in-flight synthesis and the connection is closed, which stops generation on the server. Capacity errors (HTTP 503 and 429) and 502/504 responses are retried with backoff until the first audio byte; authentication, quota and unknown-voice errors surface immediately as an ErrorFrame. The API returns no word timestamps, so TTSTextFrames are not time-aligned. See the source repository for a single-file runnable example that needs only a ReadAloud API key, plus the changelog.