Overview
Rime provides text-to-speech synthesis (TTS) optimized for speed and quality. With LiveKit's Rime integration and the Agents framework, you can build voice AI applications that are responsive and sound realistic.
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-agents[rime]~=1.0rc"
Authentication
The Rime plugin requires a Rime API key.
Set RIME_API_KEY
in your .env
file.
Usage
Use Rime 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 rimesession = AgentSession(tts=rime.TTS(model="mist",speaker="rainforest",speed_alpha=0.9,reduce_latency=True,),# ... llm, stt, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
ID of the voice to use for speech generation. To learn more, see Voices.
Audio format to use. Valid values are: pcm
and mp3
.
Sample rate of the generated audio. Set this rate to best match your application needs. To learn more, see Recommendations for reducing response time.
Adjusts the speed of speech. Lower than 1.0
results in faster speech; higher than 1.0
results in slower speech.
When set to true
, turns off text normalization to reduce the amount of time spent preparing input text for TTS inference. This might result in the mispronunciation of digits and abbreviations. To learn more, see Recommendations for reducing response time.
When set to true
, allows the use of custom pronunciation strings in text. To learn more, see Custom pronunciation.
Rime API Key. Required if the environment variable isn't set.
Customizing pronunciation
Rime TTS supports customizing pronunciation. To learn more, see Custom Pronunciation guide.
Additional resources
The following resources provide more information about using Rime with LiveKit Agents.
Python package
The livekit-plugins-rime
package on PyPI.
Plugin reference
Reference for the Rime TTS plugin.
GitHub repo
View the source or contribute to the LiveKit Rime TTS plugin.
Rime docs
Rime TTS docs.
Voice AI quickstart
Get started with LiveKit Agents and Rime TTS.