python 暗弱目标提取(Python提取频域特征知识点浅析)
类别:脚本大全 浏览量:1287
时间:2022-01-16 00:27:41 python 暗弱目标提取
Python提取频域特征知识点浅析在多数的现代语音识别系统中,人们都会用到频域特征。梅尔频率倒谱系数(mfcc),首先计算信号的功率谱,然后用滤波器和离散余弦变换的变换来提取特征。本文重点介绍如何提取mfcc特征。
首先创建有一个python文件,并导入库文件: from scipy.io import wavfile from python_speech_features import mfcc, logfbank import matplotlib.pylab as plt1、首先创建有一个python文件,并导入库文件: from scipy.io import wavfile from python_speech_features import mfcc, logfbank import matplotlib.pylab as plt
读取音频文件:
samplimg_freq, audio = wavfile.read("data/input_freq.wav")
提取mfcc特征和过滤器特征:
mfcc_features = mfcc(audio, samplimg_freq)
filterbank_features = logfbank(audio, samplimg_freq)
打印参数,查看可生成多少个窗体:
|
print ( '\nmfcc:\nnumber of windows =' , mfcc_features.shape[ 0 ]) print ( 'length of each feature =' , mfcc_features.shape[ 1 ]) print ( '\nfilter bank:\nnumber of windows=' , filterbank_features.shape [ 0 ]) print ( 'length of each feature =' , filterbank_features.shape[ 1 ]) |
将mfcc特征可视化。转换矩阵,使得时域是水平的:
|
mfcc_features = mfcc_features.t plt.matshow(mfcc_features) plt.title( 'mfcc' ) |
将滤波器组特征可视化。转化矩阵,使得时域是水平的:
|
filterbank_features = filterbank_features.t plt.matshow(filterbank_features) plt.title( 'filter bank' ) plt.show() |
您可能感兴趣
- python菜单栏教程(Python3.5实现的三级菜单功能示例)
- python创建列表并查询(python列表使用实现名字管理系统)
- python爬百度api有次数限制吗(对python借助百度云API对评论进行观点抽取的方法详解)
- python 提取微信消息(python实现文件助手中查看微信撤回消息)
- python验证码处理教程(python简单验证码识别的实现方法)
- python 内存读写(详解python持久化文件读写)
- pythonselenium怎么设置元素(Python2 Selenium元素定位的实现8种)
- python的遍历循环(对python For 循环的三种遍历方式解析)
- python旅游(详解Python 爬取13个旅游城市,告诉你五一大家最爱去哪玩?)
- python中的eval函数的用法(Python eval的常见错误封装及利用原理详解)
- python使用telnet(python 处理telnet返回的More,以及get想要的那个参数方法)
- python爬虫10分钟教程(浅谈Python爬虫基本套路)
- 如何对python中列表中的数据运算(Python3.5集合及其常见运算实例详解)
- python入门练习网页(详解python项目实战:模拟登陆CSDN)
- python如何判断是否为回文数(对python判断是否回文数的实例详解)
- python中random库的用法(Python minidom模块用法示例DOM写入和解析XML)
- 幼小衔接-20以内看图读数 写数 数的组成练习题(幼小衔接-20以内看图读数)
- 你只要花上20天记单词,英语成绩就能从57提到100(你只要花上20天记单词)
- 夕云天际飞,亢龙化太极(夕云天际飞亢龙化太极)
- 爱情可以当饭吃吗(怎么回复)
- 高考数学题(高考数学题基础题占多少分)
- 没钱只能吃土(没钱要吃土了幽默短信发朋友圈)
热门推荐
- windows服务器安全设置经验(Windows 2016 服务器安全设置)
- js怎么上传压缩图片(如何用JS有效的压缩图片)
- phpstudy服务器怎么设置(phpstudy2018 访问目录服务权限问题)
- 利用docker容器化开发环境(使用docker搭建sonarqube的方法)
- python mysql配置(详解python校验SQL脚本命名规则)
- sqlserver数据库的对象有哪些(详解SQL Server数据库架构和对象、定义数据完整性)
- sql查询重复记录
- mysql 索引表空间(MySQL如何构建数据表索引)
- xampp安装后启动apache弹出对话框(XAMPP下使用顶级域名绑定虚拟主机的配置方法和示例)
- python多线程超时设置(解决python线程卡死的问题)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9