๐ฏ Extract vocals โ enhance โ export. A dual-interface voice enhancement tool that separates vocals from any audio/video, runs them through a professional-grade 6-filter FFmpeg chain, and outputs pristine WAV files โ automatically named and never overwritten.
It ships in two forms:
- ๐
noise-filter(Python CLI) โ Click CLI + Textual TUI with preset profiles, per-filter overrides, and TOML config - ๐
./noise-filter(Bash script) โ standalone Bash script with zero Python dependencies
Both share the same backend pipeline: audio-separator for vocals extraction โ FFmpeg 6-filter chain โ auto-named output.
- ๐ค Voice extraction โ isolates vocals from any audio/video using
audio-separator(BS-Roformer model) - ๐ง 6-filter FFmpeg chain โ
highpassโafftdnโanlmdnโacompressorโequalizerโlowpass - ๐๏ธ 4 built-in presets โ Light, Medium (default), Heavy, and Custom (user-defined)
- ๐๏ธ Per-filter overrides โ CLI flags and TUI inputs fine-tune individual parameters
- โ๏ธ TOML configuration โ persistent user settings at
~/.config/noise-filter/config.toml - ๐ข Auto-incrementing output โ never overwrites files; produces
_VOICE_ENHANCED_01.wav,_02, etc. - ๐ฅ๏ธ Dual interface โ full-featured Python CLI + TUI, or zero-dependency Bash script
- ๐๐ง Cross-platform โ tested on Linux (x86_64), macOS Intel, and macOS Apple Silicon
- Prerequisites
- Installation
- Usage
- Preset Reference
- Configuration
- How It Works
- Cross-Platform Compatibility
- Project Structure
- Contributing
- License
| Tool | Version | Installation |
|---|---|---|
| FFmpeg | 4.4+ | apt install ffmpeg (Debian) / brew install ffmpeg (macOS) |
| FFprobe | (ships with FFmpeg) | included with FFmpeg |
| audio-separator | latest | see Installation |
FFmpeg 4.4+ is required for the anlmdn audio filter. Most distribution packages and Homebrew builds satisfy this.
For the Python CLI/TUI, you also need Python 3.11+ with pip.
The ./noise-filter Bash script has no Python dependencies โ only FFmpeg and audio-separator are required.
# Install FFmpeg sudo apt install ffmpeg # Linux brew install ffmpeg # macOS # Install audio-separator in a virtual environment python3 -m venv ~/.venvs/audio-separator ~/.venvs/audio-separator/bin/pip install audio-separator # Download and use the script git clone https://github.com/ambushalgorithm/noise-filter.git cd noise-filter ./noise-filter recording.mkv
# FFmpeg and audio-separator still required (see above) pip install noise-filter # Or from source git clone https://github.com/ambushalgorithm/noise-filter.git cd noise-filter pip install -e .
Dependencies installed automatically: click, toml, textual, platformdirs.
# Bash script ./noise-filter --help # Python CLI noise-filter --help # Python TUI noise-filter --tui
noise-filter [OPTIONS] [INPUT]
| Option | Short | Description |
|---|---|---|
--preset |
-p |
Preset profile: light, medium, heavy, custom (default: medium) |
--highpass-freq |
Highpass cutoff in Hz (20โ300) | |
--afftdn-noise-floor |
AFFTDN noise floor in dB (-80 to -10) | |
--anlmdn-strength |
ANLMDN strength (1โ15) | |
--anlmdn-power |
ANLMDN power (0.001โ0.100) | |
--acompressor-threshold |
Compressor threshold in dBFS (-60 to 0) | |
--acompressor-ratio |
Compressor ratio (1.0โ20.0) | |
--equalizer-freq |
EQ center frequency in Hz (20โ20000) | |
--equalizer-type |
EQ filter type (q, lowshelf, highshelf, lowpass, highpass) |
|
--equalizer-width |
EQ Q factor width (0.1โ10.0) | |
--equalizer-gain |
EQ gain in dB (-20 to +20) | |
--lowpass-freq |
Lowpass cutoff in Hz (4000โ16000) | |
--output-dir |
-o |
Output directory (default: same directory as input) |
--tui |
Launch Textual TUI |
Examples:
# Process with medium preset (default) noise-filter recording.wav # Light preset โ minimal processing for clean audio noise-filter -p light podcast.wav # Heavy preset โ aggressive noise reduction noise-filter -p heavy outdoor-recording.mkv # Custom preset with per-filter override noise-filter -p heavy --highpass-freq 150 --equalizer-gain 4 meeting.mkv # Specify output directory noise-filter input.mp4 -o ~/enhanced/ # Custom output filename via the Bash script ./noise-filter input.wav -o my-custom-name.wav
Four presets control all 6 filters simultaneously:
| Preset | Best for |
|---|---|
light |
Already-clean audio (quiet room, good mic) โ preserves natural timbre |
medium |
General-purpose voice enhancement (podcasts, meetings, voiceovers) โ matches original ./noise-filter defaults |
heavy |
Poor recording conditions (outdoor, cafe, construction noise) โ may sound processed |
custom |
User-defined values from config file [override] section |
๐ก Tip: CLI flags override the preset for individual parameters. Precedence: CLI flags > config file > built-in preset defaults.
Any filter parameter can be overridden on the command line:
noise-filter --preset light --highpass-freq 100 --equalizer-gain 3 input.wav
This uses the Light preset but with a 100 Hz highpass (instead of 80) and +3 dB EQ gain (instead of +2).
Persistent configuration at ~/.config/noise-filter/config.toml (Linux) or ~/Library/Application Support/noise-filter/config.toml (macOS):
# Override individual preset values [presets.light] highpass_freq = 100 # Custom preset parameters (used with --preset custom) [override] highpass_freq = 150 acompressor_ratio = 4.0 [defaults] selected_preset = "heavy"
See Configuration for the full schema.
Launch with:
noise-filter --tui
The TUI has 3 screens with forward/back navigation:
- ๐ Input & Preset โ Input file path, output directory, preset selector dropdown, "Next โ" button
- ๐๏ธ Filter Parameters โ All 11 per-filter parameter inputs with live filter chain preview, "โ Back" and "Next โ" buttons
โถ๏ธ Run & Results โ Filter chain preview string, Run button, progress bar, status/output text, "โ Back" button
The Bash script offers a lightweight alternative with no Python dependency:
./noise-filter <input> [options] Options: -o <path> Custom output file path --force Overwrite existing output --help Show usage
The script uses the same medium preset defaults as noise-filter --preset medium.
When run, it produces three files in the output directory:
- Enhanced WAV โ noise-reduced vocals (auto-named)
- Vocals stem โ raw vocals extraction (copied from separator)
- Instrumental stem โ remaining audio (copied from separator, if available)
For an input file named Screen-2026-04-24_10-54-42.mkv, the pipeline produces:
| File | Description |
|---|---|
Screen-2026-04-24_10-54-42_VOCALS_model_bs_roformer_ep_317_sdr_12.wav |
๐ค Extracted vocals stem |
Screen-2026-04-24_10-54-42_INSTRUMENTALS_model_bs_roformer_ep_317_sdr_12.wav |
๐ต Remaining instrumental stem |
Screen-2026-04-24_10-54-42_VOICE_ENHANCED_01.wav |
โจ Final enhanced output |
๐ The enhanced output filename auto-increments:
_VOICE_ENHANCED_01.wav,_02.wav,_03.wavโ existing files are never overwritten.
| Filter | param | โ๏ธ Light | ๐ค๏ธ Medium | ๐ฉ๏ธ Heavy |
|---|---|---|---|---|
| highpass | f (Hz) | 80 | 120 | 200 |
| afftdn | nf (dB) | -20 | -30 | -50 |
| anlmdn | s | 3 | 7 | 12 |
| anlmdn | p | 0.001 | 0.002 | 0.005 |
| acompressor | threshold (dB) | -12 | -18 | -24 |
| acompressor | ratio | 2:1 | 3:1 | 6:1 |
| equalizer | f (Hz) | 3000 | 3000 | 2500 |
| equalizer | type | q | q | q |
| equalizer | w (Q) | 1.0 | 1.0 | 1.5 |
| equalizer | g (dB) | +2 | +4 | +6 |
| lowpass | f (Hz) | 12000 | 9000 | 7000 |
FFmpeg filter strings:
โ๏ธ light: highpass=f=80,afftdn=nf=-20,anlmdn=s=3:p=0.001,acompressor=threshold=-12dB:ratio=2,equalizer=f=3000:t=q:w=1:g=2,lowpass=f=12000
๐ค๏ธ medium: highpass=f=120,afftdn=nf=-30,anlmdn=s=7:p=0.002,acompressor=threshold=-18dB:ratio=3,equalizer=f=3000:t=q:w=1:g=4,lowpass=f=9000
๐ฉ๏ธ heavy: highpass=f=200,afftdn=nf=-50,anlmdn=s=12:p=0.005,acompressor=threshold=-24dB:ratio=6,equalizer=f=2500:t=q:w=1.5:g=6,lowpass=f=7000
| Platform | Path |
|---|---|
| ๐ง Linux | ~/.config/noise-filter/config.toml |
| ๐ macOS | ~/Library/Application Support/noise-filter/config.toml |
| ๐ Fallback (XDG) | $XDG_CONFIG_HOME/noise-filter/config.toml |
# Built-in preset overrides (optional โ overrides individual default values) [presets.light] highpass_freq = 80 afftdn_noise_floor = -20 # ... all 11 filter parameters (see Preset Reference table) [presets.medium] highpass_freq = 120 # ... [presets.heavy] highpass_freq = 200 # ... # Custom preset โ activated with --preset custom # Partial overrides: unspecified params fall back to medium preset defaults [override] highpass_freq = 150 equalizer_gain = 4 # null or omitted keys inherit from the preset [defaults] selected_preset = "medium" # or "light", "heavy", "custom" # output_dir = "~/enhanced" # optional default output directory # force = false # whether to overwrite without prompting
๐ฅ CLI flags > ๐ฅ [override] section > ๐ฅ preset definition > built-in defaults
- All numeric values are clamped to their documented min/max ranges
equalizer_typemust be one of:q,lowshelf,highshelf,lowpass,highpass- Invalid values fall back to defaults with a warning
- Missing or empty config file uses built-in defaults (medium preset)
INPUT (audio or video)
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ffprobe stream detection โ ๐ Identifies audio & video streams
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ffmpeg audio extraction โ ๐๏ธ (video inputs only) Extract PCM
โ pcm_s16le / 48 kHz / mono โ audio stream to temp file
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ audio-separator โ ๐ค BS-Roformer model separates into
โ vocals stem extraction โ Vocals + Instrumental stems
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ffmpeg 6-filter chain โ ๐ง highpass โ afftdn โ anlmdn โ
โ โ acompressor โ equalizer โ lowpass
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
OUTPUT: _VOICE_ENHANCED_NN.wav โจ
+ _VOCALS_.wav (copied to output dir) ๐ค
+ _INSTRUMENTALS_.wav (copied to output dir) ๐ต
Key design decisions:
- ๐๏ธ Pipe-free architecture uses temp files for reliability
- ๐ 6-filter order is immutable โ all presets use the same chain with different parameters
- ๐ Vocal stem copied to output directory alongside enhanced result
- ๐ข Auto-incrementing filenames prevent accidental overwrites
- ๐งน Temp directory cleaned up on success, error, or Ctrl+C
| Capability | ๐ง Linux (x86_64) | ๐ macOS Intel (x86_64) | ๐ macOS Apple Silicon (arm64) |
|---|---|---|---|
| FFmpeg 4.4+ | โ
apt/dnf/pacman |
โ
brew |
โ
brew |
| audio-separator | โ | โ | โ |
| Python 3.11+ | โ | โ | โ |
| Bash script | โ | โ | โ |
| CLI / TUI | โ | โ | โ |
| Large files (>1 GB) | โ | โ | โ |
noise-filter/
โโโ noise-filter # ๐ Bash script โ original voice enhancement engine
โโโ noise_filter/ # ๐ Python package โ CLI + TUI wrapper
โ โโโ __init__.py
โ โโโ cli.py # ๐ฅ๏ธ Click CLI entry point
โ โโโ config.py # โ๏ธ TOML config loading (XDG paths)
โ โโโ presets.py # ๐๏ธ Built-in presets + filter string construction
โ โโโ subprocess.py # ๐ง ffmpeg/audio-separator subprocess orchestration
โ โโโ tui/
โ โโโ __init__.py
โ โโโ app.py # ๐ฅ๏ธ Textual TUI app (3-screen navigation)
โ โโโ screens.py # ๐ InputScreen, ๐๏ธ FilterScreen, โถ๏ธ RunScreen
โโโ tests/ # ๐งช pytest test suite (109 tests)
โโโ pyproject.toml # ๐ฆ Python package configuration
โโโ README.md
โโโ LICENSE # ๐ MIT License
Contributions are welcome! See CONTRIBUTING.md for:
- ๐ ๏ธ Development setup
- ๐งช Running tests (
pytest) - ๐ Code style guidelines
- ๐ Pull request process
MIT โ see LICENSE. Free to use, modify, and distribute.