POST
/
v1
/
voice
/
emotion
curl --request POST \
  --url https://geoff.ai/api/v1/voice/emotion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "text": "I cannot believe this is happening right now.",
    "voice_id": "brand_voice_v1",
    "emotion": "surprised",
    "intensity": 0.8,
    "format": "wav"
  }'
{
  "data": {
    "audio_url": "https://files.geoff.ai/output/emotion_abc123.wav",
    "audio_b64": "...",
    "format": "wav",
    "sample_rate": 24000,
    "duration_s": 4.2,
    "emotion": "surprised",
    "intensity": 0.8,
    "voice": "brand_voice_v1"
  },
  "trace_id": "04ede0ab069fb1ba8be5156a24b1e081"
}
Apply an emotional tone to speech. Two input shapes:
  1. From text — pass text plus a voice_id; the engine synthesizes directly with the requested emotion (fastest path).
  2. From source audio — pass audio_url; the engine transcribes, re-renders with the requested emotion in the same voice, and returns the new audio (preserves the original speaker).

Authorization

Authorization
string
required
Bearer token. Bearer API_key.

Request Body

emotion
string
required
Target emotional tone. Options: neutral, happy, sad, angry, fearful, surprised, calm, excited.
text
string
Text to synthesize. Mutually exclusive with audio_url. When set, voice_id should also be supplied to pick the target voice.
voice_id
string
Voice to render the synthesized text in. Required when text is set; ignored when audio_url is set (the source speaker is preserved).
audio_url
string
Source audio URL to re-render. Mutually exclusive with text.
intensity
number
How strongly to apply the emotion. Range: 0 to 1. Default: 0.7. Values above 0.85 can over-stylize — sweep at lower values first.
format
string
Output audio format. Options: wav, mp3. Default: wav.
curl --request POST \
  --url https://geoff.ai/api/v1/voice/emotion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "text": "I cannot believe this is happening right now.",
    "voice_id": "brand_voice_v1",
    "emotion": "surprised",
    "intensity": 0.8,
    "format": "wav"
  }'
{
  "data": {
    "audio_url": "https://files.geoff.ai/output/emotion_abc123.wav",
    "audio_b64": "...",
    "format": "wav",
    "sample_rate": 24000,
    "duration_s": 4.2,
    "emotion": "surprised",
    "intensity": 0.8,
    "voice": "brand_voice_v1"
  },
  "trace_id": "04ede0ab069fb1ba8be5156a24b1e081"
}

When to use what

  • Designing a new voice with an inherent style — use Voice Design with emotion baked into the profile (the voice is created with that tone).
  • One-off emotional re-rendering of existing speech — use this endpoint with audio_url.
  • Single utterance in an existing voice + emotion — use this endpoint with text + voice_id.