]> git.parisson.com Git - timeside-diadems.git/commitdiff
feature(ProcessPipe): Add a method for a processor to overwrite the source samplerate
authorThomas Fillon <thomas@parisson.com>
Mon, 30 Jun 2014 10:33:49 +0000 (12:33 +0200)
committerThomas Fillon <thomas@parisson.com>
Mon, 30 Jun 2014 10:33:49 +0000 (12:33 +0200)
timeside/analyzer/limsi_sad.py

index dff1b02b802953090572a04352ed7d9277b5ed9d..a0ab0cdbab87ef25e48a640fa49f1ce3354c0652 100644 (file)
@@ -115,11 +115,11 @@ class LimsiSad(Analyzer):
         # return the unit of the data dB, St, ...
         return "Log Probability difference"
 
+    @property
+    def force_samplerate(self):
+        return 16000
+
     def process(self, frames, eod=False):
-        if self.input_samplerate != 16000:
-            raise Exception(
-                '%s requires 16000 input sample rate: %d provided' %
-                (self.__class__.__name__, self.input_samplerate))
         return frames, eod
 
     def post_process(self):