元组索引超出范围:音频到频谱图

2024-10-02 14:26:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试运行一个音频到频谱图脚本,即: 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

我做错什么了吗? 请告知!:)


Tags: inpy脚本lineout音频file频谱