Entropy Smart De-Esser — User Guide

Intelligent sibilance reduction: uses spectral entropy analysis to detect and attenuate harsh high-frequency content while preserving natural speech character.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This script implements entropy-based smart de-essing — an intelligent approach to sibilance reduction that uses spectral entropy analysis to detect and attenuate harsh "s" and "sh" sounds in speech and vocals. Unlike traditional de-essers that rely on fixed frequency bands or level thresholds, this method analyzes the spectral complexity of the signal to identify sibilant regions, then applies smooth, frequency-preserving gain reduction only where needed.

Key Features:

Why entropy for de-essing? Sibilant sounds ("s", "sh", "ch") have characteristic spectral properties: they contain concentrated high-frequency energy that appears as "complex" or "disordered" in spectral analysis. Spectral entropy measures this complexity: (1) Low entropy: Tonal, harmonic sounds (vowels, musical tones). (2) High entropy: Noisy, complex sounds (sibilants, consonants, noise). The de-esser uses this principle: when entropy exceeds a threshold, gain reduction is applied. Advantages: (1) Content-aware: Automatically adapts to different voices and sibilance types. (2) Frequency-agnostic: Works regardless of the specific sibilance frequency. (3) Natural results: Preserves vocal character while reducing harshness. (4) Minimal artifacts: Smooth gain curves prevent pumping and distortion.

Technical Implementation: (1) Spectral analysis: Convert sound to spectrogram using small windows for temporal precision. (2) Entropy calculation: Compute normalized spectral entropy for each time frame using matrix operations. (3) Smoothing: Apply exponential smoothing to prevent rapid gain fluctuations. (4) Gain curve generation: Create intensity tier that maps entropy values to gain reduction. (5) Application: Multiply original signal by gain curve for smooth attenuation. The system uses optimized matrix processing for speed and includes a monitoring mode to audition only the removed sibilant content.

Quick start

  1. In Praat, select exactly one Sound object containing speech or vocals.
  2. Run script…Entropy_Smart_DeEsser.praat.
  3. Set analysis_window_size (typically 10-20ms for speech).
  4. Adjust smoothing to control gain transition smoothness.
  5. Set entropy_threshold (0.5-0.7 for most material).
  6. Choose max_reduction_db (6-15dB typical range).
  7. Enable listen_to_removed_signal to audition only sibilant content.
  8. Click OK — processing runs with progress updates.
  9. Output appears as "originalname_DeEssed" or "originalname_RemovedNoise".
Quick tip: Start with default parameters for most speech material. Use smaller window sizes (10-15ms) for precise sibilance detection, larger windows (20-30ms) for smoother operation. Higher entropy_threshold (0.7-0.8) for subtle de-essing, lower (0.4-0.6) for aggressive reduction. Max_reduction_db = 6-9dB for natural results, 12-15dB for problematic sibilance. Enable listen_to_removed_signal first to verify only sibilants are being detected. Processing shows real-time progress through entropy calculation and gain application stages.
Important: SPEECH/VOCALS ONLY — designed specifically for sibilance reduction in voice recordings. Musical content may trigger false detections. Very aggressive settings may cause audible gain pumping. Analysis window size affects temporal precision — too small may cause artifacts, too large reduces sibilance detection accuracy. Smoothing too low may cause rapid gain changes, too high may miss brief sibilants. Monitoring mode outputs only the removed content for verification. Output is normalized to prevent clipping but original dynamics are preserved. Test on short segments first to optimize parameters.

Entropy De-essing Theory

Spectral Characteristics of Sibilance

What Makes Sibilants Detectable?

Acoustic properties of sibilant consonants:

Sibilant sounds ("s", "sh", "z", "zh"): High-frequency energy concentration (2-8 kHz typical) Noise-like spectral character Rapid spectral changes High spectral complexity Vowel sounds ("a", "e", "i", "o", "u"): Harmonic, structured spectra Formant patterns (peaks at specific frequencies) Lower spectral complexity More predictable spectral evolution Spectral entropy difference: Sibilants: High entropy (0.7-1.0) Vowels: Low to medium entropy (0.2-0.5) Mixed sounds: Variable entropy Detection principle: High entropy → likely sibilant → apply gain reduction Low entropy → likely vowel → preserve signal

Why Traditional Methods Struggle

Limitations of frequency-based de-essing:

Entropy-based advantages:

Entropy Calculation Method

Matrix-Based Spectral Analysis

Efficient entropy computation:

STEP 1: Spectrogram creation Window size: 15ms (analysis_window_size) Hop size: 5ms (fixed for temporal precision) Frequency range: 0-5000 Hz (covers sibilance range) Window type: Gaussian (good time-frequency resolution) STEP 2: Matrix conversion Spectrogram → Matrix representation Rows = frequency bins, Columns = time frames Enables efficient column-wise processing STEP 3: Column entropy calculation FOR each time column j: Total power: P_total = Σ matrix[i,j] for i=1..nrows IF P_total > 0: FOR each frequency bin i: p[i] = matrix[i,j] / P_total IF p[i] > 0: entropy -= p[i] * log₂(p[i]) Normalize: entropy = entropy / log₂(nrows) STEP 4: Store results Time = x1 + (j-1)*dx Entropy value (0-1)

