pyAudioAnalysis-audioFeatureExtraction 错误纠正
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 错误纠正的更多相关文章
- CSS下拉列表错误纠正
上一篇关于CSS制作下来列表的错误纠正. 在上一篇中,用CSS只做了下拉列表,但是鼠标不放在导航栏上的时候,下拉列表也是出来的.具体错误就是 div ul{ list-style:none; max- ...
- Android逆向之旅---反编译利器Apktool和Jadx源码分析以及错误纠正
Android逆向之旅---反编译利器Apktool和Jadx源码分析以及错误纠正 http://blog.csdn.net/jiangwei0910410003/article/details/51 ...
- HALC:用于长读取错误纠正的高吞吐量算法
背景: 第三代PacBio SMRT长读取可以有效地解决第二代测序技术的读长问题,但包含大约15%的测序错误.已经设计了几种纠错算法以有效地将错误率降低到1%,但是它们丢弃了大量未校正的碱基,因此导致 ...
- java 实现中英文拼写检查和错误纠正?可我只会写 CRUD 啊!
简单的需求 临近下班,小明忙完了今天的任务,正准备下班回家. 一条消息闪烁了起来. "最近发现公众号的拼写检查功能不错,帮助用户发现错别字,体验不错.给我们系统也做一个." 看着这 ...
- PDF提取图片(错误纠正)
有个任务需要抽取pdf中的图片,于是找了一个例子但是有错误,仅此记录下 错误1. AttributeError: 'Document' object has no attribute 'getObje ...
- 《Python核心编程》部分错误纠正(勘误表)(持续更新)
Chapter 3: 例3-1 makeTextFile.py #!/usr/bin/env python 'makeTextFile.py' import os ls = os.linesep #g ...
- Delphi编程时候诡异地出现ORA-00937错误,记录解决它的思路和方法
首先需要说明,这个问题的出现需要几个前提:使用微软的Oracle驱动(使用Oracle自己的驱动不会出现这个问题).使用绑定变量法,使用Format等方式拼接SQL也不会出现这个问题,还有一些诡异的规 ...
- 命令纠正工具 thefuck 的简单使用
在unix系列的系统中,总会出现 命令拼写或者执行错误的情况, 比如 把 python 写成了pythou, cd 到一个不存在的目录,执行任务的权限 不够的问题, 这是心里 总是 在 fuck,但是 ...
- CSS设计中的错误大整理!
如果有人发明时间机器,那应该将这些错误纠正,不然可把前端程序猿们给还惨了.大家一起看看都有哪些CSS规则应该完善. (CSS 代码) white-space: nowrap 应该 white-spac ...
随机推荐
- 一份贴近真实面试的Java面试题(基础部分)
这是一份关于Java基础的面试题.在网上的关于Java的面试题数不胜数,但本人认真看过后觉得大多数都没有实用性,有很多是面试官根本就不会问到的,企业根本不会用到的,一些已经脱离了实际开发的技术问题.而 ...
- vb中的资源文件
--- 一.VB中资源文件的分类 ---- 通常将资源分为两类:1.字符串资源,包括菜单和文本中使用的字符串,如"Hello World"等:2.二进制资源,如位图(.BMP),图 ...
- 最佳实践:深度学习用于自然语言处理(Deep Learning for NLP Best Practices) - 阅读笔记
https://www.wxnmh.com/thread-1528249.htm https://www.wxnmh.com/thread-1528251.htm https://www.wxnmh. ...
- Git之旅(1):安装git
一.在windows中安装git git官网:https://git-scm.com/downloads 二.在centos系统安装git 2.1 配置base源和epel源 # cat /etc/y ...
- 线段树维护区间前k小
线段树维护区间前k小 $ solution: $ 觉得超级钢琴太麻烦?在这里线段树提供一条龙服务 . 咳咳,开始讲正题!这道题我们有一个和超级钢琴复杂度一样 $ ~O(~\sum x\times lo ...
- 「版本升级」界面控件Kendo UI正式发布R2 2019|附下载
通过70多个可自定义的UI组件,Kendo UI可以创建数据丰富的桌面.平板和移动Web应用程序.通过响应式的布局.强大的数据绑定.跨浏览器兼容性和即时使用的主题,Kendo UI将开发时间加快了50 ...
- Flask【第5篇】:用Falsk实现的分页
用flask实现的分页 一.flask实现的分页组件 from urllib.parse import urlencode,quote,unquote class Pagination(object) ...
- ZROI 19.07.28 组合计数/lb
T1 题意:\(n\)个变量,\(0 \leq x_i \leq c_i\),求\(\sum x_i = A\)方案数.\(n \leq 32\). Sol: \(n \leq 10\)的时候容斥很水 ...
- 手动创建一个Spring Boot 2.x项目
spring boot 2.1.9版本quick start参考文档地址:https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference ...
- reverse/inverse a mapping but with multiple values for each key
reverse/inverse a mapping but with multiple values for each key multi mappping dictionary , reverse/ ...