Skip to main content

SILMA AI plugin for LiveKit Agents

Support for English and Arabic speech synthesis with SILMA AI TTS v2 — Modern Standard Arabic, the Saudi (Najdi) dialect, and English.

This plugin is maintained by SILMA AI and published independently of the LiveKit Agents repository.

Installation

pip install livekit-plugins-silma

Requires livekit-agents>=1.8.

Pre-requisites

You'll need an API key from SILMA. Set it as an environment variable:

export SILMA_API_KEY="..."

Usage

from livekit.agents import AgentSession
from livekit.plugins import silma

session = AgentSession(
    tts=silma.TTS(
        model="silma-tts-v2-msa",
        voice="omar",
    ),
    # ... stt, llm, vad
)

Models and voices

Model Language Voices
silma-tts-v2-english English james, emma, isabella, oliver
silma-tts-v2-msa Modern Standard Arabic abdulaziz, fahd, layla, maryam, nouf, noura, omar, reema, yusuf, khalid
silma-tts-v2-ksa Arabic, Saudi (Najdi) dialect same as MSA

Cloned voices

Upload a voice under Custom Voices at https://app.silma.ai/voices and pass its id along with your user id:

silma.TTS(
    model="silma-tts-v2-ksa",
    voice="omar",
    user_id="...",
    custom_audio_id="voice_1769817467123",
)

Pronunciation hints

SILMA reads phone numbers, emails and links correctly when they are tagged in the text:

await session.say(
    "You can reach us on <STAG_PN>92005455</STAG_PN> or at <STAG_EMAIL>hi@silma.ai</STAG_EMAIL>."
)

The plugin keeps these tags intact when it splits text, so a tag is never cut in half across two requests.

Account-level pronunciation overrides configured at https://app.silma.ai/control are applied when you pass user_id and enable_server_pronunciation_overrides=True.

How it works

stream() uses the realtime WebSocket API (wss://api.silma.ai/tts/v2/ws/stream) and sentence-tokenizes incoming LLM text so each request is a complete utterance. synthesize() uses the binary streaming endpoint (POST /stream).

SILMA caps text at 250 characters per request, so longer input is split on word boundaries and sent as sequential requests concatenated into one audio segment.

SILMA returns a 24 kHz mono float32 waveform; the plugin converts it to 16-bit PCM for the agent pipeline.

Development

pip install -e ".[dev]"
pytest

License

Apache-2.0

Metadata

Release files for livekit-plugins-silma 0.1.0

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

Source distribution (sdist)

Source distribution for livekit-plugins-silma 0.1.0
File Size Uploaded Provenance Actions
livekit_plugins_silma-0.1.0.tar.gz 23.3 kB Without provenance Details for livekit_plugins_silma-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-silma 0.1.0
File Interpreter ABI Platform Actions
livekit_plugins_silma-0.1.0-py3-none-any.whl Python 3 none any Details for livekit_plugins_silma-0.1.0-py3-none-any.whl

Total release size: 43.7 kB

Release files / livekit_plugins_silma-0.1.0.tar.gz

Download URL livekit_plugins_silma-0.1.0.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4c0e853466d8bfb3c995441f04d63fb0849249c3e370a05a6480ba734be2e3d1
BLAKE2b-256 checksum
How to use checksums
fde5f96b4769885b64b791c02eb23328c8907d1d0a65371e9707bd0d3f17220f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Release files / livekit_plugins_silma-0.1.0-py3-none-any.whl

Download URL livekit_plugins_silma-0.1.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
719ccfeaba08c2eb5f27f7a2dce69c6b7bb6ce5d1573a6072928b5c6e2e53807
BLAKE2b-256 checksum
How to use checksums
d8046ad0f86e6f022538ebf8a8af1b7a6812375bdbe946d88101abb27018fe99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Security for livekit-plugins-silma 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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