Why Matrix Processing?

Performance benefits:

Gain Reduction System

Intelligent Gain Curve

Smooth gain application:

Gain calculation formula: gain = if entropy < threshold then 1 else 1 - ((entropy - threshold) / (1 - threshold)) * (1 - min_gain) Where: threshold = entropy_threshold (0.6 default) min_gain = 10^(-max_reduction_db/20) (linear scale) entropy = current smoothed entropy value (0-1) Interpretation: entropy < threshold: No reduction (gain = 1) entropy = threshold: No reduction (gain = 1) entropy = 1.0: Maximum reduction (gain = min_gain) Linear interpolation between threshold and 1.0 Example: threshold=0.6, max_reduction=12dB entropy=0.5 → gain=1.0 (no reduction) entropy=0.8 → gain=0.5 (-6dB reduction) entropy=1.0 → gain=0.25 (-12dB reduction)

Why Smooth Gain Curves?

Artifact prevention:

🎤 Sibilance Detection Intuition

"ssss" sound:

High-frequency noise burst → high spectral entropy → gain reduction


"aaa" sound:

Harmonic, structured spectrum → low spectral entropy → no reduction


"shhh" sound:

Broadband noise → very high entropy → maximum reduction

Temporal Smoothing

Exponential Smoothing

Control signal conditioning:

Exponential smoothing formula: smoothed[n] = α * raw[n] + (1-α) * smoothed[n-1] Where: α = smoothing parameter (0.05 default) raw[n] = current raw entropy value smoothed[n] = current smoothed value smoothed[n-1] = previous smoothed value Effect: Small α (0.01-0.1): Heavy smoothing, slow response Large α (0.2-0.5): Light smoothing, fast response Default α=0.05: Balanced for speech Purpose: Prevents rapid gain fluctuations Reduces false triggers from brief noise Creates musical gain changes

Why Causal Smoothing?

Real-time compatibility:

Processing Pipeline

🔧 Four-Stage De-essing Pipeline

Complete signal path from input to output:

Stage 1: Spectral Analysis & Entropy Calculation

StepOperationPurpose
1.1Sound → SpectrogramTime-frequency representation
1.2Spectrogram → MatrixEfficient data structure
1.3Column-wise power sumTotal energy per frame
1.4Probability distributionNormalized spectral weights
1.5Entropy calculationSpectral complexity measure
1.6Normalization0-1 range for consistency

Stage 2: Control Signal Conditioning

StepOperationPurpose
2.1Exponential smoothingPrevent rapid fluctuations
2.2Create IntensityTierContinuous control signal
2.3Time mappingSample-accurate modulation

Stage 3: Gain Curve Generation

StepOperationPurpose
3.1Copy entropy tierBase for gain calculation
3.2Apply gain formulaEntropy → gain mapping
3.3Threshold applicationOnly reduce above threshold
3.4Linear interpolationSmooth gain transitions

Stage 4: Signal Processing & Output

StepOperationPurpose
4.1Copy original soundPreserve source material
4.2Apply gain curveMultiply by gain values
4.3Output selectionClean or removed signal
4.4Peak normalizationSafe playback level
4.5Rename outputClear identification

Complete Signal Flow

INPUT SPEECH/VOCALS ↓ SPECTROGRAM (15ms windows, 5ms hop) ↓ MATRIX CONVERSION ↓ COLUMN-WISE ENTROPY CALCULATION ↓ EXPONENTIAL SMOOTHING (α=0.05) ↓ INTENSITYTIER CONTROL SIGNAL ↓ GAIN CURVE GENERATION (threshold=0.6, max_reduction=12dB) ↓ ↓ APPLY GAIN: clean_signal = original * gain_curve ↓ OUTPUT: originalname_DeEssed ↓ OR (if monitoring): ↓ EXTRACT: removed = original * (1 - gain_curve) ↓ OUTPUT: originalname_RemovedNoise

Computational Optimizations

Performance enhancements:
  • Matrix processing: Avoids repeated FFT calculations
  • No progress in inner loops: Uses 'noprogress' for speed
  • Efficient memory management: Intermediate objects cleaned up
  • Optimized spectrogram: Praat's efficient implementation
  • Formula-based gain: No sample-by-sample loops

Balances processing speed with audio quality

Parameters Guide

⚙️ Complete Parameter Reference

Detailed explanation of all user-controllable parameters:

Analysis Parameters

ParameterDefaultRangeDescription
analysis_window_size0.0150.01-0.03FFT window size in seconds
smoothing0.050.01-0.3Entropy smoothing factor

De-Esser Settings

