The Design and Implementation of the Speech Recognition System Based on Python
Abstract
With the development of the Internet, voice files have become more and more accessible files.How to efficiently extract the key information from a recording, extract the content that people are interested in, and intuitively present it to the door.This paper takes DFSMN as an acoustic model and introduces the TensorFlowr model to transform speech recognition into a translation task, which has certain theoretical significance and research value.
This paper describes several mainstream deep learning models in the field of speech recognition.According to the deep learning theory, the overall scheme of the TensorFlow-based continuous speech learning system is designed.Focus on the shortcomings of speech feature extraction method and language model TensorFlow, and optimize the feature extraction method and language model.
For Mer frequency inversion coefficient characteristics (Mel Frequency Cepstrum Coefficient, MFCC) has the problem of weak speech information representation ability in the deep model, Introduce a log-Mayer filter group ((Log MelFilter-bank, Fbank) features combined with convolutional neural networks (Convolutional Neural Networks, CNN) The feature extraction method for reextraction, Combined with DFSMN to construct the acoustic model CNN-DFSMN, Realize the voice to pinyin task.The experimental results show that the feature extraction method of Fbank feature extraction has stronger representation ability and lower character error rate (Character Error Rate, CER).
An attention computational improvement method based on Hadamard matrix is proposed for the problems that language model TensorFlowr has complex computation and insufficient model generalization ability.This method uses the Hadamard matrix generated with different threshold values to generate a new attention matrix.Experimental results show that the improved TensorFlow model using the Hadmard matrix has both reduced recognition time and CER of the language model compared with the initial TensorFlowr model. Key words: Python, speech recognition, speech processing, TensorFlow, model
Key words: Haojing College of Shaanxi University of Science & Technology,Undergraduates
基于Python的语音识别系统的设计与实现
摘 要
随着互联网的发展,语音文件成为了人们接触得越来越多文件。如何高效的从一段录音中提取出关键信息,提取出其中人们感兴趣的内容,直观的呈现给人门。本文以DFSMN作为声学模型,引入TensorFlowr模型,将语音识别转化为翻译任务展开深入研究,具有一定的理论意义和研究价值。
本文阐述了语音识别领域的几种主流深度学习模型。根据深度学习理论,设计了基于TensorFlow的连续语音识别系统的总体方案。重点研究语音特征提取方法和语言模型TensorFlow的不足,对特征提取方法和语言模型进行优化。
针对梅尔频率倒谱系数特征(Mel Frequency Cepstrum Coefficient, MFCC)在深度模型里存在语音信息表征能力弱的问题,提出一种对数梅尔滤波组((Log MelFilter-bank, Fbank)特征结合卷积神经网络(Convolutional Neural Networks, CNN)再提取的特征提取方法,并和DFSMN结合构建声学模型CNN-DFSMN,实现语音转拼音任务。实验结果表明,Fbank特征结合CNN再提取的特征提取方法与其他特征提取方法相比,语音信息表征能力更强,模型的字符错误率(Character Error Rate, CER)更低。
针对语言模型TensorFlowr存在计算量复杂、模型泛化能力不足导致识别率不高,识别速度慢的问题,提出一种基于Hadamard矩阵的注意力计算改进方法。该方法利用设置不同阂值生成的Hadamard矩阵与注意力矩阵做点积,从而生成新的注意力矩阵。实验结果表明,利用Hadmard矩阵改进后的TensorFlow模型与初始TensorFlowr模型相比,语言模型的识别时间和CER都有所降低。
关键词:Python,语音识别,语音处理,TensorFlow,模型
目 录
1 绪论 1
1.1 研究背景及意义 1
1.2 国内外研究现状 2
1.2.1 语音识别中声学模型研究现状 2
1.2.2 语音识别中语言模型研究现状 3
1.3 主要研究内容 4
2 语音识别系统需求分析 5
2.1 商务需求 5
2.2 教育需求 6
2.3 刑侦需求 6
2.4 国家安全需求 6
3 语音识别系统方案设计 8
3.1 语音信号的预处理 8
3.2 语音识别系统的分类 8
3.2.1 基于概率模型的语音识别系统 8
3.2.2 端到端语音识别系统 9
3.3 语音特征的提取 9
3.4 语音模型的构建 10
4 语音识别系统实现 12
4.1 系统介绍 12
4.2 语音数据集介绍 12
4.2.1 不同人的声音 12
4.2.2 每人不同单词的发音 12
4.2.3 声音波形 13
4.3 代码功能实现 13
4.3.1 项目思路 13
4.3.2 依赖环境及代码目录 13
4.3.3 数据读取与预处理(data_create.py) 14
4.3.4 语音数据分帧及mfcc处理(data_create.py) 15
4.3.5 模型构建(model.py) 16
4.3.6 模型训练(model_train.py) 20
4.3.7 模型评估(model_test.py) 20
4.3.8 模型训练可视化 21
4.3.9 模型预测(func_test.py) 22
结 论 25
致 谢 26
参考文献 27