Community-maintained integration. This service is built and maintained by atomsai (PyAI). Pipecat does not test or officially support it. Please report issues and request changes on the source repository. Learn more about community integrations.
Overview
PyAITTSService provides streamed PCM speech synthesis through PyAI Speak in a Pipecat pipeline.
Source and examples
PyAI-maintained source, Apache-2.0 license, and examples.
PyAI integration guide
Framework setup and provider configuration.
Installation
>=1.3.0,<2.0.
A two-turn audio flow was exercised with Pipecat 1.8.1; this is not qualification
of every version in that range. Version 0.1.4’s STT startup-settings correction
was checked separately from that earlier audio run. Version 0.1.5 adds the
standalone WebRTC example, public source/documentation links, and TTS session
cleanup. Its package and framework compatibility checks generate no audio.
Prerequisites
Create a PyAI account and a server-side key with thespeak:synthesize scope.
Before running audio, verify the selected project, billing environment, and
limits with GET https://api.pyai.com/v1/me. Usage is charged or limited according
to that key; Pipecat hosting, transport, and LLM costs are separate.
Required Environment Variables
PYAI_API_KEY: the server-side PyAI key. Keep it out of browser code and source control.
Configuration
PyAITTSService
Default:
None. Server-side PyAI key. When omitted, reads PYAI_API_KEY.
Raises ValueError if neither is supplied.Default:
None. Optional HTTP session owned by the caller. When omitted, the
service creates and closes its own session.Settings
Configure provider options in the constructor. The adapter initializes Pipecat settings metadata, but does not implement runtime provider-setting updates. Create a new service to change model or voice; do not pass a secondsettings= argument.
Usage
The following function builds the output part of a pipeline from existing components. See the complete WebRTC demo for transport, VAD, LLM, worker, and disconnect handling.Frames
Generated PCM is delivered inTTSAudioRawFrame objects. The Pipecat base TTS service handles text and utterance framing.