首页 > 解决方案 > 元组索引超出范围:音频到频谱图

问题描述

我正在尝试运行音频到频谱图脚本,即: https ://github.com/grrrr/nsgt/tree/master/examples 当我尝试时python spectrogram.py myaudio.wav 出现错误:

Traceback (most recent call last):  
File "spectrogram.py", line 111, in <module>  
coefs = assemble_coeffs(c, ncoefs)  
File "spectrogram.py", line 27, in assemble_coeffs  
out = np.empty((ncoefs,cq0.shape[1],cq0.shape[2]), dtype=cq0.dtype)  
IndexError: tuple index out of range

难道我做错了什么?请指教!:)

标签: pythonnumpyspectrogram

解决方案


您可以只添加参数来运行它--matrixform

我建议你看看这个问题!从 github 项目它可以帮助你


推荐阅读