getCentroid.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:1k
源码类别:
语音合成与识别
开发平台:
Matlab
- % Compute centroid of each singers
- more off
- if ~exist('waveData'),
- fprintf('Loading waveData.mat...n');
- load waveData.mat
- end
- singers = unique({waveData.answer});
- for i = 1:length(singers),
- fprintf('Finding centroid wave for %s (%g/%g)...n', singers{i}, i, length(singers));
- centroid(i).singer = singers{i};
- % Get centroid of female speakers
- index = getmean(waveData, singers{i}, 0);
- centroid(i).female = waveData(index).wavepath;
- % Get centroid of male speakers
- index = getmean(waveData, singers{i}, 1);
- centroid(i).male = waveData(index).wavepath;
- end
- save centroid centroid