audio_helper.cli_argparse module
Audio Helper — argparse-based command-line interface.
Thin wrapper around the pure functions in audio_helper.main that
exposes the whole toolkit as subcommands under a single audio-helper
entry point. Written with argparse from the standard library so
the CLI works out of the box on any Python install that has the package
installed — no extra dependency required.
Subcommands
convert— re-encode an audio file (sample rate / channels / codec)duration— print the duration in seconds of an audio filechunk— extract[start, end]slice from an audio filesilence— write a silent audio file of a given durationconcat— concatenate several audio files head-to-tailroomtone— mix pink/white/brown ambient noise onto a speech tracksplit— split an audio file into fixed-duration chunksseparate— run Demucs source separation (needs the[demucs]extra)resemblance— MFCC-based similarity score between two audio files
Usage Example
>>> # audio-helper convert --input in.mp3 --output out.wav --freq 44100
>>> # audio-helper duration --input in.mp3
>>> # audio-helper split --input in.mp3 --output-dir chunks/ --seconds 30
>>> # audio-helper concat --inputs a.mp3 b.mp3 c.mp3 --output out.mp3
>>> # audio-helper silence --duration 5 --output silence.wav
>>> # audio-helper roomtone --input speech.wav --output speech-rt.wav --db -42
>>> # audio-helper chunk --input in.mp3 --start 3.0 --end 8.5 --output cut.mp3
>>> # audio-helper separate --input mix.mp3 --output-dir stems/
>>> # audio-helper resemblance --a a.mp3 --b b.mp3