1. TypeError: mfccInitFilterBanks() takes 2 positional arguments but 7 were given

The issue


In the function stFeatureSpeed()from audioFeatureExtraction.py make a call: [fbank, freqs] = mfccInitFilterBanks(Fs, nfft, lowfreq, linsc, logsc, nlinfil, nlogfil), but this function is only able to receive two arguments. It has the following signature: def mfccInitFilterBanks(fs, nfft)

The "extra" arguments are: lowfreq, linsc, logsc, nlinfil, nlogfil

These are all defined in the mfccInitFilterBanks function itself wit exactly the same values.

Note that there is a comment in the source code (audioFeatureExtraction.py) that says that the stFeatureSpeed() function is work in progress. so there could be many (non obvious) bugs. apart from this one.

Solutions


Simply remove the arguments from the call in the stFeatureSpeed function.

2. TypeError: 'float' object cannot be interpreted as an integer


A quick fix might be to replacenfft = Win / 2 on line 680 of audioFeatureExtraction.py
with nfft = int(Win / 2) ,and modify this line of code x = signal[cur_p:cur_p + win]-> x = signal[int(cur_p):int(cur_p + win)]in function stFeatureSpeed.

3. TypeError: 'numpy.float64' object cannot be interpreted as an index


add astype(numpy.int) at the end of the line 125 :
M = numpy.round(0.016 * fs).astype(numpy.int) - 1

参考资料

GitHub
音频特征提取——pyAudioAnalysis工具包

最新文章

  1. PHP 二维数组根据某个字段排序
  2. PHP中的魔术方法:__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup, __toString, __set_state, __clone and __autoload
  3. 【OPENGL】第二篇 HELLO OPENGL(续)
  4. 那些用JavaScript写的操作系统
  5. [LeetCode]题解(python):092 Reverse Linked List II
  6. 最火的.NET开源项目(转)
  7. 小王子浅读Effective javascript(一)了解javascript版本
  8. jetty服务器
  9. Python自动化运维之30、Flask框架
  10. php 防止SQL注入函数
  11. 使用jquery的方法和技巧
  12. 畅通工程-HZNU寒假集训
  13. SIFT算法大综合
  14. Android获取本机号码及运营商
  15. expect 安装 salt 客户端
  16. 泥瓦工vps
  17. 前台的url通过 ActionName?var1=xx&var2=yy 的形式传给特定action
  18. 移动端reset
  19. springboot websocket 一篇足够了
  20. spring boot 中使用servlet

热门文章

  1. CentOS7 安装 Mysql5.6.40
  2. Thinking in Annotation
  3. JAVA的深浅拷备
  4. Java课程作业02
  5. 【leetcode】1169. Invalid Transactions
  6. Task5.PyTorch实现L1,L2正则化以及Dropout
  7. asp.net 5 如何使用ioc 以及在如何获取httpcontext对象
  8. HDU 4277 USACO ORZ(DFS暴搜+set去重)
  9. vue使用过滤器 filters:{}
  10. Longest Subarray(HDU6602+线段树)