资源简介
使用matlab编写语音识别项目,可以进行孤立语音识别实验,可以识别单词和数字等。也可以在我的项目之上进行改进和改善。

代码片段和文件信息
function [ alpha alpham nalpham alphac ] = alpharec( A B Pi )
% alpharec This function returns the alpha matrix for an HMM
%
% The following parameters are used for annotation
% N : Numer of states in HMM
% T : Number of observations (in the HW it is written Mw)
% Q : States in the HMM
% x : observations in the HMM
% x(i) : the observation for frame/time i
% j : current state
% i : previous state
%
% The following parameters are passed to the function
% A : NxN transition matrix describing the pobality that the next
% state is Q(j) given that the previous state is Q(i) or a(ij).
% B : NxT Observation probability matrix describing the probaility that
% we get observation x(t) given that the current state is Q(j)
% Pi: 1xN initial probability matrix. This matrix is non negative and
% sums to 1. It gives the probability that we start in Pi(n).
%
% The following paramters are returned by the function
% alpham : a NxT matrix representing the alpha value given (jt)
% which is the proposed state and the current time/frame
% alpha : a scalar that represents the summation of all values
% : in alpham for the HMM
% First we initialize the first column of alpha with:
% alpham(1j) = p(j)*p(x(1)|j)
% The we recursively move forward across the matrix with:
% alpham(tj) = p(x(t)|j)*sum(alpha(i)*p(j|i) from i=1:N)
t = 1; % the current frame/time
j = 1; % the current state
[N T] = size(B); % the number of states and observations in the HMM
alpham = zeros(N T);
nalpham = zeros(N T);
% to avoid underflow the alpha matrix values are all normalized to 1
% these normalization factors are also passed to the beta matrices
alphac = zeros(1 T);
% code adapted from http://www.shokhirev.com/nikolai/abc/alg/hmm/HMM_cpp.html
% initialize the first column of the alpha vector;
for j = 1:N
alpham(j t) = Pi(j)*B(jt);
nalpham(j t) = Pi(j)*B(jt);
alphac(1 t) = alphac(1 t) + alpham(j t);
end
for j = 1:N
alpham(j t) = alpham(jt)/alphac(1t);
end
% recursively move forward across the matrix
for t = 1:T-1
for j = 1:N
sum1 = 0;
sum2 = 0;
for i = 1:N
sum1 = sum1+alpham(it)*A(ij);
sum2 = sum2 + nalpham(it)*A(ij);
end
alpham(jt+1) = sum1*B(jt+1);
nalpham(jt+1) = sum2*B(jt+1);
alphac(1 t+1) = alphac(1 t+1) + alpham(j t+1);
end
% apply scalar values to each state at time t
for j = 1:N
alpham(j t+1) = alpham(jt+1)/alphac(1t+1);
end
end
% termination
% t = T;
% alpha = 0;
% for j = 1:N
% alpha = alpha + alpham(jt);
% end
% for the scaled vector we can now use the product of the scalars
% to find our total probability of obesrving the given events
alpha = sum(log(alphac));
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-08-26 00:37 MySpeechRecognition-master\
文件 64044 2015-08-26 00:37 MySpeechRecognition-master\ test.wav
文件 302 2015-08-26 00:37 MySpeechRecognition-master\.gitignore
目录 0 2015-08-26 00:37 MySpeechRecognition-master\Matlab\
文件 11264 2015-08-26 00:37 MySpeechRecognition-master\Matlab\EMTraining.m
文件 1328 2015-08-26 00:37 MySpeechRecognition-master\Matlab\HMMgammaposteri.m
文件 598 2015-08-26 00:37 MySpeechRecognition-master\Matlab\HMMtest.m
文件 1781 2015-08-26 00:37 MySpeechRecognition-master\Matlab\HMMxiposteri.m
文件 1099 2015-08-26 00:37 MySpeechRecognition-master\Matlab\Homework4.m
文件 830 2015-08-26 00:37 MySpeechRecognition-master\Matlab\UpdatePi.m
文件 2852 2015-08-26 00:37 MySpeechRecognition-master\Matlab\alpharec.m
文件 2370 2015-08-26 00:37 MySpeechRecognition-master\Matlab\betarec.m
文件 860 2015-08-26 00:37 MySpeechRecognition-master\Matlab\filterbankmulttest.m
文件 16522 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four.wav
文件 18040 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four10.wav
文件 17036 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four2.wav
文件 16410 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four3.wav
文件 17514 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four4.wav
文件 17102 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four5.wav
文件 17156 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four6.wav
文件 17670 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four7.wav
文件 17586 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four8.wav
文件 17742 2015-08-26 00:37 MySpeechRecognition-master\Matlab\four9.wav
文件 3003 2015-08-26 00:37 MySpeechRecognition-master\Matlab\fourlambda.mat
文件 876 2015-08-26 00:37 MySpeechRecognition-master\Matlab\gMeanAndVar.m
文件 1501 2015-08-26 00:37 MySpeechRecognition-master\Matlab\melfilterbank.m
文件 1240 2015-08-26 00:37 MySpeechRecognition-master\Matlab\melfrequencies.m
文件 3171 2015-08-26 00:37 MySpeechRecognition-master\Matlab\my_mfcc.m
文件 11746 2015-08-26 00:37 MySpeechRecognition-master\Matlab\one.wav
文件 12214 2015-08-26 00:37 MySpeechRecognition-master\Matlab\one10.wav
文件 12726 2015-08-26 00:37 MySpeechRecognition-master\Matlab\one2.wav
............此处省略44个文件信息
- 上一篇:语音识别matlab
- 下一篇:元胞自动机的Matlab代码.m
相关资源
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
评论
共有 条评论