> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fish.audio/llms.txt
> Use this file to discover all available pages before exploring further.

# Emotion Control

> Add natural emotions and expressions to your AI-generated speech

export const AudioTranscript = ({voices, page}) => {
  const resolvedVoices = voices?.length ? voices : (() => {
    if (!page) return [];
    const baseUrl = 'https://pub-b995142090474379a930b856ab79b4d4.r2.dev/audio';
    const pageVoices = [{
      id: '8ef4a238714b45718ce04243307c57a7',
      name: 'E-girl'
    }, {
      id: '802e3bc2b27e49c2995d23ef70e6ac89',
      name: 'Energetic Male'
    }, {
      id: '933563129e564b19a115bedd57b7406a',
      name: 'Sarah'
    }, {
      id: 'bf322df2096a46f18c579d0baa36f41d',
      name: 'Adrian'
    }, {
      id: 'b347db033a6549378b48d00acb0d06cd',
      name: 'Selene'
    }, {
      id: '536d3a5e000945adb7038665781a4aca',
      name: 'Ethan'
    }];
    return pageVoices.map(voice => ({
      ...voice,
      url: `${baseUrl}/${page}/${voice.id}.mp3`
    }));
  })();
  const [selectedVoice, setSelectedVoice] = useState(0);
  const [isPlaying, setIsPlaying] = useState(false);
  const [currentTime, setCurrentTime] = useState(0);
  const [duration, setDuration] = useState(0);
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
  const audioRef = useRef(null);
  const dropdownRef = useRef(null);
  useEffect(() => {
    const audio = audioRef.current;
    if (!audio) return;
    const updateTime = () => setCurrentTime(audio.currentTime);
    const updateDuration = () => setDuration(audio.duration);
    const handleEnded = () => setIsPlaying(false);
    audio.addEventListener('timeupdate', updateTime);
    audio.addEventListener('loadedmetadata', updateDuration);
    audio.addEventListener('ended', handleEnded);
    return () => {
      audio.removeEventListener('timeupdate', updateTime);
      audio.removeEventListener('loadedmetadata', updateDuration);
      audio.removeEventListener('ended', handleEnded);
    };
  }, []);
  useEffect(() => {
    const handleClickOutside = event => {
      if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
        setIsDropdownOpen(false);
      }
    };
    if (isDropdownOpen) {
      document.addEventListener('mousedown', handleClickOutside);
    }
    return () => {
      document.removeEventListener('mousedown', handleClickOutside);
    };
  }, [isDropdownOpen]);
  useEffect(() => {
    if (audioRef.current) {
      audioRef.current.pause();
      audioRef.current.load();
      setIsPlaying(false);
      setCurrentTime(0);
    }
  }, [selectedVoice]);
  const togglePlay = () => {
    if (isPlaying) {
      audioRef.current.pause();
    } else {
      audioRef.current.play();
    }
    setIsPlaying(!isPlaying);
  };
  const handleProgressChange = e => {
    const newTime = parseFloat(e.target.value);
    audioRef.current.currentTime = newTime;
    setCurrentTime(newTime);
  };
  const formatTime = time => {
    if (isNaN(time)) return '0:00';
    const minutes = Math.floor(time / 60);
    const seconds = Math.floor(time % 60);
    return `${minutes}:${seconds.toString().padStart(2, '0')}`;
  };
  const currentVoice = resolvedVoices[selectedVoice];
  return <div className="border rounded-lg bg-card border-gray-200 dark:border-gray-800">
      {}
      <div className="grid grid-cols-3 items-center px-3 py-1.5 bg-muted border-b border-gray-200 dark:border-gray-800">
        <span className="text-xs font-medium">Listen to Page</span>

        <span className="text-xs font-semibold text-muted-foreground text-center">Powered by Fish Audio S2 Pro</span>

        {resolvedVoices.length > 1 ? <div className="relative justify-self-end" ref={dropdownRef}>
            <button onClick={() => setIsDropdownOpen(!isDropdownOpen)} className="flex items-center gap-1.5 px-3 py-1 rounded-full bg-muted hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200 cursor-pointer text-xs">
              <span className="text-muted-foreground">Voice:</span>
              <span className="font-medium">{resolvedVoices[selectedVoice]?.name}</span>
              <svg className={`w-3 h-3 transition-transform duration-200 ${isDropdownOpen ? 'rotate-180' : ''}`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
              </svg>
            </button>

            {isDropdownOpen && <div className="absolute right-0 mt-1 w-auto bg-white dark:bg-black border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden z-50">
                {resolvedVoices.map((voice, index) => <button key={index} onClick={() => {
    setSelectedVoice(index);
    setIsDropdownOpen(false);
  }} className={`w-full px-3 py-1.5 text-left text-xs hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors flex items-center gap-2 ${index === selectedVoice ? 'bg-gray-100 dark:bg-gray-800 font-medium' : ''}`}>
                    {voice.id && <img src={`https://public-platform.r2.fish.audio/coverimage/${voice.id}`} alt={voice.name} className="w-5 h-5 rounded-full m-0 flex-shrink-0 object-cover" />}
                    <span className="flex-1 whitespace-nowrap">{voice.name}</span>
                  </button>)}
              </div>}
          </div> : <div className="justify-self-end" />}
      </div>

      {}
      <div className="px-3 py-1.5 bg-card">
        <audio ref={audioRef} src={currentVoice?.url} preload="metadata" />

        <div className="flex items-center gap-2">
          {}
          <button onClick={togglePlay} className="flex-shrink-0 w-6 h-6 flex items-center justify-center bg-gray-300 dark:bg-gray-600 text-gray-800 dark:text-gray-200 rounded-full hover:opacity-80 transition-opacity relative overflow-hidden" aria-label={isPlaying ? 'Pause' : 'Play'}>
            <div className="transition-transform duration-300 ease-in-out" style={{
    transform: isPlaying ? 'rotate(180deg)' : 'rotate(0deg)'
  }}>
              {isPlaying ? <svg className="w-3 h-3" fill="currentColor" viewBox="0 0 24 24">
                  <path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z" />
                </svg> : <svg className="w-3 h-3 ml-0.5" fill="currentColor" viewBox="0 0 24 24">
                  <path d="M8 5v14l11-7z" />
                </svg>}
            </div>
          </button>

          {}
          <div className="flex-1 flex items-center gap-2">
            <span className="text-xs font-mono text-gray-500 dark:text-gray-400 min-w-[35px]">
              {formatTime(currentTime)}
            </span>

            <div className="flex-1 relative h-1 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden">
              <div className="absolute top-0 left-0 h-full bg-gray-400 dark:bg-gray-500 transition-all duration-100" style={{
    width: `${duration ? currentTime / duration * 100 : 0}%`
  }} />
              <input type="range" min="0" max={duration || 0} value={currentTime} onChange={handleProgressChange} className="absolute top-0 left-0 w-full h-full opacity-0 cursor-pointer" />
            </div>
            <span className="text-xs font-mono text-gray-500 dark:text-gray-400 min-w-[35px]">
              {formatTime(duration)}
            </span>
          </div>
        </div>
      </div>
    </div>;
};

