v0.4.0
Breaking changes:
- Drop Python 3.7 support (EOL since June 2023)
- Drop pydub dependency; ffmpeg is now required directly for non-WAV/raw formats
- Replace pyaudio with sounddevice for microphone input
- Remove deprecated
AudioRegion.metaaccessor (use.start/.end) - Remove deprecated
AudioRegion.samplesproperty (use.numpy()) - Make
split(),trim(),split_and_plot()keyword-only after the first positional argument - Remove
datasetmodule; splitcore.pyintoaudio.pyandcore.py - Remove
setup.py; migrate topyproject.toml
New features:
- Add
FFmpegAudioSource: streams audio from an ffmpeg subprocess pipe, ~2x faster than pydub's temp-file approach - Add
trim()to remove leading and trailing silence from audio - Add
fix_pauses()/remove_pauses()to normalize pauses between audio events - Add
max_leading_silenceparameter tosplit(),trim(), andStreamTokenizerto preserve natural sound onsets - Add
max_trailing_silenceparameter to control trailing silence independently ofmax_silence; deprecatedrop_trailing_silence split()acceptsmax_dur=None(orfloat("inf")) for unlimited event lengthFFmpegAudioSourceacceptssampling_rate,sample_width,channelsfor on-the-fly conversionfrom_file()forwardssr/sw/chtoFFmpegAudioSource- Use ffmpeg for audio export;
save()acceptsaudio_codec,audio_bitrate,audio_quality,ffmpeg_extra_args AudioRegion._repr_html_()renders inline HTML5 audio player in Jupyter- Add interactive Jupyter widget:
split_and_plot(interactive=True)with Canvas waveform, clickable regions, playback controls, and time ruler - Restructure CLI with subcommands:
auditok split(default),auditok trim,auditok fix-pauses - Add
--max-leading-silenceand--max-trailing-silenceCLI options - Add recording indicator with elapsed time for mic-based
trimandfix-pauses - Make
--drop-trailing-silencedeprecated in CLI
Packaging and metadata:
- Migrate from
setup.pytopyproject.toml - Make
matplotlib,sounddevice, andtqdmoptional (pip install auditok[all]) - Update development status from Alpha to Production/Stable
- Add VAD, silence detection, and audio segmentation keywords for PyPI
- Add Python 3.14 support
- Add type annotations to public API with
py.typedmarker (PEP 561) - Add mypy to pre-commit hooks
Bug fixes:
- Fix
split()usinganalysis_windowinstead of actual frame duration after int truncation - Validate
hop_sizeandblock_sizein_OverlapAudioReader - Fix matplotlib plot layout: wide figure default, proper legend placement
- Fix deprecated
AudioRegion.meta.start/.endusage insplit_and_plot() - Suppress C-level ALSA/JACK/OSS warnings from PortAudio during initialization
- Fix resource leak in
split()when generator is not fully consumed