ParameterDefaultRangeDescription
entropy_threshold0.60.3-0.8Entropy level to start reduction
max_reduction_db12.03.0-20.0Maximum gain reduction in dB

Output Mode

ParameterDefaultOptionsDescription
listen_to_removed_signal00/1Output cleaned signal or removed content

Parameter Interactions

Key relationships:
  • Window size vs temporal precision: Smaller = better sibilance timing
  • Threshold vs reduction: Lower threshold = more aggressive processing
  • Smoothing vs responsiveness: More smoothing = slower gain changes
  • Max reduction vs naturalness: Less reduction = more natural sound

Parameters work together to control de-essing character

Recommended Settings

🎤 Gentle Vocal De-essing

Goal: Subtle sibilance control for natural vocals

Settings:

  • Window: 15ms
  • Smoothing: 0.08
  • Threshold: 0.65
  • Max reduction: 6dB
  • Output: Clean signal (0)

🎙️ Aggressive Speech Processing

Goal: Strong sibilance reduction for problematic recordings

Settings:

  • Window: 12ms
  • Smoothing: 0.03
  • Threshold: 0.5
  • Max reduction: 15dB
  • Output: Clean signal (0)

🔍 Diagnostic Monitoring

Goal: Verify sibilance detection before processing

Settings:

  • Window: 10ms
  • Smoothing: 0.02
  • Threshold: 0.6
  • Max reduction: 12dB
  • Output: Removed signal (1)

Applications

Vocal Recording

Use case: Control sibilance in vocal recordings

Technique: Use gentle settings for natural results

Example: Music vocals where "s" sounds are too prominent

Podcast & Voiceover

Use case: Improve speech intelligibility

Technique: Moderate settings for clear dialogue

Example: Podcast audio where sibilance causes listener fatigue

Field Recording

Use case: Clean up documentary or interview audio

Technique: Use monitoring mode to verify processing

Example: Interview recordings with varying microphone techniques

Audio Restoration

Use case: Reduce sibilance in archival recordings

Technique: Conservative settings to preserve character

Example: Historical speech recordings with harsh high frequencies

💡 Pro Tips

Workflow recommendations:

  • Always monitor first: Use removed signal mode to verify detection
  • Start gentle: Begin with subtle settings and increase if needed
  • Check different material: Test on various speech segments
  • Compare before/after: A/B test to ensure natural results
  • Consider context: Music vs speech may need different settings

Advanced Techniques

Creative applications:
  • Serial processing: Apply multiple times with different thresholds
  • Selective processing: Process only problematic sections
  • Hybrid approaches: Combine with traditional frequency-based de-essing
  • Automation: Vary parameters for different program material

Entropy de-essing can be integrated into complex audio workflows

Troubleshooting Common Issues

Problem: Over-processing (lisping sound)
Cause: Threshold too low, reduction too aggressive
Solution: Increase threshold, reduce max_reduction_db
Problem: Under-processing (sibilance remains)
Cause: Threshold too high, insufficient reduction
Solution: Lower threshold, increase max_reduction_db
Problem: Gain pumping artifacts
Cause: Smoothing too low, rapid gain changes
Solution: Increase smoothing parameter
Problem: False triggers on non-sibilants
Cause: Threshold too low, window too small
Solution: Increase threshold, use larger window size

Technical Deep Dive

Spectral Analysis Mathematics

Entropy Calculation Details

Implementation specifics:

Power calculation from spectrogram: spectrogram[i,j] represents power in frequency bin i at time j Total power per frame: P_total[j] = Σ spectrogram[i,j] for i=1..nrows Normalized distribution: p[i,j] = spectrogram[i,j] / P_total[j] Spectral entropy: H[j] = -Σ p[i,j] * log₂(p[i,j]) (Sum over bins where p[i,j] > numerical threshold) Maximum entropy: H_max = log₂(nrows) Normalized entropy: H_norm[j] = H[j] / H_max Numerical considerations: Small values (< 1e-10) treated as zero for stability log₂ computation uses natural log conversion: log₂(x) = ln(x)/ln(2) Normalization ensures 0 ≤ H_norm ≤ 1

Gain Curve Mathematics

Precise Gain Calculation

Linear interpolation formula:

Given: e = current entropy value (0-1) t = entropy_threshold (0.6 default) r_max = max_reduction_db (12.0 default) g_min = 10^(-r_max/20) (minimum linear gain) Gain calculation: if e < t: gain = 1.0 else: gain = 1 - ((e - t) / (1 - t)) * (1 - g_min) Example with t=0.6, r_max=12dB (g_min=0.251): e=0.5 → gain=1.0 e=0.7 → gain=1 - (0.1/0.4)*0.749 = 1 - 0.187 = 0.813 e=0.8 → gain=1 - (0.2/0.4)*0.749 = 1 - 0.375 = 0.625 e=1.0 → gain=1 - (0.4/0.4)*0.749 = 1 - 0.749 = 0.251 dB conversion: gain_dB = 20*log₁₀(gain_linear)