5
我努力學習HMM GMM實現並創建了一個簡單的模型來檢測某些特定的聲音(召喚獸等)MATLAB墨菲的HMM工具箱
我努力訓練HMM(隱馬爾可夫模型)網絡GMM (高斯混合)在MATLAB中。
我有幾個問題,我無法找到任何有關的信息。
1)應該mhmm_em()
函數在每個HMM狀態的環被稱爲或它是自動完成?
如:
for each state
Initialize GMM’s and get parameters (use mixgauss_init.m)
end
Train HMM with EM (use mhmm_em.m)
2)
[LL, prior1, transmat1, mu1, Sigma1, mixmat1] = ...
mhmm_em(MFCCs, prior0, transmat0, mu0, Sigma0, mixmat0, 'max_iter', M);
最後一個參數,它應該是高斯或number_of_states-1的數量?
3)如果我們正在尋找最大可能性,那麼維特比在哪裏進場?
說如果我想用我提取的聲學特徵向量訓練我的模型後檢測某種類型的動物/人類呼叫,我是否仍然需要測試模式下的維特比算法?
這有點讓我困惑,我非常感謝這部分的解釋。
對HMM GMM邏輯方面的代碼的任何評論也將不勝感激。
謝謝
這是我的MATLAB例程;
O = 21; % Number of coefficients in a vector(coefficient)
M = 10; % Number of Gaussian mixtures
Q = 3; % Number of states (left to right)
% MFCC Parameters
Tw = 128; % analysis frame duration (ms)
Ts = 64; % analysis frame shift (ms)
alpha = 0.95; % preemphasis coefficient
R = [ 1 1000 ]; % frequency range to consider
f_bank = 20; % number of filterbank channels
C = 21; % number of cepstral coefficients
L = 22; % cepstral sine lifter parameter(?)
%Training
[speech, fs, nbits ] = wavread('Train.wav');
[MFCCs, FBEs, frames ] = mfcc(speech, fs, Tw, Ts, alpha, hamming, R, f_bank, C, L);
cov_type = 'full'; %the covariance type that is chosen as ҦullҠfor gaussians.
prior0 = normalise(rand(Q,1));
transmat0 = mk_stochastic(rand(Q,Q));
[mu0, Sigma0] = mixgauss_init(Q*M, dat, cov_type, 'kmeans');
mu0 = reshape(mu0, [O Q M]);
Sigma0 = reshape(Sigma0, [O O Q M]);
mixmat0 = mk_stochastic(rand(Q,M));
[LL, prior1, transmat1, mu1, Sigma1, mixmat1] = ...
mhmm_em(MFCCs, prior0, transmat0, mu0, Sigma0, mixmat0, 'max_iter', M);
%Testing
for i = 1:length(filelist)
fprintf('Processing %s\n', filelist(i).name);
[speech_tst, fs, nbits ] = wavread(filelist(i).name);
[MFCCs, FBEs, frames ] = ...
mfcc(speech_tst, fs, Tw, Ts, alpha, hamming, R, f_bank, C, L);
loglik(i) = mhmm_logprob(MFCCs,prior1, transmat1, mu1, Sigma1, mixmat1);
end;
[Winner, Winner_idx] = max(loglik);
非常感謝您的回覆尼古拉。 – bluemustang 2014-11-07 19:24:30