view Code/Test/formantPlotter.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents
children
line wrap: on
line source

timeShift = length(formants) / length(vuv);

for( idx = 1: length( formants ) )
    frameIdx = floor( idx / timeShift ) + 1;
    if( vuv( frameIdx ) == 0 )
        % frame is silent
        plot( formants( idx,2 ), 'w.' );
        plot( formants( idx,3 ), 'w.' );
        plot( formants( idx,4 ), 'w.' );
    elseif( vuv( frameIdx ) == 1 )
        % frame is voiced
        plot( formants( idx,2 ), 'y.' );
        plot( formants( idx,3 ), 'c.' );
        plot( formants( idx,4 ), 'g.' );
    else
        %frame is unvoiced
        plot( formants( idx,2 ), 'r.' );
        plot( formants( idx,3 ), 'r.' );
        plot( formants( idx,4 ), 'r.' );
    end
end