资源简介
使用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代码.m
- 语音识别matlab
- 用matlab编写的二维最大熵和最小交叉
- 一维最大熵阈值分割
- 模糊神经网络matlab代码
- 拉普拉斯算法matlab实现
- LBM模拟二维平板流matlab代码
- dwt算法matlab实现
- DE算法MATLAB代码
- NSGA2自定义优化函数MATLAB代码
- SURF等5种特征点检测代码matlab
- 数字图像置乱技术及其Matlab实现
- PLICP和matlabicp代码
- Camshift目标跟踪matlab实现
- QPSK调制解调的MATLAB程序仿真
- 小型火箭Matlab求解
- 2009毕设---数字通信中多径信道的MAT
- 萤火虫算法 matlab
- 遗传算法求解无约束优化问题matlab源
- ( 人工蜂群算法求解无约束优化问题
- 遗传算法求解背包问题matlab源码+原问
- matlab棋盘格角点自动检测提取程序
- 图像增强、图像形态学变换等matlab图
- 三维点云精简的均匀网格法&不均匀网
- 点特征直方图PFH算法的matlab实现,以
- matlab相机标定
- 有高斯噪声的RSSI值仿真代码
- matlab产生广义拉盖尔多项式系数
- 匹配滤波器原理及matlab实现
- PAPR问题的MATLAB程序
评论
共有 条评论