dawn@0: function [] = get_PRAAT( dirName, statsFileID ) dawn@0: dawn@0: % this function collates the results of all values calculated using the PRAAT software dawn@0: dawn@1: % For jitter and shimmer PRAAT returns only a single value, not a dawn@1: % frame-by-frame calculation. Therefore we cannot find the varience etc. dawn@1: dawn@1: dawn@0: % identify the speaker in the stats file dawn@0: fprintf( statsFileID, '%s ', dirName ); dawn@0: dawn@0: % -------------- get the jitter metrics ------------------- dawn@0: % JITTER: ddp \t local \t ppq5 \t rap \t dawn@1: dawn@1: metricName = '_jitter_ddp'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@0: dawn@1: metricName = '_jitter_local'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@1: dawn@1: metricName = '_jitter_ppq5'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@1: dawn@1: metricName = '_jitter_rap'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@0: dawn@0: dawn@0: %-------------- get the shimmer metrics ---------------------- dawn@0: % SHIMMER: local \t dda \t apq3 \t apq5 \t apq11 dawn@1: dawn@1: metricName = '_shimmer_local'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@1: dawn@1: metricName = '_shimmer_dda'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@0: dawn@1: metricName = '_shimmer_apq3'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@0: dawn@1: metricName = '_shimmer_apq5'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@0: dawn@1: metricName = '_shimmer_apq11'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readValueFromFile( statsFileID, metricFileName, metricName ); dawn@0: dawn@0: %-------------- get the formant metrics ---------------------- dawn@1: % PRAAT returns a frame-by-frame value dawn@1: % need to discard all formant information for unvoiced and silent frames. dawn@1: vuv = detect_VoicedUnvoiced( [dirName '.wav'], 0 ); dawn@0: dawn@1: metricName = '_Formant_Burg'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); dawn@0: dawn@1: metricName = '_Formant_all'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); dawn@1: dawn@1: metricName = '_Formant_robust'; dawn@1: metricFileName = [ dirName metricName '.txt']; dawn@1: readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv ); dawn@1: dawn@1: dawn@1: fprintf( statsFileID, '\n'); dawn@0: dawn@0: