Rime AI TTS
The Rime AI TTS provider enables your agent to use Rime AI's high-quality text-to-speech models for generating natural-sounding voice output.
Installation​
Install the Rime AI-enabled VideoSDK Agents package:
pip install "videosdk-plugins-rime"
Importing​
from videosdk.plugins.Rime import RimeTTS
Authentication​
The Rime plugin requires an Rime API key.
Set RIME_API_KEY
in your .env
file.
Example Usage​
from videosdk.plugins.Rime import RimeTTS
from videosdk.agents import CascadingPipeline
# Initialize the Rime AI TTS model
tts = RimeTTS(
speaker="river",
model_id="mist",
lang="eng",
speed_alpha=1.0
)
# Add tts to cascading pipeline
pipeline = CascadingPipeline(tts=tts)
When using .env file for credentials, don't pass them as arguments to model instances or context objects. The SDK automatically reads environment variables, so omit api_key
and other credential parameters from your code.
Configuration Options​
speaker
: (str) Voice ID to use (default:"river"
). Must match the model's available speakers.model_id
: (str) Rime model identifier (default:"mist"
). Supported:"mist"
,"mistv2"
.lang
: (str) Language code for the voice (default:"eng"
).speed_alpha
: (float) Controls speaking rate (1.0
is normal speed).reduce_latency
: (bool) Whether to minimize streaming delay (default:False
).pause_between_brackets
: (bool) Insert pauses around bracketed text (default:False
).phonemize_between_brackets
: (bool) Use phonemes for bracketed text (default:False
).inline_speed_alpha
: (str) Optional per-word speed override (e.g.,"1.2,1.0,0.8"
).api_key
: (str) Rime API key. Can also be set via theRIME_API_KEY
environment variable.
Additional Resources​
The following resources provide more information about using Rime with VideoSDK Agents SDK.
-
Python package: The
videosdk-plugins-rime
package on PyPI. -
GitHub repo: View the source or contribute to the VideoSDK Rime AI TTS plugin.
-
Rime AI docs: Rime AI docs.
Got a Question? Ask us on discord