Mercurial > hg > emotion-detection-top-level
view Code/Collation/get_PRAAT.m @ 1:a3d62264030c
tested and working
author | Dawn Black <dawn.black@eecs.qmul.ac.uk> |
---|---|
date | Mon, 10 Sep 2012 09:13:53 +0100 |
parents | ea0c737c6323 |
children |
line wrap: on
line source
function [] = get_PRAAT( 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 jitter metrics ------------------- % JITTER: ddp \t local \t ppq5 \t rap \t metricName = '_jitter_ddp'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_jitter_local'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_jitter_ppq5'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_jitter_rap'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); %-------------- get the shimmer metrics ---------------------- % SHIMMER: local \t dda \t apq3 \t apq5 \t apq11 metricName = '_shimmer_local'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_shimmer_dda'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_shimmer_apq3'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_shimmer_apq5'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); metricName = '_shimmer_apq11'; metricFileName = [ dirName metricName '.txt']; readValueFromFile( statsFileID, metricFileName, metricName ); %-------------- 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');