Prerequisites
For this guide you will need a Rime API token. To get a token, create a free Rime account. Then, from the Rime dashboard, navigate to the API Tokens page and copy the API key for later use. We will be using Python to send requests to the Rime API so install Python 3.10 or later.Set Up Your Environment
Create a virtual environment to keep your project dependencies isolated.Create Your Python Script
Create a file calledrime_hello_world.py and import the requests library.
text- The text to convert to speechspeaker- The voice to use (see voices)modelId- Usearcanafor the most realistic voices, ormistv2for faster synthesis
Choose a Voice
Rime offers a range of voices with different personalities. To change the voice, update thespeaker parameter in your request.
Custom Pronunciation
Themistv2 model offers a way to specify pronunciation of brand names or uncommon words using Rime’s phonetic alphabet. Add the custom pronunciation in curly brackets and set phonemizeBetweenBrackets to true:
Next Steps
Now that you can generate TTS audio, the next guide will explore how to enable a real-time conversation between you and an agent. Before that, check out these resources to get more familiar with Rime:- Models - Compare Arcana (realistic) vs Mist v2 (fast)

