> ## Documentation Index
> Fetch the complete documentation index at: https://smallestai-ff1e543d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Emotion detection

> Capture per-emotion confidence scores from Pulse STT responses

<Badge color="green">Pre-Recorded</Badge>

## Enabling emotion detection

Include `emotion_detection=true` in your Pulse STT query parameters.

### Sample request

```bash theme={null}
curl --request POST \
  --url "https://api.smallest.ai/waves/v1/pulse/get_text?language=en&emotion_detection=true" \
  --header "Authorization: Bearer $SMALLEST_API_KEY" \
  --header "Content-Type: audio/wav" \
  --data-binary "@/path/to/audio.wav"
```

<Note>
  Emotion detection is currently supported only for Pre-Recorded API. Real-Time API support is coming soon.
</Note>

## Output format & field of interest

The response adds an `emotions` object containing floating-point scores (0–1) for happiness, sadness, disgust, fear, and anger. Use these fields to monitor sentiment, trigger QA alerts, or enrich customer analytics.

### Sample response

```json theme={null}
{
  "transcription": "Hello world.",
  "emotions": {
    "happiness": 0.80,
    "sadness": 0.15,
    "disgust": 0.02,
    "fear": 0.03,
    "anger": 0.05
  }
}
```