## Overview

Fish Audio models support 64+ emotional expressions and voice styles that can be controlled through text markers in your input. Add natural pauses, laughter, and other human-like elements to make speech more engaging and realistic.

<Tip>
  The `(parenthesis)` syntax on this page applies to the S1 model. S2 uses `[bracket]` syntax with natural language descriptions and is not limited to a fixed set of tags. See the [Models Overview](/developer-guide/models-pricing/models-overview#s2-natural-language-control) for details.
</Tip>

## How It Works

Simply wrap emotion tags in parentheses within your text:

```
(happy) What a beautiful day!
(sad) I'm sorry to hear that.
(excited) This is amazing news!
```

The TTS models will automatically recognize these markers and adjust the voice accordingly.

## Complete Emotion Reference

### Basic Emotions (24 expressions)

| Emotion     | Tag             | Description             | Example Context             |
| ----------- | --------------- | ----------------------- | --------------------------- |
| Happy       | `(happy)`       | Cheerful, upbeat tone   | Good news, greetings        |
| Sad         | `(sad)`         | Melancholic, downcast   | Sympathy, bad news          |
| Angry       | `(angry)`       | Frustrated, aggressive  | Complaints, warnings        |
| Excited     | `(excited)`     | Energetic, enthusiastic | Announcements, celebrations |
| Calm        | `(calm)`        | Peaceful, relaxed       | Instructions, meditation    |
| Nervous     | `(nervous)`     | Anxious, uncertain      | Disclaimers, apologies      |
| Confident   | `(confident)`   | Assertive, self-assured | Presentations, sales        |
| Surprised   | `(surprised)`   | Shocked, amazed         | Reactions, discoveries      |
| Satisfied   | `(satisfied)`   | Content, pleased        | Confirmations, reviews      |
| Delighted   | `(delighted)`   | Very pleased, joyful    | Celebrations, compliments   |
| Scared      | `(scared)`      | Frightened, fearful     | Warnings, horror stories    |
| Worried     | `(worried)`     | Concerned, troubled     | Concerns, questions         |
| Upset       | `(upset)`       | Disturbed, distressed   | Complaints, problems        |
| Frustrated  | `(frustrated)`  | Annoyed, exasperated    | Technical issues, delays    |
| Depressed   | `(depressed)`   | Very sad, hopeless      | Serious topics              |
| Empathetic  | `(empathetic)`  | Understanding, caring   | Support, counseling         |
| Embarrassed | `(embarrassed)` | Ashamed, awkward        | Apologies, mistakes         |
| Disgusted   | `(disgusted)`   | Repelled, revolted      | Negative reviews            |
| Moved       | `(moved)`       | Emotionally touched     | Heartfelt moments           |
| Proud       | `(proud)`       | Accomplished, satisfied | Achievements, praise        |
| Relaxed     | `(relaxed)`     | At ease, casual         | Casual conversation         |
| Grateful    | `(grateful)`    | Thankful, appreciative  | Thanks, appreciation        |
| Curious     | `(curious)`     | Inquisitive, interested | Questions, exploration      |
| Sarcastic   | `(sarcastic)`   | Ironic, mocking         | Humor, criticism            |

### Advanced Emotions (25 expressions)

| Emotion       | Tag               | Description              | Example Context        |
| ------------- | ----------------- | ------------------------ | ---------------------- |
| Disdainful    | `(disdainful)`    | Contemptuous, scornful   | Criticism, rejection   |
| Unhappy       | `(unhappy)`       | Discontent, dissatisfied | Complaints, feedback   |
| Anxious       | `(anxious)`       | Very worried, uneasy     | Urgent matters         |
| Hysterical    | `(hysterical)`    | Uncontrollably emotional | Extreme reactions      |
| Indifferent   | `(indifferent)`   | Uncaring, neutral        | Neutral responses      |
| Uncertain     | `(uncertain)`     | Doubtful, unsure         | Speculation, questions |
| Doubtful      | `(doubtful)`      | Skeptical, questioning   | Disbelief, questioning |
| Confused      | `(confused)`      | Puzzled, perplexed       | Clarification requests |
| Disappointed  | `(disappointed)`  | Let down, dissatisfied   | Unmet expectations     |
| Regretful     | `(regretful)`     | Sorry, remorseful        | Apologies, mistakes    |
| Guilty        | `(guilty)`        | Culpable, responsible    | Confessions, apologies |
| Ashamed       | `(ashamed)`       | Deeply embarrassed       | Serious mistakes       |
| Jealous       | `(jealous)`       | Envious, resentful       | Comparisons            |
| Envious       | `(envious)`       | Wanting what others have | Admiration with desire |
| Hopeful       | `(hopeful)`       | Optimistic about future  | Future plans           |
| Optimistic    | `(optimistic)`    | Positive outlook         | Encouragement          |
| Pessimistic   | `(pessimistic)`   | Negative outlook         | Warnings, doubts       |
| Nostalgic     | `(nostalgic)`     | Longing for the past     | Memories, stories      |
| Lonely        | `(lonely)`        | Isolated, alone          | Emotional content      |
| Bored         | `(bored)`         | Uninterested, weary      | Disinterest            |
| Contemptuous  | `(contemptuous)`  | Showing contempt         | Strong criticism       |
| Sympathetic   | `(sympathetic)`   | Showing sympathy         | Condolences            |
| Compassionate | `(compassionate)` | Showing deep care        | Support, help          |
| Determined    | `(determined)`    | Resolved, decided        | Goals, commitments     |
| Resigned      | `(resigned)`      | Accepting defeat         | Giving up, acceptance  |

### Tone Markers (5 expressions)

Control volume and intensity:

| Tone       | Tag                 | Description          | When to Use                |
| ---------- | ------------------- | -------------------- | -------------------------- |
| Hurried    | `(in a hurry tone)` | Rushed, urgent       | Time-sensitive information |
| Shouting   | `(shouting)`        | Loud, calling out    | Getting attention          |
| Screaming  | `(screaming)`       | Very loud, panicked  | Emergencies, fear          |
| Whispering | `(whispering)`      | Very soft, secretive | Secrets, quiet scenes      |
| Soft       | `(soft tone)`       | Gentle, quiet        | Comfort, lullabies         |

### Audio Effects (10 expressions)

Add natural human sounds:

| Effect        | Tag               | Description                  | Suggested Text |
| ------------- | ----------------- | ---------------------------- | -------------- |
| Laughing      | `(laughing)`      | Full laughter                | Ha, ha, ha     |
| Chuckling     | `(chuckling)`     | Light laugh                  | Heh, heh       |
| Sobbing       | `(sobbing)`       | Crying heavily               | (optional)     |
| Crying Loudly | `(crying loudly)` | Intense crying               | (optional)     |
| Sighing       | `(sighing)`       | Exhale of relief/frustration | sigh           |
| Groaning      | `(groaning)`      | Sound of frustration         | ugh            |
| Panting       | `(panting)`       | Out of breath                | huff, puff     |
| Gasping       | `(gasping)`       | Sharp intake of breath       | gasp           |
| Yawning       | `(yawning)`       | Tired sound                  | yawn           |
| Snoring       | `(snoring)`       | Sleep sound                  | zzz            |

### Special Effects

Additional markers for atmosphere and context:

| Effect              | Tag                     | Description              |
| ------------------- | ----------------------- | ------------------------ |
| Audience Laughter   | `(audience laughing)`   | Crowd laughing sound     |
| Background Laughter | `(background laughter)` | Ambient laughter         |
| Crowd Laughter      | `(crowd laughing)`      | Large group laughing     |
| Short Pause         | `(break)`               | Brief pause in speech    |
| Long Pause          | `(long-break)`          | Extended pause in speech |

You can also use natural expressions like "Ha,ha,ha" for laughter without tags.

## Usage Guidelines

### Placement Rules

**For English and Most Languages:**

* Emotion tags MUST go at the beginning of sentences
* Tone controls can go anywhere in the text
* Sound effects can go anywhere in the text

**Correct:**

```
(happy) What a wonderful day!
```

**Incorrect:**

```
What a (happy) wonderful day!
```

## Advanced Techniques

### Combining Effects

You can layer multiple emotions for complex expressions:

```
(sad)(whispering) I miss you so much.
(angry)(shouting) Get out of here now!
(excited)(laughing) We won! Ha ha!
```

### Emotion Transitions

Create natural emotional progressions:

```
(happy) I got the promotion!
(uncertain) But... it means relocating.
(sad) I'll miss everyone here.
(hopeful) Though it's a great opportunity.
(determined) I'm going to make it work!
```

### Background Effects

Add atmospheric sounds:

```
The comedy show was amazing (audience laughing)
Everyone was having fun (background laughter)
The crowd loved it (crowd laughing)
```

### Intensity Modifiers

Fine-tune emotional intensity with descriptive modifiers:

```
(slightly sad) I'm a bit disappointed.
(very excited) This is absolutely amazing!
(extremely angry) This is unacceptable!
```

## Language Support

All 13 supported languages can use emotion markers. Emotions must be at sentence start for these languages:

* **English, Chinese, Japanese, German, French, Spanish, Korean, Arabic, Russian, Dutch, Italian, Polish, Portuguese**

## Best Practices

### Do's

* Use one primary emotion per sentence
* Test different emotion combinations
* Match emotions to context logically
* Add appropriate text after sound effects (e.g., "Ha ha" after laughing)
* Use natural expressions when possible
* Space out emotional changes for realism

### Don'ts

* Don't overuse emotion tags in short text
* Don't mix conflicting emotions
* Don't create custom tags - use only supported ones
* Don't forget parentheses
* Don't place emotion tags mid-sentence in English

## Common Use Cases

### Customer Service

```
(friendly) Hello! How can I help you today?
(empathetic) I understand your frustration.
(confident) I'll resolve this for you right away.
(grateful) Thank you for your patience!
```

### Storytelling

```
(narrator) Once upon a time...
(mysterious)(whispering) The old house stood silent.
(scared) "Is anyone there?" she called out.
(relieved)(sighing) No one answered. Phew.
```

### Educational Content

```
(enthusiastic) Welcome to today's lesson!
(curious) Have you ever wondered why?
(encouraging) That's a great question!
(proud) Excellent work!
```

### Marketing & Sales

```
(excited) Introducing our newest product!
(confident) You won't find better quality anywhere.
(urgent) Limited time offer!
(satisfied) Join thousands of happy customers!
```

## Troubleshooting

### Emotion Not Working?

1. **Check placement** - Emotions must be at the beginning of sentences for English
2. **Verify spelling** - Tags must match exactly as listed
3. **Include parentheses** - Tags must be wrapped in parentheses

### Unnatural Sound?

* Space out emotional changes
* Use appropriate intensity
* Test with different voices
* Add context text after sound effects

### Performance Notes

* Emotion markers don't count toward token limits
* No additional latency for emotion processing
* All emotions available on all pricing tiers
* Maximum of 3 combined emotions per sentence recommended

## Quick Reference Tables

### Emotion Intensity Scale

| Base Emotion | Mild         | Moderate | Intense   |
| ------------ | ------------ | -------- | --------- |
| Happy        | satisfied    | happy    | delighted |
| Sad          | disappointed | sad      | depressed |
| Angry        | frustrated   | angry    | furious   |
| Scared       | nervous      | scared   | terrified |
| Excited      | interested   | excited  | ecstatic  |

### Common Combinations

| Scenario         | Emotion Combo            | Example                               |
| ---------------- | ------------------------ | ------------------------------------- |
| Whispered Secret | (mysterious)(whispering) | "I have something to tell you..."     |
| Angry Shout      | (angry)(shouting)        | "Stop right there!"                   |
| Sad Sigh         | (sad)(sighing)           | "I wish things were different. Sigh." |
| Excited Laugh    | (excited)(laughing)      | "We did it! Ha ha!"                   |
| Nervous Question | (nervous)(uncertain)     | "Are you sure about this?"            |

## See Also

* [Emotion Reference Guide](/api-reference/emotion-reference) - Complete emotion list with examples
* [API Reference](/api-reference/introduction) - Implementation details
* [Text-to-Speech Guide and Best Practices](/developer-guide/core-features/text-to-speech)
