Skip to content
Gladia Help Center home
Gladia Help Center home

How to detect sentiment in a transcription?

Sentiment and Emotion Analysis

The Sentiment and Emotion Analysis feature enhances transcription results by detecting the sentiment (positive, negative, neutral, mixed, unknown) and emotion (fine-grained categories such as anger, joy, surprise, etc.) for each sentence in your audio.

When diarization is enabled, you can also analyze speaker-specific sentiments and emotions.

How to Enable

To activate sentiment and emotion analysis, set the sentiment_analysis parameter to true in your request.

Example Request

{ "audio_url": "<your audio url>", "sentiment_analysis": true }

Example Result

Each result entry includes:

  • text → spoken sentence

  • sentiment → overall polarity (positive/neutral/negative/mixed/unknown)

  • emotion → fine-grained emotional state

  • timestamps → start and end in seconds

  • channel / speaker → audio channel & speaker ID (if diarization enabled)

{ "transcription": {...}, "sentiment_analysis": { "success": true, "is_empty": false, "results": [ { "text": "Jonathan, it says you are trained in technology.", "sentiment": "neutral", "emotion": "neutral", "start": 0.45158, "end": 2.364, "channel": 0, "speaker": 0 }, { "text": "That's very good.", "sentiment": "positive", "emotion": "positive_surprise", "start": 2.54438, "end": 3.54323, "channel": 0, "speaker": 0 } ], "exec_time": 1.1271, "error": null } }

Possible Values

Sentiment : positive, negative, neutral, mixed, unknown

Emotions:

  • Positive: adoration, amusement, awe, contentment, desire, ecstatic, elation, interest, positive_surprise, relief, sympathy, triumph

  • Negative: anger, confusion, contempt, disappointment, disgust, distress, embarrassment, fear, pain, sadness, negative_surprise

  • Neutral: realization, neutral