Mercurial > hg > emotion-detection-top-level
diff Code/Descriptors/Matlab/Common/detect_Silence.m @ 4:92ca03a8fa99 tip
Update to ICASSP 2013 benchmark
author | Dawn Black |
---|---|
date | Wed, 13 Feb 2013 11:02:39 +0000 |
parents | ea0c737c6323 |
children |
line wrap: on
line diff
--- a/Code/Descriptors/Matlab/Common/detect_Silence.m Mon Sep 10 09:20:12 2012 +0100 +++ b/Code/Descriptors/Matlab/Common/detect_Silence.m Wed Feb 13 11:02:39 2013 +0000 @@ -1,9 +1,10 @@ -function [ silenceSegments ] = detect_Silence( currentSampleName, OVERWRITE ); +function [ silenceSegments ] = detect_Silence( sampleWavFileName, OVERWRITE ); %returns an array containing the start and end frames for non-silent segments % open original silence calculation -fileName = [ currentSampleName '_silence.txt']; +sampleFileName = sampleWavFileName( 1 : length( sampleWavFileName ) - 4 ); +fileName = [ sampleFileName '_silence.txt']; % read pitch metrics from file fileID = fopen( fileName ); @@ -11,7 +12,7 @@ % no disp('WARNING: MISSING SILENCE FILE'); %calculate it - [x, fs, frameLength, noOfFrames] = openFile( [ sampleFileName '.wav' ] ); + [x, fs, frameLength, noOfFrames] = openFile( sampleWavFileName ); limits = calculate_Silence( x, fs, frameLength ); % create voicing metrics file fileID = fopen( fileName, 'w');