GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - ambushalgorithm/noise-filter: ๐ŸŽค Voice enhancement CLI + TUI โ€” extract vocals, apply pro-grade 6-filter FFmpeg chain, output clean WAV files. Presets, configurable, cross-platform.

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
noise_filter
noise_filter
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
README.md
README.md
 
 
noise-filter
noise-filter
 
 
pcloud-setup-prompt.md
pcloud-setup-prompt.md
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

๐ŸŽค Noise Filter

License: MIT Platform: Linux | macOS Python 3.11+ Tests FFmpeg 4.4+

๐ŸŽฏ 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.


โœจ Features

  • ๐ŸŽค 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

๐Ÿ“‹ Table of Contents

  • Prerequisites
  • Installation
  • Usage
  • Preset Reference
  • Configuration
  • How It Works
  • Cross-Platform Compatibility
  • Project Structure
  • Contributing
  • License

๐Ÿ“ฆ Prerequisites

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.


๐Ÿš€ Installation

๐Ÿš Quick Start (Bash Script)

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

๐Ÿ Python Package

# 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.

โœ… Verifying Installation

# Bash script
./noise-filter --help

# Python CLI
noise-filter --help

# Python TUI
noise-filter --tui

๐ŸŽฎ Usage

๐Ÿ–ฅ๏ธ Basic CLI Usage

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

๐ŸŽš๏ธ Presets

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.

๐ŸŽ›๏ธ Per-Filter Overrides

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).

โš™๏ธ Config File

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.

๐Ÿ–ฅ๏ธ TUI (Terminal UI)

Launch with:

noise-filter --tui

The TUI has 3 screens with forward/back navigation:

  1. ๐Ÿ“‚ Input & Preset โ€” Input file path, output directory, preset selector dropdown, "Next โ†’" button
  2. ๐ŸŽ›๏ธ Filter Parameters โ€” All 11 per-filter parameter inputs with live filter chain preview, "โ† Back" and "Next โ†’" buttons
  3. โ–ถ๏ธ Run & Results โ€” Filter chain preview string, Run button, progress bar, status/output text, "โ† Back" button

๐Ÿš Using the Bash Script Directly

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)

๐Ÿ“ Output Files

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.


๐Ÿ“Š Preset Reference

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

โš™๏ธ Configuration

๐Ÿ“ File Location

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

๐Ÿ“ Schema

# 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

๐Ÿ“ Precedence

๐Ÿฅ‡ CLI flags  >  ๐Ÿฅˆ [override] section  >  ๐Ÿฅ‰ preset definition  >  built-in defaults

โœ… Parameter Validation

  • All numeric values are clamped to their documented min/max ranges
  • equalizer_type must 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)

๐Ÿ”ง How It Works

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

๐Ÿ–ฅ๏ธ Cross-Platform Compatibility

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) โœ… โœ… โœ…

๐Ÿ“‚ Project Structure

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

๐Ÿค Contributing

Contributions are welcome! See CONTRIBUTING.md for:

  • ๐Ÿ› ๏ธ Development setup
  • ๐Ÿงช Running tests (pytest)
  • ๐Ÿ“ Code style guidelines
  • ๐Ÿ”€ Pull request process

๐Ÿ“„ License

MIT โ€” see LICENSE. Free to use, modify, and distribute.

About

๐ŸŽค Voice enhancement CLI + TUI โ€” extract vocals, apply pro-grade 6-filter FFmpeg chain, output clean WAV files. Presets, configurable, cross-platform.

Topics

audio-processingbashcliffmpegnoise-reductionpythontextualtuivoice-enhancement

Resources

Readme

Contributing

Contributing
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.