?? train.txt
字號:
function code = train(traindir, n)
% Speaker Recognition: Training Stage
%
% Input:
% traindir : string name of directory contains all train sound files
% n : number of train files in traindir
%
% Output:
% code : trained VQ codebooks, code{i} for i-th speaker
%
% Note:
% Sound files in traindir is supposed to be:
% s1.wav, s2.wav, ..., sn.wav
% Example:
% >> code = train('C:\data\train\', 8);
k = 16; % number of centroids required
for i = 1:n % train a VQ codebook for each speaker
file = sprintf('%ss%d.wav', traindir, i);
disp(file);
[s, fs] = wavread(file);
v = mfcc(s, fs); % Compute MFCC's
code{i} = vqlbg(v, k); % Train VQ codebook
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -