语音识别

    xiaoxiao2021-11-23  62

    语音识别没有动手做过,在这里记录一些预先需要了解的知识: GMM算法: http://www.cnblogs.com/mindpuzzle/archive/2013/04/24/3036447.html 语音识别常用到GMM算法。 1.单高斯模型       如题,就是单个高斯分布模型or正态分布模型。想必大家都知道正态分布,这一分布反映了自然界普遍存在的有关变量的一种统计规律,例如身高,考试成绩等;而且有很好的数学性质,具有各阶导数,变量频数分布由μ、σ完全决定等等,在许多领域得到广泛应用。在这里简单介绍下高斯分布的概率密度分布函数:          其中θ=(μ,σ 2 ); 2.高斯混合模型       K个GSM混合成一个GMM,每个GSM称为GMM的一个component,也就是分为K个类,与K-means一样,K的取值需要事先确定,具体的形式化定义如下:       其中,αk 是样本集合中k类被选中的概率: 使用EM算法估计高斯混合模型。 EM算法: http://www.cnblogs.com/mindpuzzle/archive/2013/04/05/2998746.html EM算法可以用来进行参数估计,也就是 多个参数θ去拟合数据,那么这个log似然函数是: 采用的思想是加入 隐变量z,然后,假设Q(z)是关于隐变量z的某种分布,那么有如下公式: 这样做的目的是可以使 用到Jensen不等式,可以得到Q的一个等式。 EM算法: 选取初始值θ 0 初始化θ,t=0 Repeat {       E步:       M步: }直到收敛 比较好的开源的语音识别包括HTK和Kaldi: HTK The Hidden Markov Model Toolkit (HTK) ,使用的是隐马尔科夫模型,同时用到了GMM算法。使用C语言编写。 官网: http://htk.eng.cam.ac.uk/ Kaldi 使用C++编写。既有 GMM-HMM声学模型,同时也支持DNN-HMM模型。 源码地址: https://github.com/kaldi-asr/kaldi 官网地址: http://kaldi-asr.org/doc/tutorial.html 安装: 根据 To build the toolkit: see   ./INSTALL,查看INSTALL文件,然后查看tools/INSTALL文件: extras/check_dependencies.sh make make -j 4 # If you have multiple CPUs and want to speed things up, you can do a parallel 安装过程会遇到如下问题: extras/check_dependencies.sh extras/check_dependencies.sh: automake is not installed. extras/check_dependencies.sh: autoconf is not installed. extras/check_dependencies.sh: neither libtoolize nor glibtoolize is installed extras/check_dependencies.sh: subversion is not installed extras/check_dependencies.sh: we recommend that you run (our best guess): sudo apt-get install automake autoconf libtool subversion /bin/sh is linked to dash, and currently some of the scripts will not run properly. We recommend to run: sudo ln -s -f bash /bin/sh 执行如下命令:sudo apt-get install automake autoconf libtool subversion examples: egs中包含的实例包括: http://kaldi-asr.org/doc/examples.html 新增的中文语音识别: http://blog.csdn.net/wbgxx333/article/details/50634571,其中作者有个群自发翻译了官方文档。 博文: http://ftli.farbox.com/post/kaldizhong-wen-shi-bie#QuFenDuTrain 运行最简单的yes/no实例: $ cd egs/yesno/s5 $ bash ./run.sh #会自动下载数据到当前目录,并解压 遇到下面的错误: Checking data/local/dict/extra_questions.txt ... --> data/local/dict/extra_questions.txt is empty (this is OK) --> SUCCESS [validating dictionary directory data/local/dict] **Creating data/local/dict/lexiconp.txt from data/local/dict/lexicon.txt utils/prepare_lang.sh: line 441: fstaddselfloops: command not found ERROR: FstHeader::Read: Bad FST header: standard input Preparing language models for test local/prepare_lm.sh: line 13: arpa2fst: command not found local/prepare_lm.sh: line 15: fstisstochastic: command not found 解决参考: http://blog.csdn.net/qcqqcqcqqc1/article/details/26572897,这个问题是因为Utils和steps这两个其实是链接,链接到另一个例子——wsj下面的同名文件夹。
    转载请注明原文地址: https://ju.6miu.com/read-678475.html

    最新回复(0)