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工具包

pyAudioAnalysis-audioFeatureExtraction 错误纠正的更多相关文章

  1. CSS下拉列表错误纠正

    上一篇关于CSS制作下来列表的错误纠正. 在上一篇中,用CSS只做了下拉列表,但是鼠标不放在导航栏上的时候,下拉列表也是出来的.具体错误就是 div ul{ list-style:none; max- ...

  2. Android逆向之旅---反编译利器Apktool和Jadx源码分析以及错误纠正

    Android逆向之旅---反编译利器Apktool和Jadx源码分析以及错误纠正 http://blog.csdn.net/jiangwei0910410003/article/details/51 ...

  3. HALC:用于长读取错误纠正的高吞吐量算法

    背景: 第三代PacBio SMRT长读取可以有效地解决第二代测序技术的读长问题,但包含大约15%的测序错误.已经设计了几种纠错算法以有效地将错误率降低到1%,但是它们丢弃了大量未校正的碱基,因此导致 ...

  4. java 实现中英文拼写检查和错误纠正?可我只会写 CRUD 啊!

    简单的需求 临近下班,小明忙完了今天的任务,正准备下班回家. 一条消息闪烁了起来. "最近发现公众号的拼写检查功能不错,帮助用户发现错别字,体验不错.给我们系统也做一个." 看着这 ...

  5. PDF提取图片(错误纠正)

    有个任务需要抽取pdf中的图片,于是找了一个例子但是有错误,仅此记录下 错误1. AttributeError: 'Document' object has no attribute 'getObje ...

  6. 《Python核心编程》部分错误纠正(勘误表)(持续更新)

    Chapter 3: 例3-1 makeTextFile.py #!/usr/bin/env python 'makeTextFile.py' import os ls = os.linesep #g ...

  7. Delphi编程时候诡异地出现ORA-00937错误,记录解决它的思路和方法

    首先需要说明,这个问题的出现需要几个前提:使用微软的Oracle驱动(使用Oracle自己的驱动不会出现这个问题).使用绑定变量法,使用Format等方式拼接SQL也不会出现这个问题,还有一些诡异的规 ...

  8. 命令纠正工具 thefuck 的简单使用

    在unix系列的系统中,总会出现 命令拼写或者执行错误的情况, 比如 把 python 写成了pythou, cd 到一个不存在的目录,执行任务的权限 不够的问题, 这是心里 总是 在 fuck,但是 ...

  9. CSS设计中的错误大整理!

    如果有人发明时间机器,那应该将这些错误纠正,不然可把前端程序猿们给还惨了.大家一起看看都有哪些CSS规则应该完善. (CSS 代码) white-space: nowrap 应该 white-spac ...

随机推荐

  1. 可视化缺失值的办法——R语言

    在数据分析中,对缺失值的处理是很关键一步,一般用summary()函数 a<-c(,,,NA) B<-c("a","b","c" ...

  2. tp5 模板参数配置(模板静态文件路径)

    tp5 模板参数配置(模板静态文件路径) // 模板页面使用 <link rel="stylesheet" type="text/css" href=&q ...

  3. (最新)2019年ICPC东亚地区-区域赛赛站网络赛以及现场赛时间安排

  4. hdu 1506 单调栈

    #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) #defin ...

  5. CF1103D Codeforces Round #534 (Div. 1) Professional layer 状压 DP

    题目传送门 https://codeforces.com/contest/1103/problem/D 题解 失去信仰的低水平选手的看题解的心路历程. 一开始看题目以为是选出一些数,每个数可以除掉一个 ...

  6. Android PdfViewer案例使用

    今天按项目要求找了一个android的PDF控件,各种操作效果都非常好,在这里和大家分享一下. com.joanzapata.pdfview:android-pdfview  该PDF控件加载大存储的 ...

  7. 【前端】HTML基础

    前端 HTML:一个人 CSS:这个人的衣服 JS:这个人的行为 1 head标签 head相关标签 <!--html5--> <!DOCTYPE html> <html ...

  8. MySQL---时区问题

    1.控制台输入select now();  发现与北京时间相差8小时: 2.解决: 2.1.进入MySQL客户端  mysql -uroot -p 2.2.全局,当前会话时区设置set GLOBAL ...

  9. man---中英文翻译

    一. 总览---SYNOPSIS 二.

  10. 消息中间件之 RabbitMQ

    文章内容来源 https://www.cnblogs.com/jun-ma/p/4840869.html 延伸阅读文章 https://blog.csdn.net/growing_duck/artic ...