Overview
Smallest AI provides a TTS platform called Waves, which turns text into natural-sounding speech. With LiveKit's Smallest AI integration, you can convert text to audio in real time, choose different voices, and control output format and quality for your agents.
To learn more about TTS and generating agent speech, see Agent speech.
Quick reference
This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.
Installation
Install the plugin from PyPI:
pip install livekit-plugins-smallestai
Authentication
The Smallest AI plugin requires an API key.
Set SMALLEST_API_KEY
in your .env
file.
Usage
Use Smallest AI 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 smallestaisession = AgentSession(tts=smallestai.TTS(voice_id="irisha",sample_rate=24000,output_format="pcm",),# ... llm, stt, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
Model to use.
The voice ID for synthesis. Must be a valid Smallest AI voice identifier.
Target audio sample rate in Hz. Match the rate to the rest of your audio pipeline to avoid resampling artifacts.
Encoding format for synthesized audio. Select a format based on if you want raw audio for streaming/processing or compressed for storage/playback.
Additional resources
The following resources provide more information about using Smallest AI with LiveKit Agents.
Python package
The livekit-plugins-smallestai
package on PyPI.
Plugin reference
Reference for the Smallest AI TTS plugin.
GitHub repo
View the source or contribute to the LiveKit Smallest AI TTS plugin.
Smallest AI docs
Smallest AI's Waves TTS docs.
Voice AI quickstart
Get started with LiveKit Agents and Smallest AI TTS.