arXiv · 2606.05394
nnAudio 2: Overcoming Dynamic Compilation Barriers and Transform Inconsistencies
Abstract
nnAudio is an open-source audio feature extraction toolbox for deep learning, but its use in current environments is hindered by TorchScript incompatibilities, inverse-transform edge cases, and dependency drift. We present a targeted modernization for modern PyTorch and scientific Python. We resolve TorchScript compilation failures in STFT and iSTFT by removing dynamic state mutation and module construction from scripted code paths and tightening argument handling in inverse-related helpers. We clarify inverse-STFT behavior by restricting reliable inversion to the uniform-bin setting (freq_scale=`no') and raising explicit runtime errors for unsupported frequency scales, preventing silently degraded reconstructions. We restore CFP compatibility with modern SciPy and ensure VQT reduces to CQT when gamma = 0. Regression tests cover the new STFT/iSTFT behaviors, and the updated codebase passes the full repository test suite in a modern Python environment. These improvements provide a more robust foundation for differentiable audio analysis in research and deployment.
Explore related subjects
Keep this discovery
Abhinaba Roy, Junyi Liang, Dorien Herremans. 2026-06-03. nnAudio 2: Overcoming Dynamic Compilation Barriers and Transform Inconsistencies. https://arxiv.org/abs/2606.05394
Cite the original work for its findings. Save a collection to share your selection of sources.