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. losetup - 设 定 与 控 制 环回设备

    总览 SYNOPSIS losetup [ -e encryption ] [ -o offset ] loop_device file losetup [ -d ] loop_device 描述 l ...

  2. 20140919-FPGA-有效观察设计中的差分信号

    今天回来坐在电脑前,打开Xilinx的Documentation Navigator寻找NCO相关的User Guide,但是在不经意中发现了一个这样的IP,我感觉对于观察设计中的查分信号十分有用.之 ...

  3. MySQL 5.7原生通用二进制格式安装包安装过程

    目录 官方文档 文件说明 官方文档 https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html 文件说明 Directory Co ...

  4. 常用sql---表记录数和占用空间统计

    1.每张表的记录数和占用空间 select owner as 用户名, table_name as 表名, num_rows as 记录数, ROUND(t.NUM_ROWS * t.AVG_ROW_ ...

  5. C++中vecotr表示二维数组并自己实现一个Grid类

    1 C++中使用vector来表示二维数组 声明一个二维数组: vector<vector<int>> dp(row, vector<int>(col)); 将变量 ...

  6. <authentication> 元素

    <authentication> 元素 配置 ASP.NET 身份验证支持.该元素只能在计算机.站点或应用程序级别声明.如果试图在配置文件中的子目录或页级别上进行声明,则将产生分析器错误信 ...

  7. .net core Consul

    创建API项目修改Program public class Program { public static void Main(string[] args) { CreateWebHostBuilde ...

  8. C++HeartCode

    #include <iostream> int main() { int A=43,B=A/2, C=B/2,x,y,i=B,j=-C;for(y=0;y<B;j=(++y)-(C+ ...

  9. js 动态时间

    <script type="text/javascript"> function show_cur_times(){ //获取当前日期 var date_time = ...

  10. lamba

    >>> from random import randint>>> allNums = []>>> for eachNum in range(10 ...