getSpeakerData.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:1k
源码类别:
语音合成与识别
开发平台:
Matlab
- % Collect MFCC for each speaker
- if ~exist('waveData'),
- fprintf('Loading waveData.mat...n');
- load waveData.mat
- end
- allSpeaker = {waveData.speaker};
- distinctSpeaker = unique(allSpeaker);
- fprintf('Collecting speaker recognition features from waveData.mat...n');
- for i=1:length(distinctSpeaker),
- speaker = distinctSpeaker{i};
- fprintf('Collecting data for speaker %g: %s ===> ', i, speaker);
- speakerData(i).speaker = speaker;
- index = findcell(allSpeaker, speaker);
- speakerData(i).feature = cat(2, waveData(index).feature);
- fprintf('data size = %gx%gn', ...
- size(speakerData(i).feature, 1), size(speakerData(i).feature, 2));
- end
- fprintf('Saving speakerData to speakerData.mat...n');
- save speakerData speakerData