From 8e99eeffddcb2ca00bc77f7a0f6cd9fa5873bbde Mon Sep 17 00:00:00 2001 From: Tilman Kamp Date: Mon, 19 Dec 2016 16:21:39 +0100 Subject: [PATCH] Fix #284; BiRNN with stride 2 --- util/audio.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/audio.py b/util/audio.py index ff0e8e65..407e6eba 100644 --- a/util/audio.py +++ b/util/audio.py @@ -10,6 +10,9 @@ def audiofile_to_input_vector(audio_filename, numcep, numcontext): # Get mfcc coefficients orig_inputs = mfcc(audio, samplerate=fs, numcep=numcep) + # We only keep every second feature (BiRNN stride = 2) + orig_inputs = orig_inputs[::2] + # For each time slice of the training set, we need to copy the context this makes # the numcep dimensions vector into a numcep + 2*numcep*numcontext dimensions # because of: