getGmmParam.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:1k
源码类别:
语音合成与识别
开发平台:
Matlab
- % Get GMM parameters from speakerData.mat
- % This script uses speakerData(i).kmeansParam as the initial centers.
- % So you must have speakerData(i).kmeansParam ready before calling this script
- addpath usersjangmatlabtoolboxdcpr
- gaussianNum = 16; % No. of Gaussian for each speaker
- if ~exist('speakerData'),
- fprintf('Loading speakerData.mat...n');
- load speakerData.mat
- end
- tic
- fprintf('Compute GMM parameters for each speaker...n');
- for i=1:length(speakerData),
- fprintf('Computing GMM parameters for speaker %g (%s) ===> ', ...
- i, speakerData(i).speaker);
- feature = speakerData(i).feature;
- % feature = feature(:, 1:100);
- [M, V, W, logProb] = gmm(feature', gaussianNum);
- % [M, V, W, logProb] = gmm(feature', speakerData(i).kmeansParam);
- speakerData(i).gmmParam.M = M;
- speakerData(i).gmmParam.V = V;
- speakerData(i).gmmParam.W = W;
- speakerData(i).logProb = min(logProb);
- fprintf('Log probability = %gn', min(logProb));
- end
- fprintf('Total time = %gn', toc);
- fprintf('Saving speakerData to speakerData.mat...n');
- save speakerData speakerData