Home > asr > wordPlay.m

wordPlay

PURPOSE ^

wordPlay: Play each word after forced alignment

SYNOPSIS ^

function wordPlay(cmObj, waveFile)

DESCRIPTION ^

wordPlay: Play each word after forced alignment

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function wordPlay(cmObj, waveFile)
0002 %wordPlay: Play each word after forced alignment
0003 
0004 %    Roger Jang, 20091030
0005 
0006 [y, fs, nbits]=wavread(waveFile, [1 1]);    % Obtain fs
0007 for i=1:length(cmObj.word)
0008     fprintf('%d/%d: Press any key to hear %s (%s)...', i, length(cmObj.word), cmObj.word(i).text, cmObj.word(i).name);
0009     index1=round((cmObj.word(i).time(1)/10000000)*fs)+1;
0010     index2=round((cmObj.word(i).time(2)/10000000)*fs);
0011     y=wavread(waveFile, [index1, index2]);
0012     sound(y, fs);
0013     pause; fprintf('\n');
0014 end

Generated on Tue 01-Jun-2010 09:50:19 by m2html © 2003