代码搜索结果
找到约 582,192 项符合
Cortex-M 的代码
demgmm3.m
%DEMGMM3 Demonstrate density modelling with a Gaussian mixture model.
%
% Description
% The problem consists of modelling data generated by a mixture of
% three Gaussians in 2 dimensions with a m
gmmem.m
function [mix, options, errlog] = gmmem(mix, x, options)
%GMMEM EM algorithm for Gaussian mixture model.
%
% Description
% [MIX, OPTIONS, ERRLOG] = GMMEM(MIX, X, OPTIONS) uses the Expectation
% M
mlperr.m
function [e, edata, eprior] = mlperr(net, x, t)
%MLPERR Evaluate error function for 2-layer network.
%
% Description
% E = MLPERR(NET, X, T) takes a network data structure NET together
% with a m
demgmm4.m
%DEMGMM4 Demonstrate density modelling with a Gaussian mixture model.
%
% Description
% The problem consists of modelling data generated by a mixture of
% three Gaussians in 2 dimensions with a m
mhmm_em_demo.m
if 1
O = 4;
T = 10;
nex = 50;
M = 2;
Q = 3;
else
O = 8; %Number of coefficients in a vector
T = 420; %Number of vectors in a sequence
nex = 1; %Number of sequ
recog.m
for i=1:10
fname = sprintf('..\\..\\ch6\\%db.wav',i-1);
x = wavread(fname);
[x1 x2] = vad(x);
m = mfcc(x);
m = m(x1-2:x2-2,:);
for j=1:10
pout(j) = viterbi(hmm{j}, m);
end
[d,n] = m
mfcc.m
function ccc = mfcc(x)
% 归一化mel滤波器组系数
bank=melbankm(24,256,8000,0,0.5,'m');
bank=full(bank);
bank=bank/max(bank(:));
% DCT系数,12*24
for k=1:12
n=0:23;
dctcoef(k,:)=cos((2*n+1)*k*pi/(2*24)
train.m
function [hmm, pout] = train(samples, M)
%输入:
% samples -- 样本结构
% M -- 为每个状态指定pdf个数,如:[3 3 3 3]
%输出:
% hmm -- 训练完成后的hmm
K = length(samples);
% 计算语音参数
disp('正在计算语音参数');
for
mixture.m
function prob = mixture(mix, x)
%计算输出概率
%输入:
% mix -- 混合高斯结构
% x -- 输入向量, SIZE*1
%输出:
% prob -- 输出概率
prob = 0;
for j = 1:mix.M
m = mix.mean(j,:);
v = mix.var (j,:);
w = mix.weig
inithmm.m
function hmm = inithmm(samples, M)
K = length(samples); %语音样本数
N = length(M); %状态数
hmm.N = N;
hmm.M = M;
% 初始概率矩阵
hmm.init = zeros(N,1);
hmm.init(1) = 1;
% 转移概率矩阵
hmm.trans=zeros(N