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 AI voice applications that are responsive and sound realistic.
If you're looking to build an AI voice assistant with Rime, check out our Voice Agent Quickstart guide and use the Rime TTS module as demonstrated below.
Quick reference
The following sections provide a quick reference for integrating RIME TTS with LiveKit. For the complete reference, see the links provivded in each section.
TTS
LiveKit's Rime integration provides a text-to-speech (TTS) interface. This can be used in a VoicePipelineAgent
or as a standalone speech generator.
Usage
Create an instance of Rime TTS:
from livekit.plugins.rime import TTSrime_tts = TTS(model="mist",speaker="rainforest",speed_alpha=0.9,reduce_latency=True,)
Parameters
This section describes some of the available parameters. For a complete reference of all available parameters, see the plugin reference.
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.