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
难道我做错了什么?请指教!:)
解决方案
您可以只添加参数来运行它--matrixform
。
我建议你看看这个问题!从 github 项目它可以帮助你
推荐阅读
- python - 如何使 Google AI Platform 的 BASIC_GPU 规模层上的 GPU 对我的 tensorflow 程序可见?
- xcode - 在终端中使用 codesign 命令签名后,使用 Unity 构建的 macOS 应用程序在启动时挂起
- css - 如何强制 material-ui 生成!重要的 css 样式以防止 WordPress/Gutenberg css 样式冲突?
- java - BiometricPrompt.AuthenticationResult 中的 CryptoObject 始终为 null
- java - Keycloak 示例 - 方法 getValue() 未为 UserCredentialModel 类型定义
- c# - 带有 SpecFlow 挂钩的 NuGet 包
- swift - 如何在 Swift4 中不使用 inputIntensity 参数控制 CIFilter 的强度?
- python - 根据另一列中的值将列值从一列附加到另一列
- vim - 如何从 cnoremap 执行命令?
- java - 无法修复 AccessDeniedException