Expression and Delivery Instructions
Add tags to text to insert sounds or specify how a passage should be spoken.
For the OpenAI-compatible API, put the same tagged text in input.
Usage
Place sound tags such as [sigh] where the sound should occur. They have no closing
tag. Wrap only the intended passage in delivery tags, such as
<whisper>dialogue</whisper>. Opening and closing tag names must match exactly.
{
"text": "[sigh] <whisper>Let's keep this between us.</whisper> Let's go.",
"language_code": "en",
"auto_tags": false
}
Send this body to the Text to Speech API. You can combine sound and delivery tags. Text outside delivery tags has no separate delivery instruction.
For lower latency, enter tags directly and omit auto_tags or set it to false.
Automatic tags may increase latency.
Sound tag examples
Start with these recommended tags. Each example pairs the sound with matching dialogue.
| Tag | Purpose | Input example |
|---|---|---|
[laugh] | Laughter | [laugh] You really did it? That's amazing! |
[clear_throat] | Throat clearing | [clear_throat] Let me begin the presentation. |
[sigh] | Sigh | [sigh] I missed the last train again. |
[breath] | Breathing | [breath] Wait, let me catch my breath before we talk. |
Delivery tag examples
Wrap only the sentence that needs the emotion or delivery. Start with one instruction and a short line whose intent is clear.
| Tag | Purpose | Input example |
|---|---|---|
<whisper> | Whispering | <whisper>Keep quiet. Someone might be listening.</whisper> |
<tearful> | Tearfulness | <tearful>I thought I'd never see you again. I missed you so much.</tearful> |
<sad> | Sadness | <sad>Now I'm all alone here.</sad> |
<shy> | Shyness | <shy>Actually, there's something I've wanted to tell you.</shy> |
<angry> | Anger | <angry>Stop it! I won't put up with this anymore.</angry> |
<annoyed> | Annoyance | <annoyed>How many times do I have to say the same thing?</annoyed> |
These are recommended examples, not an exhaustive list of instructions. Intensity and delivery vary with the voice, language, and context. Compare the result with the same dialogue synthesized without tags.
Natural-language instructions
Tags and natural-language instructions currently support English only. Write
dialogue in a supported language and instructions in English.
Beyond the recommended tags, use [natural-language instruction] for sounds and
<natural-language instruction>dialogue</natural-language instruction> for delivery.
Repeat the exact same instruction in the opening and closing tags.
{
"text": "[soft laugh] <in a calm reassuring voice>You can relax here.</in a calm reassuring voice>",
"language_code": "en",
"auto_tags": false
}
Start with the most important instruction instead of layering several emotions on one passage. If the result differs from your intent, shorten the instruction or adjust the dialogue to match the emotion.
Automatic tags
Set auto_tags: true to request automatic insertion instead of writing tags yourself.
See Automatic tags in the Text to Speech API for support and errors.
For OpenAI-compatible usage, see Speech API.