Gemini 3.8 Flash Lite TTS
Text to speech
Starting price $0.05 / run
By Google
Google's Gemini 3.1 Flash TTS reads your text aloud and follows plain-language directions for tone, pace and accent, with tags such as [sigh] for single moments.
gemini-3.1-flash-ttsQuote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.
# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
-H "Authorization: Bearer $RAYWAKE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-tts",
"input": {
"prompt": "Say warmly, with a smile: Welcome back! [short pause] Your order is on its way and should arrive tomorrow morning."
}
}'
# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
-H "Authorization: Bearer $RAYWAKE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"model": "gemini-3.1-flash-tts", "quote_id": "QUOTE_ID", "input": {"prompt":"Say warmly, with a smile: Welcome back! [short pause] Your order is on its way and should arrive tomorrow morning."}}'
# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
-H "Authorization: Bearer $RAYWAKE_API_KEY"| Name | Type | Description |
|---|---|---|
promptrequired | string | The text to convert to speech. Gemini 3.1 Flash TTS supports natural-language prompting for style, pace, accent, and emotional expression — include delivery instructions inline with the text (e.g. 'Say cheerfully: Have a wonderful day!'). Supports expressive audio tags like [sigh], [laughing], [whispering], [short pause] for fine-grained control over delivery. For multi-speaker synthesis, prefix lines with speaker aliases defined in the speakers field (e.g. 'Alice: Hello!\nBob: Hi!'). |
style_instructions | string | Optional style and delivery instructions prepended to the prompt. Controls expressiveness, accent, pace, tone, and emotional expression using natural language. Use this to separate style control from the text content. Examples: 'Speak warmly and slowly', 'Read this as a dramatic newscast', 'Use a British accent with a cheerful tone', 'Whisper mysteriously'. |
voice | string (enum) | Voice preset for single-speaker synthesis. 30 distinct voices are available. Ignored when speakers is set. Popular choices: Kore (strong, firm female), Puck (upbeat, lively male), Charon (calm, professional male), Zephyr (bright, clear female), Aoede (warm, melodic female). |
language_code | string (enum) | Language for multilingual synthesis. When set, steers the model to speak in the specified language. If not set, the model auto-detects the language from the text. |
temperature | number | Controls the randomness of the speech output. Higher values produce more creative and varied delivery, while lower values make the output more predictable and focused. |
output_format | string (enum) | Audio output format. mp3: compressed, small file size (recommended). wav: uncompressed PCM wrapped in WAV (24 kHz, 16-bit mono). ogg_opus: Ogg container with Opus codec, good quality-to-size ratio. |
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"outputs": [
{ "type": "audio", "url": "https://…", "mime_type": "audio/mpeg", "thumbnail_url": null }
]The exact charge for your input comes from a quote. How charges settle
Fields marked * are required. Review the price before generating.
Gemini 3.1 Flash TTS turns text into speech in one of 30 preset voices and many languages, Turkish among them. You direct the delivery in plain words, either in the text itself or in a separate style field.
Tags in square brackets, such as [laughing], [whispering] or [short pause], shape single moments of the read. A temperature setting makes the delivery more varied or more predictable.
Listen for pronunciation, unintended spoken instructions, pauses and clipped endings.