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. OneDrive网盘资源下载教程

    目录 1. 本文地址 2. 下载流程 3. 打赏&支持 1. 本文地址 博客园:https://www.cnblogs.com/coco56/p/11161530.html CSDN:http ...

  2. apachectl 命令详解-graceful 不中断原有连接,重新启动 Apache 服务器

    apachectl(Apache control interface) 参         数: fullstatus     显示服务器完整的状态信息. graceful     重新启动 Apac ...

  3. 神经风格转换Neural Style Transfer a review

    原文:http://mp.weixin.qq.com/s/t_jknoYuyAM9fu6CI8OdNw 作者:Yongcheng Jing 等 机器之心编译 风格迁移是近来人工智能领域内的一个热门研究 ...

  4. 前端之JQuery:JQuery属性操作

    Jquery2--属性相关的操作 知识点总结 1.属性 属性(如果你的选择器选出了多个对象,那么默认只会返回出第一个属性). attr(属性名|属性值) - 一个参数是获取属性的值,两个参数是设置属性 ...

  5. Django【第28篇】:Django Admin的相关知识

    Django Admin的相关知识 一.面向对象复习 1.类的继承 class Base(object): def __init__(self,val): self.val = val def fun ...

  6. 【SaltStack官方版】—— states教程, part 4 - states 说明

    STATES TUTORIAL, PART 4 本教程建立在第1部分.第2部分.第3部分涵盖的主题上.建议您从此开始.这章教程我们将讨论更多 sls 文件的扩展模板和配置技巧. This part o ...

  7. vue 常见错的可能原因

    标签或者组件名写错 Unknown custom element: <h> - did you register the component correctly? For recursiv ...

  8. for循环性能测试

    项目中遇到需要用for循环dom节点获取每个节点保存的数据,一共有8000多条数据,但是循环加载需要18秒左右才出来. 平时for循环中数据少感觉不出来,现在数据多了就有差别了. 部分代码如下 var ...

  9. 层定位layer

    一.如何实现层定位position属性 二.相对定位relative 三.绝对定位absolute 四.元素堆叠z-index 一.实现层定位的方法 position属性实现层定位,把元素分出层次形成 ...

  10. R list和data frame 排序

    pathway_name = rownames(g1) tm <- list('P-value' = c(), 'Pathway_name' = c()) :dim(g1)[]){ result ...