Overview
SilmaTTSService provides low-latency real-time text-to-speech Pipecat integration via a WebSocket API.
It streams audio from SILMA TTS over a WebSocket you can
play through any Pipecat transport.
SILMA selects the language by model rather than by a language parameter:
silma-tts-v2-english— Englishsilma-tts-v2-msa— Modern Standard Arabicsilma-tts-v2-ksa— Arabic in the Saudi (Najdi) dialect
Source Repository
Package source, the foundational example, and issue tracker
PyPI Package
The
pipecat-silma package on PyPISILMA AI
Product overview, voices, and the TTS playground
API Keys
Create and manage your SILMA API keys
Installation
Install the community package. It is published separately frompipecat-ai:
Prerequisites
Account and API key
Set it in the environment:Configuration
str
default:"None"
SILMA API key. If omitted, the service reads
SILMA_API_KEY.SilmaTTSService.Settings
default:"None"
Model, voice, and prosody. See Settings. Every field is also
available as a direct constructor argument.
str
default:"https://api.silma.ai/tts/v2"
Override this only for a non-production SILMA endpoint. The WebSocket URL is
derived from it, so
http:// becomes ws:// for a local mock server.float
default:"20.0"
How often to ping an idle connection, in seconds. It has to stay comfortably
inside the read timeout of whatever proxy fronts the API — lower it if yours
is shorter than the default assumes. Getting it wrong is not fatal: the next
utterance reopens the socket, at the cost of a reconnect on its first word.
int
default:"None"
SILMA renders 24 kHz audio and takes no sample-rate parameter, so the service
pins its rate at
24000. Leave this unset; passing anything other than
24000 raises ValueError rather than mislabelling the audio. Let the output
transport resample if it needs a different rate.Settings
Pass these throughSilmaTTSService.Settings(...). They can also be updated
while the pipeline is running, with TTSUpdateSettingsFrame.
creativity and speed are omitted from the request entirely unless you set
them, so SILMA’s own defaults apply.
Models and voices
Voice catalogs and model coverage can change. See
app.silma.ai or API specification for the current list.
Usage
Pronunciation hints
SILMA reads phone numbers, email addresses and links correctly when they are tagged in the text:user_id and enable_server_pronunciation_overrides=True.
Cloned voices
Upload a voice under Custom Voices at app.silma.ai/voices, then pass its id together with your user id:voice you pair it with does not
matter.
Interruptions
SilmaTTSService extends InterruptibleTTSService. SILMA’s protocol has no
cancel message, so speech is stopped by dropping the socket and reconnecting —
which the service does without blocking the frame that clears buffered audio, so
a barge-in takes effect immediately rather than after the teardown completes.
Compatibility
Tested with Pipecat 1.8.1 (pipecat-ai>=1.8.1), on Python 3.11 and later.