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.


翻译:nnAudio是一个面向深度学习的开源音频特征提取工具箱,但在当前环境下其应用受到TorchScript不兼容、逆变换边界条件以及依赖库版本漂移等问题的制约。我们针对现代PyTorch和科学Python环境提出了一套针对性现代化方案。通过从脚本化代码路径中移除动态状态变异与模块构造,并收紧逆变换相关辅助函数的参数处理,解决了STFT和iSTFT中的TorchScript编译失败问题。通过将可靠逆变换限制在均匀频点设置(freq_scale=`no')并针对不支持的频点尺度显式抛出运行时错误,消除静默退化的重构结果,明确了逆STFT的行为边界。恢复了与现代SciPy的CFP兼容性,并确保当gamma=0时VQT退化为CQT。回归测试覆盖了新的STFT/iSTFT行为,更新后的代码库在现代Python环境下通过完整仓库测试套件。这些改进为可微分音频分析的研究与部署提供了更稳健的基础。

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
万字综述,GNN在NLP中的应用,建议收藏慢慢看
专知会员服务
59+阅读 · 2021年6月22日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《基于强化学习的自动化红队测试》
专知会员服务
3+阅读 · 7月23日
伊朗不对称防空战略的演进
专知会员服务
4+阅读 · 7月23日
对抗环境下超视距目标打击的情报支援
专知会员服务
10+阅读 · 7月22日
《无人机对海面作战影响评估》
专知会员服务
15+阅读 · 7月21日
印度精确打击与指挥架构的断层
专知会员服务
7+阅读 · 7月20日
相关VIP内容
万字综述,GNN在NLP中的应用,建议收藏慢慢看
专知会员服务
59+阅读 · 2021年6月22日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员