MAT2TXT.M
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:1k
源码类别:
语音合成与识别
开发平台:
Matlab
- % For creating training data for Eiji's neural network program
- if ~exist('waveData'),
- load waveData.mat
- end
- fid1 = fopen('input.txt', 'w');
- fid2 = fopen('output.txt', 'w');
- for i=1:length(waveData),
- %for i=1:10;
- feature = waveData(i).feature;
- featureNum = size(feature, 1);
- frameNum = size(feature, 2);
- for p = 1:frameNum,
- for q = 1:featureNum,
- fprintf(fid1, '%g ', feature(q, p));
- end
- fprintf(fid1, 'n');
- fprintf(fid2, '%sn', waveData(i).speaker);
- end
- end
- fclose(fid1);
- fclose(fid2);