Mercurial > hg > emotion-detection-top-level
diff Code/Collation/get_Formants.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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Code/Collation/get_Formants.m Wed Feb 13 11:02:39 2013 +0000 @@ -0,0 +1,33 @@ +function [] = get_Formants( dirName, statsFileID ) + +% this function collates the results of all values calculated using the PRAAT software + +% For jitter and shimmer PRAAT returns only a single value, not a +% frame-by-frame calculation. Therefore we cannot find the varience etc. + + + % identify the speaker in the stats file + fprintf( statsFileID, '%s ', dirName ); + + +%-------------- get the formant metrics ---------------------- +% PRAAT returns a frame-by-frame value + % need to discard all formant information for unvoiced and silent frames. + vuv = detect_VoicedUnvoiced( [dirName '.wav'], 0 ); + + metricName = '_Formant_Burg'; + metricFileName = [ dirName metricName '.txt']; + readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); + + metricName = '_Formant_all'; + metricFileName = [ dirName metricName '.txt']; + readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); + + metricName = '_Formant_robust'; + metricFileName = [ dirName metricName '.txt']; + readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); + + + fprintf( statsFileID, '\n'); + + \ No newline at end of file