For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages can be requested by appending `.md` to the URL, or by setting the `Accept` header to `text/markdown`.
Skip to main content
Integrations and SDKsPipecat

Pipecat text to speech

Use Speechmatics text to speech voices in your Pipecat voice bots.

Use Speechmatics TTS to give your Pipecat voice bot a clear, natural voice.

Installation​

pip install "pipecat-ai[speechmatics]"

Usage​

import aiohttp

from pipecat.services.speechmatics.tts import SpeechmaticsTTSService

async with aiohttp.ClientSession() as session:
tts = SpeechmaticsTTSService(
api_key="YOUR_API_KEY",
voice_id="sarah",
aiohttp_session=session,
)

Configuration​

ParameterTypeDefaultDescription
api_keystringenv varSpeechmatics API key (defaults to SPEECHMATICS_API_KEY)
voice_idstring"sarah"Voice to use
base_urlstringservice defaultBase URL for the Speechmatics TTS endpoint
aiohttp_sessionaiohttp.ClientSessionnoneReuse a session for connection pooling and lower latency

For available voices and detailed TTS options, see the Text to speech quickstart.

Next steps​