Skip to main content

Spitch TTS integration guide

How to use the Spitch TTS plugin for LiveKit Agents.

Overview

Spitch provides AI-powered speech and language solutions optimized for African languages. With LiveKit's Spitch integration and the Agents framework, you can build voice AI agents that produce natural speech in a variety of African languages.

Quick reference

This section provides a quick reference for the Spitch TTS plugin. For more information, see Additional resources.

Installation

Install the plugin from PyPI:

pip install "livekit-agents[spitch]~=1.0"

Authentication

The Spitch plugin requires a Spitch API key.

Set SPITCH_API_KEY in your .env file.

Usage

Use Spitch TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.plugins import spitch
session = AgentSession(
tts=spitch.TTS(
language="en",
voice="lina",
)
# ... llm, stt, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

languagestringOptionalDefault: en

Language short code for the generated speech. For supported values, see Spitch languages.

voicestringOptionalDefault: lina

Voice to use for synthesis. For supported values, see Spitch voices.

Additional resources

The following resources provide more information about using Spitch with LiveKit Agents.