Skip to main content
curl --request POST \
  --url https://users.rime.ai/v1/rime-tts \
  --header 'Accept: audio/webm;codecs=opus' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --output output.webm \
  --fail \
  --data '{
  "text": "Hello from Rime!",
  "modelId": "arcana",
  "speaker": "astra",
  "lang": "eng",
  "samplingRate": 24000,
  "speedAlpha": 1
}'
The streaming endpoint returns audio bytes in the format specified by the Accept header.

Audio Formats

Set the Accept header to one of the following values:
FormatAccept HeaderNotes
Opus (WebM)audio/webm;codecs=opusRecommended. Opus offers excellent compression. WebM streams natively in browsers.
Opus (OGG)audio/ogg;codecs=opusOpus offers excellent compression. OGG container.
MP3audio/mp3Lower compression rate than Opus. Highest compatibility across devices and players.
WAVaudio/wavUncompressed. RIFF WAVE header with 16-bit little-endian linear PCM samples. Streams natively in browsers.
PCMaudio/pcmHeaderless 16-bit little-endian linear PCM.
G.711 μ-lawaudio/x-mulawHeaderless stream of audio bytes.

Variable Parameters

speaker
string
required
Must be one of the flagship Arcana voices listed in our documentation.
text
string
required
The text you’d like spoken. Unlimited via API. Character limit per request is 3,000 in the dashboard UI.
modelId
string
Choose arcana for Rime’s most realistic conversational voices.
lang
string
default:"eng"
If provided, the language must match the language spoken by the provided speaker. This can be checked in our voices documentation.
samplingRate
int
default:"24000"
The sampling rate (Hz).
  • On-cloud: Accepted values: 8000, 16000, 22050, 24000, 44100, 48000, 96000. Anything above 24000 is up sampling.
  • On-prem: Any value is accepted.
speedAlpha
float
default:"1"
The time scaling factor.A value below 1 slows down the audio, a value above 1 speeds up the audio.
curl --request POST \
  --url https://users.rime.ai/v1/rime-tts \
  --header 'Accept: audio/webm;codecs=opus' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --output output.webm \
  --fail \
  --data '{
  "text": "Hello from Rime!",
  "modelId": "arcana",
  "speaker": "astra",
  "lang": "eng",
  "samplingRate": 24000,
  "speedAlpha": 1
}'