Dawn@4: function [] = get_Formants( dirName, statsFileID ) Dawn@4: Dawn@4: % this function collates the results of all values calculated using the PRAAT software Dawn@4: Dawn@4: % For jitter and shimmer PRAAT returns only a single value, not a Dawn@4: % frame-by-frame calculation. Therefore we cannot find the varience etc. Dawn@4: Dawn@4: Dawn@4: % identify the speaker in the stats file Dawn@4: fprintf( statsFileID, '%s ', dirName ); Dawn@4: Dawn@4: Dawn@4: %-------------- get the formant metrics ---------------------- Dawn@4: % PRAAT returns a frame-by-frame value Dawn@4: % need to discard all formant information for unvoiced and silent frames. Dawn@4: vuv = detect_VoicedUnvoiced( [dirName '.wav'], 0 ); Dawn@4: Dawn@4: metricName = '_Formant_Burg'; Dawn@4: metricFileName = [ dirName metricName '.txt']; Dawn@4: readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); Dawn@4: Dawn@4: metricName = '_Formant_all'; Dawn@4: metricFileName = [ dirName metricName '.txt']; Dawn@4: readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); Dawn@4: Dawn@4: metricName = '_Formant_robust'; Dawn@4: metricFileName = [ dirName metricName '.txt']; Dawn@4: readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); Dawn@4: Dawn@4: Dawn@4: fprintf( statsFileID, '\n'); Dawn@4: Dawn@4: