annotate Code/Collation/get_PRAAT.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents a3d62264030c
children
rev   line source
dawn@0 1 function [] = get_PRAAT( dirName, statsFileID )
dawn@0 2
dawn@0 3 % this function collates the results of all values calculated using the PRAAT software
dawn@0 4
dawn@1 5 % For jitter and shimmer PRAAT returns only a single value, not a
dawn@1 6 % frame-by-frame calculation. Therefore we cannot find the varience etc.
dawn@1 7
dawn@1 8
dawn@0 9 % identify the speaker in the stats file
dawn@0 10 fprintf( statsFileID, '%s ', dirName );
dawn@0 11
dawn@0 12 % -------------- get the jitter metrics -------------------
dawn@0 13 % JITTER: ddp \t local \t ppq5 \t rap \t
dawn@1 14
dawn@1 15 metricName = '_jitter_ddp';
dawn@1 16 metricFileName = [ dirName metricName '.txt'];
dawn@1 17 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@0 18
dawn@1 19 metricName = '_jitter_local';
dawn@1 20 metricFileName = [ dirName metricName '.txt'];
dawn@1 21 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@1 22
dawn@1 23 metricName = '_jitter_ppq5';
dawn@1 24 metricFileName = [ dirName metricName '.txt'];
dawn@1 25 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@1 26
dawn@1 27 metricName = '_jitter_rap';
dawn@1 28 metricFileName = [ dirName metricName '.txt'];
dawn@1 29 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@0 30
dawn@0 31
dawn@0 32 %-------------- get the shimmer metrics ----------------------
dawn@0 33 % SHIMMER: local \t dda \t apq3 \t apq5 \t apq11
dawn@1 34
dawn@1 35 metricName = '_shimmer_local';
dawn@1 36 metricFileName = [ dirName metricName '.txt'];
dawn@1 37 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@1 38
dawn@1 39 metricName = '_shimmer_dda';
dawn@1 40 metricFileName = [ dirName metricName '.txt'];
dawn@1 41 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@0 42
dawn@1 43 metricName = '_shimmer_apq3';
dawn@1 44 metricFileName = [ dirName metricName '.txt'];
dawn@1 45 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@0 46
dawn@1 47 metricName = '_shimmer_apq5';
dawn@1 48 metricFileName = [ dirName metricName '.txt'];
dawn@1 49 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@0 50
dawn@1 51 metricName = '_shimmer_apq11';
dawn@1 52 metricFileName = [ dirName metricName '.txt'];
dawn@1 53 readValueFromFile( statsFileID, metricFileName, metricName );
dawn@0 54
dawn@0 55 %-------------- get the formant metrics ----------------------
dawn@1 56 % PRAAT returns a frame-by-frame value
dawn@1 57 % need to discard all formant information for unvoiced and silent frames.
dawn@1 58 vuv = detect_VoicedUnvoiced( [dirName '.wav'], 0 );
dawn@0 59
dawn@1 60 metricName = '_Formant_Burg';
dawn@1 61 metricFileName = [ dirName metricName '.txt'];
dawn@1 62 readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv );
dawn@0 63
dawn@1 64 metricName = '_Formant_all';
dawn@1 65 metricFileName = [ dirName metricName '.txt'];
dawn@1 66 readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv );
dawn@1 67
dawn@1 68 metricName = '_Formant_robust';
dawn@1 69 metricFileName = [ dirName metricName '.txt'];
dawn@1 70 readFormantValueFromFile( statsFileID, metricFileName, metricName, vuv );
dawn@1 71
dawn@1 72
dawn@1 73 fprintf( statsFileID, '\n');
dawn@0 74
dawn@0 75