]> git.parisson.com Git - timeside-diadems.git/commitdiff
merge irit_speech_4hz from diadems into dev
authorThomas Fillon <thomas@parisson.com>
Fri, 3 Oct 2014 11:27:30 +0000 (13:27 +0200)
committerThomas Fillon <thomas@parisson.com>
Fri, 3 Oct 2014 11:27:30 +0000 (13:27 +0200)
timeside/analyzer/irit_speech_4hz.py

index 385f10ed54bb3ac37c3962c8fa0b0fd9fbf2e916..ecd04d0211f177d624961589323c2a816cc694ad 100644 (file)
@@ -27,6 +27,7 @@ from timeside.api import IAnalyzer
 from numpy import array, hamming, dot, mean, float, mod
 from numpy.fft import rfft
 from scipy.signal import firwin, lfilter
+from timeside.analyzer.preprocessors import frames_adapter
 
 from ..tools.parameters import Float, HasTraits
 
@@ -82,6 +83,11 @@ class IRITSpeech4Hz(Analyzer):
         self.nbFilters = 30
         self.melFilter = melFilterBank(self.nbFilters, self.nFFT, samplerate)
 
+        self.wLen = 0.016
+        self.wStep = 0.008
+        self.input_blocksize = int(self.wLen * samplerate)
+        self.input_stepsize = int(self.wStep * samplerate)
+
     @staticmethod
     @interfacedoc
     def id():
@@ -100,6 +106,7 @@ class IRITSpeech4Hz(Analyzer):
     def __str__(self):
         return "Speech confidences indexes"
 
+    @frames_adapter
     def process(self, frames, eod=False):
         '''