对Python使用mfcc的两种方式详解
作者:seTaire 时间:2023-06-04 14:56:52
1、Librosa
import librosa
filepath = "/Users/birenjianmo/Desktop/learn/librosa/mp3/in.wav"
y,sr = librosa.load(filepath)
mfcc = librosa.feature.mfcc( y,sr,n_mfcc=13 )
返回结构为(13,None)的np.Array,None表示任意数量
2、python_speech_features
from python_speech_features import mfcc as pmfcc
filepath = "/Users/birenjianmo/Desktop/learn/librosa/mp3/in.wav"
(rate,sig) = wav.read(filepath)
amfcc = pmfcc( sig, rate ).T
返回结构为(None,13)的np.Array,通过 .T 可转为(13,None)
3、这两种方式的mfcc还是有明显的区别的,上面两个子图是从(1)Librosa得到的 mfcc[0] 和 mfcc[1],下面的是(2)python_speech_features得到的 amfcc[0] 和 amfcc[1]
来源:https://blog.csdn.net/seTaire/article/details/85707088
标签:Python,mfcc
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python实现猜拳游戏项目
2023-02-25 15:15:30
python多线程超详细详解
2023-08-09 09:10:23
浅谈多卡服务器下隐藏部分 GPU 和 TensorFlow 的显存使用设置
2021-10-05 06:50:08
Python安装selenium包详细过程
2023-04-12 00:05:31
![](https://img.aspxhome.com/file/2023/1/72941_0s.png)
SQL Server Parameter Sniffing及其改进方法
2024-01-28 02:56:30
![](https://img.aspxhome.com/file/2023/6/98046_0s.png)
python+Django+apache的配置方法详解
2021-02-18 06:39:06
Python的数据类型与标识符和判断语句详解
2021-04-11 13:18:15
![](https://img.aspxhome.com/file/2023/7/131217_0s.png)
教你轻松掌握如何保护MySQL中的重要数据
2008-12-19 17:42:00
sql server中datetime字段去除时间的语句
2024-01-23 17:47:57
MySQL 复制表详解及实例代码
2024-01-22 22:49:16
解读HTML:大厦的基石
2008-12-01 12:57:00
一个css与js结合的下拉菜单支持主流浏览器
2023-07-18 01:28:20
![](https://img.aspxhome.com/file/2023/1/55951_0s.gif)
python 实现按对象传值
2023-05-26 14:20:18
![](https://img.aspxhome.com/file/2023/7/101637_0s.jpg)
在CentOS 6 中安装WordPress(一) 安装Apache,Mysql, PHP环境
2023-11-06 17:41:24
![](https://img.aspxhome.com/file/2023/2/64962_0s.jpg)
Go语言算法之寻找数组第二大元素的方法
2023-06-24 16:19:03
python通配符之glob模块的使用详解
2021-07-16 23:13:18
python类装饰器用法实例
2023-06-25 11:12:38
python 利用jieba.analyse进行 关键词提取
2021-03-16 22:11:26
![](https://img.aspxhome.com/file/2023/5/78575_0s.png)
Python中关于set的基本用法
2021-09-23 12:45:39
![](https://img.aspxhome.com/file/2023/5/95305_0s.jpg)
基于JS实现动态跟随特效的示例代码
2023-06-30 11:15:16
![](https://img.aspxhome.com/file/2023/5/55865_0s.png)