Skip to content

Explore oruk

Audio ML guide

Prosody features for speech emotion and sarcasm

Prosody is the pattern of pitch, timing, energy, and voice quality across an utterance. These cues shift the probability of different interpretations. They do not form a lookup table where one contour always means one emotion or intention.

Five useful feature families

FamilyMeasurementsCan contribute evidence aboutImportant confound
Pitch and intonationF0 level, range, slope, contour, resets, and variabilityQuestions, emphasis, excitement, uncertainty, and contrastive deliveryPitch differs by speaker, language, phrase type, and recording quality.
Energy and intensityRMS energy, loudness contour, peaks, and dynamic rangeEmphasis, arousal, reduced engagement, and turn-taking behaviorMicrophone distance and automatic gain control can dominate raw energy.
Timing and rhythmSpeech rate, pauses, duration, articulation rate, and final lengtheningHesitation, planning, emphasis, interruption, and conversational stanceDisfluency and silence depend heavily on task and dialogue position.
Voice qualityHarmonics-to-noise ratio, spectral tilt, jitter, shimmer, and phonation typeBreathiness, tenseness, strain, creak, and speaker effortCodec artifacts, health, age, and microphone response are confounds.
Spectral representationFormants, cepstral coefficients, learned embeddings, and temporal spectraTimbre, articulation, phonetic content, and distributed acoustic patternsLearned features are predictive without always being human-interpretable.

Contours beat averages

Mean pitch discards whether the voice rose, fell, reset, or peaked on a particular word. Mean energy discards emphasis. Whole-file averages are useful summaries, but sequence models and time-local segments retain the structure listeners use.

Normalize carefully

A pitch value only makes sense relative to a speaker and local context. Energy only makes sense after accounting for recording gain. Prefer speaker-aware or utterance-aware normalization while preserving meaningful changes within the phrase.

Why sarcasm is harder than an acoustic label

Sarcastic delivery can involve exaggerated pitch, unusual timing, flattened affect, lengthening, laughter, or a mismatch between the words and the voice. None is necessary or sufficient. The original MUStARD paper found that conversational context and multiple modalities improve the task. Acoustic models can expose a sarcasm-related style score; the application must combine that evidence with words and context.

A practical modeling recipe

  1. 01

    Start with waveform or log-mel audio. Keep enough temporal resolution to preserve syllables, pauses, and local contours.

  2. 02

    Use a pretrained speech encoder. Learned embeddings usually capture richer interactions than a small handcrafted feature list.

  3. 03

    Retain interpretable diagnostics. Pitch, energy, rate, and quality measures remain valuable for slicing errors and detecting recording shifts.

  4. 04

    Predict multiple labels. Real delivery can sound frustrated and worried, or confident and playful, at the same time.

  5. 05

    Calibrate per label. A useful 0.8 score should mean something on held-out audio; one shared cutoff rarely works across classes.

  6. 06

    Test across speakers and domains. Include speaker-independent and cross-corpus evaluations plus production noise and codec slices.

Hear the features, then inspect the scores

Record a short phrase with two different deliveries. The live analyzer returns the transcript plus separate emotion and speaking-style scores, making the word–delivery distinction visible without requiring an account.