Gemini 3.8 TTS
Every final ClearFrame voice comes from Gemini 3.8 Flash TTS. It costs about $0.0023 per 10 s of speech, so a 60 s film is about a cent and a half. Iterate with the free OS voice (clearframe voice DIR --draft) and record Gemini once the words are right.
The rule: one continuous take, one short style
The model gives a consistent, lively voice when it reads the whole narration in one request, as one text, with one short style. Voices drift when lines are recorded separately, each with its own style, and stitched together. Every style re-prompts the voice, and every join resets pitch, energy and room tone. ClearFrame therefore:
- records the whole film as one take by default (
voice.takes: "film"). Only films past about 8 minutes are split, at a chapter boundary. Gemini allows 8,192 input and 16,384 output tokens per call, about 10 minutes of speech.
- sends the take as one text part with
voice.style. Beats are separated by paragraph breaks, which read as natural pauses. The engine then cuts the take back into beats at those pauses, using word timings measured by local Whisper.
- ignores per-beat
style in continuous takes (with a warning). voice.perBeatStyle: true sends them anyway, as separate parts, which buys control at the cost of consistency. Avoid it.
voice.takes: "chapter" (one take per chapter) and "beat" (one per line) still exist. Use beat only for one-off inserts.
Use it
clearframe voice <dir> --draft # free OS voice, one continuous take, words measured with Whisper
clearframe voice <dir> # Gemini: one continuous take (cached by text, voice, style, model)
clearframe voice <dir> --force # re-record after changing words
clearframe voice <dir> --dry-run # the exact request per take (one text, one style); no key, no call
node packages/engine/dist/skills/gemini-tts/scripts/tts.mjs --text "Seventy percent." --voice Charon --style "calm, measured" --out vo.wav
node packages/engine/dist/skills/gemini-tts/scripts/tts.mjs --text "…" --dry-run # prints the exact request; no key, no call
node packages/engine/dist/skills/gemini-tts/scripts/tts.mjs --list-voices
voice prints the estimated seconds and cost and honours --budget / storyboard.budget. Don't make paid calls merely to test code; use --dry-run.
Directing the voice: cast, direct, speak
- Cast (the voice). Accent, age, gender and timbre belong to the voice, not to the style. Pick a prebuilt voice (table below), or design one once and reuse its ID. Keep the same
voice.voice across a series.
- Direct (one short style). Use 2–6 words that describe a person talking, for example
warm, curious, unhurried, clear, quietly confident, bright, conversational or low, measured, intimate.
- Don't stack emotions.
- Don't write long "audio profiles", scene descriptions or director's notes; they cause drift.
- Never tell the model to keep the voice steady.
- Test plain (no style) first, then add a style only to tweak.
- Speak (the text, read verbatim). Everything is spoken except inline tags in angle brackets and backchannels in pipes, so
(whispering) or Say calmly: will be read aloud. Delivery comes from the writing:
- Fragments punch: "Seven degrees. That's the gap."
- Commas and full stops pace a line. A dash (
--) cuts it short. An ellipsis (...) trails off or hesitates.
- A question lifts the voice. Use one real question per minute.
- Word order sets stress: the last word of a sentence lands. CAPITALS force stress but show in captions.
- Numbers: write digits ("70%", "2025"); they are read naturally, and cues match either way.
Inline tags (Gemini 3.8)
Tags go exactly where the sound happens. In other languages, keep the tags in English.
| Use |
Tags |
| Narration (sparingly) |
<short pause> before a number or reveal, <long pause> after a turn, <breath> before a big line |
| Conversation (one or two per minute) |
<chuckle>, <laugh>, <sigh>, <exhales>, <gasp>, <tsk>, <phew>, <whispering> |
| Character and drama only |
<laughter>, <giggle>, <snicker>, <cackle>, <cheer>, <shout>, <scream>, <shriek>, <cry>, <sob>, <whimper>, <groan>, <moan>, <grunt>, <growl>, <grr>, <hiss>, <argh>, <pant>, <heavy breath>, <cough>, <sneeze>, <yawn>, <throat-clearing>, <snort>, <pff> |
Backchannels: in a two-voice take, a listener's reaction goes in pipes inside the other speaker's turn, for example |mm-hm|, |oh really?| or |right|. critique flags heavy tag use and bracketed directions.
Two voices
Set voice.cast (for example {"host": {"voice": "Puck", "style": "curious"}, "guest": {"voice": "Kore", "style": "knowledgeable, warm"}}) and a speaker on each beat. A take is one mode: "conversational" request with up to two prebuilt voices and an explicit speaker on every turn. Each speaker keeps their own constant style. Designed or replicated voices can't share a conversational request; they are synthesized turn by turn, so expect less natural turn-taking.
Designed and replicated voices
- Voice Design creates a voice from a text description, with a preview. Replication clones a voice from about 30 s of audio plus a spoken consent recording.
- Both return a reusable voice ID: put it in
voice.voice (check the request shape with --dry-run). A designed voice is the most reliable way to keep one signature voice across many films.
- Keep its style strings short: long prompts on top of a designed voice drift the fastest.
- Replicate only voices you have explicit consent for, and disclose synthetic voices (
clearframe-integrity).
Contract (verified 2026-09-30 against ai.google.dev)
POST https://generativelanguage.googleapis.com/v1beta/interactions with header x-goog-api-key: $GEMINI_API_KEY
{
"model": "gemini-3.8-flash-tts",
"input": [
{
"type": "user_input",
"content": [
{
"type": "text",
"text": "Seven degrees. That's how much hotter a city night can run.\n\nIt's only a few degrees, right?\n\n…",
"annotations": [
{
"type": "speech_metadata",
"style": "warm, curious, quietly concerned"
}
]
}
]
}
],
"response_format": {
"type": "audio",
"mime_type": "audio/wav",
"sample_rate": 24000
},
"generation_config": { "speech_config": [{ "voice": "Charon" }] }
}
- Response:
steps[type="model_output"].content[type="audio"] = { mime_type, data: <base64>, sample_rate, channels }. Unary responses are a complete audio/wav file (24 kHz mono s16le); write it straight to disk. The script wraps audio/l16 if it ever appears.
speech_metadata applies per content part (turn). One part means one style. Two voices need speech_config: { mode: "conversational", speakers: [{ speaker, voice }] } and speech_metadata.speaker on every part.
- Limits: 8,192 input tokens and 16,384 output tokens per call (audio is 25 tokens/s, so about 10 minutes). No thinking and no tools.
- Languages: 130+ languages, with
language set on the speaker.
- The legacy
generateContent form still works; ClearFrame uses Interactions, which Google recommends.
| Model |
Status |
Audio out (per 1M tokens) |
≈ per 10 s |
gemini-3.8-flash-tts (default) |
GA, most expressive |
$9.00 until 2026-12-31, then $18 |
$0.0023 |
gemini-3.8-flash-lite-tts |
GA, cheapest |
$6.00 until 2026-12-31, then $12 |
$0.0015 |
Batch and Flex are 50% off. The 2.5 and 3.1 preview TTS models are deprecated.
Prebuilt voices
| Tone |
Voices |
| Informative, neutral (default) |
Charon, Rasalgethi, Sadaltager (knowledgeable), Schedar (even) |
| Clear, precise |
Iapetus, Erinome |
| Warm, reassuring |
Sulafat, Achird (friendly), Vindemiatrix (gentle) |
| Firm, authoritative |
Kore, Orus, Alnilam |
| Mature, grounded |
Gacrux |
| Lively (launches, social, used sparingly) |
Laomedeia, Puck, Sadachbia, Zephyr |
The full list: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat. More than 2,000 more are in the Extended Voice Library (--list-voices).
When the voice is wrong
| Symptom |
Fix |
| The voice changes between lines |
Make sure voice.takes is film (the default) and there is no voice.perBeatStyle; remove per-beat style. Re-record the whole take. |
| It drifts over a long take |
Shorten voice.style to 2–6 words. Remove anything like "maintain the same voice". Consider a designed voice. |
| Flat |
The words are flat. Add fragments, one question, a pause before the reveal, and put the stressed word last. Then try a livelier voice before a stronger style. |
| Too theatrical |
Remove tags, soften the style ("clear, conversational"), and pick a neutral voice (Charon, Schedar). |
| A direction was read aloud |
It was in the text. Move it to a tag or the style. |
| One line reads wrong |
Change that line's punctuation or word order and re-record the take. Don't patch in a single-line take. |
| Beat cuts land mid-word |
Install Whisper (align --whisper) so the take is split on measured words. Give each beat a clear full stop. |
1---2name: gemini-tts3description: Generate and direct narration with Google Gemini 3.8 Flash TTS (gemini-3.8-flash-tts) through the Interactions API — one continuous take per film for a consistent voice, casting, one short style, writing delivery into the words, inline vocal tags, two-voice conversations, designed voices, limits, pricing and a zero-dependency Node script. Use whenever a ClearFrame film (or any project) needs voiceover, when a voice sounds inconsistent or flat, or to check a TTS request without calling the API (--dry-run).4metadata:5 source: https://skillmd.com/skills/brandonbryant12/gemini-tts6---78# Gemini 3.8 TTS910Every final ClearFrame voice comes from Gemini 3.8 Flash TTS. It costs about $0.0023 per 10 s of speech, so a 60 s film is about a cent and a half. Iterate with the free OS voice (`clearframe voice DIR --draft`) and record Gemini once the words are right.1112## The rule: one continuous take, one short style1314The model gives a consistent, lively voice when it reads **the whole narration in one request, as one text, with one short style**. Voices drift when lines are recorded separately, each with its own style, and stitched together. Every style re-prompts the voice, and every join resets pitch, energy and room tone. ClearFrame therefore:1516- records the whole film as **one take** by default (`voice.takes: "film"`). Only films past about 8 minutes are split, at a chapter boundary. Gemini allows 8,192 input and 16,384 output tokens per call, about 10 minutes of speech.17- sends the take as **one text part with `voice.style`**. Beats are separated by paragraph breaks, which read as natural pauses. The engine then cuts the take back into beats at those pauses, using word timings measured by local Whisper.18- **ignores per-beat `style`** in continuous takes (with a warning). `voice.perBeatStyle: true` sends them anyway, as separate parts, which buys control at the cost of consistency. Avoid it.1920`voice.takes: "chapter"` (one take per chapter) and `"beat"` (one per line) still exist. Use `beat` only for one-off inserts.2122## Use it2324```bash25clearframe voice <dir> --draft # free OS voice, one continuous take, words measured with Whisper26clearframe voice <dir> # Gemini: one continuous take (cached by text, voice, style, model)27clearframe voice <dir> --force # re-record after changing words28clearframe voice <dir> --dry-run # the exact request per take (one text, one style); no key, no call29node packages/engine/dist/skills/gemini-tts/scripts/tts.mjs --text "Seventy percent." --voice Charon --style "calm, measured" --out vo.wav30node packages/engine/dist/skills/gemini-tts/scripts/tts.mjs --text "…" --dry-run # prints the exact request; no key, no call31node packages/engine/dist/skills/gemini-tts/scripts/tts.mjs --list-voices32```3334`voice` prints the estimated seconds and cost and honours `--budget` / `storyboard.budget`. Don't make paid calls merely to test code; use `--dry-run`.3536## Directing the voice: cast, direct, speak37381. **Cast (the voice).** Accent, age, gender and timbre belong to the voice, not to the style. Pick a prebuilt voice (table below), or design one once and reuse its ID. Keep the same `voice.voice` across a series.392. **Direct (one short style).** Use 2–6 words that describe a person talking, for example `warm, curious, unhurried`, `clear, quietly confident`, `bright, conversational` or `low, measured, intimate`.40 - Don't stack emotions.41 - Don't write long "audio profiles", scene descriptions or director's notes; they cause drift.42 - Never tell the model to keep the voice steady.43 - Test plain (no style) first, then add a style only to tweak.443. **Speak (the text, read verbatim).** Everything is spoken except inline tags in angle brackets and backchannels in pipes, so `(whispering)` or `Say calmly:` will be read aloud. Delivery comes from the writing:45 - **Fragments** punch: "Seven degrees. That's the gap."46 - **Commas and full stops** pace a line. A dash (`--`) cuts it short. An ellipsis (`...`) trails off or hesitates.47 - **A question** lifts the voice. Use one real question per minute.48 - **Word order sets stress:** the last word of a sentence lands. CAPITALS force stress but show in captions.49 - **Numbers:** write digits ("70%", "2025"); they are read naturally, and cues match either way.5051### Inline tags (Gemini 3.8)5253Tags go exactly where the sound happens. In other languages, keep the tags in English.5455| Use | Tags |56| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |57| **Narration** (sparingly) | `<short pause>` before a number or reveal, `<long pause>` after a turn, `<breath>` before a big line |58| **Conversation** (one or two per minute) | `<chuckle>`, `<laugh>`, `<sigh>`, `<exhales>`, `<gasp>`, `<tsk>`, `<phew>`, `<whispering>` |59| **Character and drama only** | `<laughter>`, `<giggle>`, `<snicker>`, `<cackle>`, `<cheer>`, `<shout>`, `<scream>`, `<shriek>`, `<cry>`, `<sob>`, `<whimper>`, `<groan>`, `<moan>`, `<grunt>`, `<growl>`, `<grr>`, `<hiss>`, `<argh>`, `<pant>`, `<heavy breath>`, `<cough>`, `<sneeze>`, `<yawn>`, `<throat-clearing>`, `<snort>`, `<pff>` |6061**Backchannels:** in a two-voice take, a listener's reaction goes in pipes inside the other speaker's turn, for example `|mm-hm|`, `|oh really?|` or `|right|`. `critique` flags heavy tag use and bracketed directions.6263### Two voices6465Set `voice.cast` (for example `{"host": {"voice": "Puck", "style": "curious"}, "guest": {"voice": "Kore", "style": "knowledgeable, warm"}}`) and a `speaker` on each beat. A take is one `mode: "conversational"` request with up to two prebuilt voices and an explicit speaker on every turn. Each speaker keeps their own constant style. Designed or replicated voices can't share a conversational request; they are synthesized turn by turn, so expect less natural turn-taking.6667### Designed and replicated voices6869- **Voice Design** creates a voice from a text description, with a preview. **Replication** clones a voice from about 30 s of audio plus a spoken consent recording.70- Both return a reusable voice ID: put it in `voice.voice` (check the request shape with `--dry-run`). A designed voice is the most reliable way to keep one signature voice across many films.71- Keep its style strings short: long prompts on top of a designed voice drift the fastest.72- Replicate only voices you have explicit consent for, and disclose synthetic voices (`clearframe-integrity`).7374## Contract (verified 2026-09-30 against ai.google.dev)7576`POST https://generativelanguage.googleapis.com/v1beta/interactions` with header `x-goog-api-key: $GEMINI_API_KEY`7778```json79{80 "model": "gemini-3.8-flash-tts",81 "input": [82 {83 "type": "user_input",84 "content": [85 {86 "type": "text",87 "text": "Seven degrees. That's how much hotter a city night can run.\n\nIt's only a few degrees, right?\n\n…",88 "annotations": [89 {90 "type": "speech_metadata",91 "style": "warm, curious, quietly concerned"92 }93 ]94 }95 ]96 }97 ],98 "response_format": {99 "type": "audio",100 "mime_type": "audio/wav",101 "sample_rate": 24000102 },103 "generation_config": { "speech_config": [{ "voice": "Charon" }] }104}105```106107- **Response:** `steps[type="model_output"].content[type="audio"] = { mime_type, data: <base64>, sample_rate, channels }`. Unary responses are a complete `audio/wav` file (24 kHz mono s16le); write it straight to disk. The script wraps `audio/l16` if it ever appears.108- **`speech_metadata` applies per content part (turn).** One part means one style. Two voices need `speech_config: { mode: "conversational", speakers: [{ speaker, voice }] }` and `speech_metadata.speaker` on every part.109- **Limits:** 8,192 input tokens and 16,384 output tokens per call (audio is 25 tokens/s, so about 10 minutes). No thinking and no tools.110- **Languages:** 130+ languages, with `language` set on the speaker.111- The legacy `generateContent` form still works; ClearFrame uses Interactions, which Google recommends.112113| Model | Status | Audio out (per 1M tokens) | ≈ per 10 s |114| -------------------------------- | ------------------- | -------------------------------- | ---------- |115| `gemini-3.8-flash-tts` (default) | GA, most expressive | $9.00 until 2026-12-31, then $18 | $0.0023 |116| `gemini-3.8-flash-lite-tts` | GA, cheapest | $6.00 until 2026-12-31, then $12 | $0.0015 |117118Batch and Flex are 50% off. The 2.5 and 3.1 preview TTS models are deprecated.119120## Prebuilt voices121122| Tone | Voices |123| ----------------------------------------- | ------------------------------------------------------------------ |124| Informative, neutral (default) | **Charon**, Rasalgethi, Sadaltager (knowledgeable), Schedar (even) |125| Clear, precise | Iapetus, Erinome |126| Warm, reassuring | Sulafat, Achird (friendly), Vindemiatrix (gentle) |127| Firm, authoritative | Kore, Orus, Alnilam |128| Mature, grounded | Gacrux |129| Lively (launches, social, used sparingly) | Laomedeia, Puck, Sadachbia, Zephyr |130131The full list: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat. More than 2,000 more are in the Extended Voice Library (`--list-voices`).132133## When the voice is wrong134135| Symptom | Fix |136| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |137| The voice changes between lines | Make sure `voice.takes` is `film` (the default) and there is no `voice.perBeatStyle`; remove per-beat `style`. Re-record the whole take. |138| It drifts over a long take | Shorten `voice.style` to 2–6 words. Remove anything like "maintain the same voice". Consider a designed voice. |139| Flat | The words are flat. Add fragments, one question, a pause before the reveal, and put the stressed word last. Then try a livelier voice before a stronger style. |140| Too theatrical | Remove tags, soften the style ("clear, conversational"), and pick a neutral voice (Charon, Schedar). |141| A direction was read aloud | It was in the text. Move it to a tag or the style. |142| One line reads wrong | Change that line's punctuation or word order and re-record the take. Don't patch in a single-line take. |143| Beat cuts land mid-word | Install Whisper (`align --whisper`) so the take is split on measured words. Give each beat a clear full stop. |