This guide shows you how to generate your first audio clip with Rime’s text-to-speech (TTS) API and experiment with different voices and speech customizations.Documentation Index
Fetch the complete documentation index at: https://docs.rime.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
To follow this guide, you need:- A Rime API token: Create a free Rime account and copy your API key from the API Tokens page.
- A language runtime, depending on which tab you follow:
- cURL — just a terminal (preinstalled on macOS and Linux).
- Python — Python 3.10 or later.
- JavaScript — Node.js 18 or later.
- TypeScript — Node.js 18+ plus tsx (
npm install -g tsx).
Create your script
If you’d rather paste a working file and read along, grab the full script below. Otherwise, continue step-by-step.Full script
Create a file calledrime_hello_world.py, rime_hello_world.js, or rime_hello_world.ts (or run the cURL version directly in your terminal) and paste the full script:
Full script (copy/paste)
Full script (copy/paste)
Step-by-step code
Create a file calledrime_hello_world.py, rime_hello_world.js, or rime_hello_world.ts and import the required library modules:
textadds the text that the model converts to speech.speakersets the voice that the agent uses (view your options on our Voices page).modelIdspecifies which model the agent uses. Usecodafor our most realistic flagship voices, ormistv3for fast synthesis with the classic Mist lineup.
POST request to the Rime API and write the streamed audio response to a file:
Test the script
Run your script from the terminal:Choose a voice
Rime offers a range of voices with different personalities. To change the voice, update thespeaker parameter in your request:
Custom pronunciation
Custom pronunciation is supported on Mist v1 and v2 only. Coda, Arcana, and Mist v3 do not support
phonemizeBetweenBrackets yet.mistv2 model lets you specify the 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, try following the LiveKit quickstart guide to learn how you can set up a real-time conversation with an agent. Check out these resources to get more familiar with Rime:Models
Compare Coda (flagship) and Mist v3 (fast)
Voices
Browse all available voice options
Latency
Optimize for real-time performance
Coda Streaming API
Stream audio with our flagship model

