% Plays just the sung portions of training example sam_num.
%
% Christine Smit Feb-6-2007
function playsinging(sam_num)
s = sprintf('music/%d.wav',sam_num);
[d, sr] = wavread(s);

s = sprintf('labels/%d.lab',sam_num);
[stt dur lab] = textread(s,'%f %f %s','commentstyle','shell');

ll = zeros(length(lab),1);
ll(strmatch('vox',lab)) = 1;
tt=(1/sr)*[1:length(d)];
lsamp = labsamplabs(tt,[stt,dur],ll);

%figure out where lsamp is 1.  This is the singing portion.
inds = logical(lsamp);
d_sing = d(inds);

if length(d_sing) ~= 0
    soundsc(d_sing,sr);
end