Overview
Tafrigh uses multiple noise reduction techniques that work together:- High-pass filtering: Removes low-frequency noise
- Low-pass filtering: Removes high-frequency noise
- FFT-based denoising: Learns and removes specific noise profiles
- Dialogue enhancement: Boosts speech frequencies
High-pass filtering
A high-pass filter attenuates frequencies below a specified cutoff, removing low-frequency noise while preserving speech.When to use it
- Rumble: Microphone handling noise, traffic, machinery
- Hum: Electrical interference (50/60 Hz AC hum)
- Wind noise: Outdoor recordings
- HVAC noise: Air conditioning, ventilation systems
How it works
Frequencies below the cutoff are progressively attenuated:- Fundamental frequencies of male voices: ~85-180 Hz
- Fundamental frequencies of female voices: ~165-255 Hz
- Speech intelligibility: mostly above 250 Hz
Configuration
Cutoff frequency in Hz. Set to
null to disable.Examples
Low-pass filtering
A low-pass filter attenuates frequencies above a specified cutoff, removing high-frequency noise while preserving speech.When to use it
- Hiss: Tape hiss, analog noise
- Electronic interference: Digital artifacts, radio interference
- Sibilance: Excessive “s” and “sh” sounds
- High-frequency artifacts: Compression artifacts, clipping
How it works
Frequencies above the cutoff are progressively attenuated:- Most speech intelligibility: below 3500 Hz
- Consonant clarity: 2000-4000 Hz
- Sibilants (s, sh, f): 4000-8000 Hz
Configuration
Cutoff frequency in Hz. Set to
null to disable.Examples
FFT-based denoising
FFT (Fast Fourier Transform) denoising learns a noise profile from a sample of your audio and removes it from the entire file.When to use it
- Consistent background noise: AC units, fans, computers
- Room tone: Ambient noise in a recording space
- Electrical hum: Constant 50/60 Hz interference
- White/pink noise: Analog recording noise
How it works
- Sample the noise: You specify a time range (
afftdnStarttoafftdnStop) that contains only background noise - Learn the profile: The denoiser analyzes the frequency spectrum of the noise
- Remove the noise: The learned profile is subtracted from the entire audio file
- Threshold control:
afftdn_nfsets the noise floor (how aggressive the removal is)
Finding a noise sample
You need a segment of your audio that contains only background noise, no speech:- Open your audio in a media player
- Find a section before the speaker begins, during a long pause, or after they finish
- Note the start and end timestamps (aim for 0.5-3 seconds)
- Use these timestamps for
afftdnStartandafftdnStop
Configuration
Start time in seconds for noise sampling. Must be used with
afftdnStop.End time in seconds for noise sampling. Must be used with
afftdnStart.Noise floor in dB. Lower values are more aggressive. Must be used with
afftdnStart and afftdnStop.Examples
Choosing the noise floor
Theafftdn_nf parameter controls how aggressively noise is removed:
- Light reduction (
-15to-10dB): Removes obvious noise, preserves audio character - Moderate reduction (
-20to-25dB): Good balance for most use cases - Aggressive reduction (
-30to-40dB): Maximum noise removal, may affect speech quality
Dialogue enhancement
Dialogue enhancement boosts mid-range frequencies (1000-4000 Hz) where human speech is most prominent.When to use it
- Muffled recordings: Low-quality microphones, distance from speaker
- Background music: When speech competes with music
- Multiple speakers: Helps individual voices stand out
- Generally recommended: Almost always improves transcription accuracy
How it works
The enhancement applies a frequency curve that:- Boosts 1000-2000 Hz (vowel clarity)
- Boosts 2000-4000 Hz (consonant definition)
- Leaves other frequencies unchanged
Configuration
Enable dialogue enhancement. Set to
false to disable.Examples
Complete examples
Clean studio recording
Minimal processing for high-quality audio:Podcast with moderate noise
Balanced settings for typical podcast audio:Noisy field recording
Aggressive processing for challenging audio:Telephone or low-quality audio
Telephone bandwidth simulation:No preprocessing
Disable all noise reduction:Troubleshooting
Speech sounds muffled or underwater
Problem: Over-aggressive noise reduction is removing speech frequencies. Solutions:- Increase
afftdn_nf(make it less negative):-35→-20→-15 - Widen filter ranges:
highpass: 200instead of400,lowpass: 3500instead of3000 - Check your noise sample doesn’t contain speech
Noise remains in the transcription
Problem: Noise reduction isn’t strong enough. Solutions:- Decrease
afftdn_nf(make it more negative):-15→-20→-30 - Narrow filter ranges:
highpass: 400instead of200,lowpass: 2500instead of3500 - Ensure your noise sample is 1-3 seconds long and representative
- Check that noise is consistent (FFT denoising only works for consistent noise)
Voices sound robotic or have artifacts
Problem: Too much processing or poor noise sample. Solutions:- Choose a better noise sample (no speech, representative background noise)
- Reduce denoising aggressiveness:
afftdn_nf: -15instead of-30 - Disable FFT denoising entirely if noise sample is poor
- Use only filters: set
afftdnStart,afftdnStop,afftdn_nftonull
Low-quality audio after preprocessing
Problem: Filters are too restrictive. Solutions:- Widen the frequency range:
highpass: 100,lowpass: 4000 - Try minimal filtering: only
dialogueEnhance: true - Test without preprocessing:
noiseReduction: null
Monitoring preprocessing
Use callbacks to track preprocessing progress:Best practices
- Start with defaults: The default settings work well for most audio
- Test incrementally: Change one parameter at a time to see its effect
- Listen to your audio: Identify specific noise types to target
- Choose good noise samples: 1-3 seconds of noise-only audio
- Don’t over-process: More filtering isn’t always better
- Preserve speech: When in doubt, be conservative
- Document your settings: Save working configurations for similar audio
Related
Preprocess options
Full preprocessing configuration reference
Split options
Configure audio chunk splitting