python热词检测
hotword_detection的Python项目详细描述
该库提供了使用mfcc特征和动态时间扭曲(dtw)模式匹配算法检测给定音频文件中的热词的功能。
安装
从pypi安装:
pip install hotword_detection
从这个存储库:
git clone https://github.com/sakethgsharma/HotWordDetection.git python setup.py install
用法
示例脚本
要训练Hotword,请运行:
python bin/trainHotword.py
要进行测试,请运行:
python bin/checkHotword.py
支持的功能
- mel频率倒谱系数
- 通过适当的训练模式选择合适的热词
- 支持可变采样频率
- 基于振幅的语音活动检测器(VAD),用于在录制过程中消除外部噪音
- 使用自动DTW阈值进行个性化设置
MFCC功能
由于mfcc向量是语音识别系统中最常用的特征提取方法,因此在该模块中使用mfcc向量。
Parameter | Description |
---|---|
alpha | Parameter used in pre-emphasis filtering. Should be any value between 0 and 1. |
N | Number of FFT points. |
fs | Sampling frequency of stored audio file. |
frame_dur | Duration of 1 speech frame. |
num_filters | Number of filters used in the Mel filterbank. |
lower_freq | Lower frequency bound used for constructing filterbank. |
upper_freq | Upper frequency bound used for constructing filterbank. Should be less than fs/2. |
动态时间扭曲
动态时间规整(dtw)是一种测量速度变化的两个时间序列之间相似性的算法。