]> git.parisson.com Git - timeside-diadems.git/commitdiff
fix(limsi_sad): fix the last fix again
authorThomas Fillon <thomas@parisson.com>
Fri, 3 Oct 2014 13:26:19 +0000 (15:26 +0200)
committerThomas Fillon <thomas@parisson.com>
Fri, 3 Oct 2014 13:26:19 +0000 (15:26 +0200)
timeside/analyzer/limsi_sad.py

index cfc161243db22122b082df6525bc4220c56b4c86..1311f443deea3c82d4ecf96ca123a6d632f29472 100644 (file)
@@ -30,6 +30,10 @@ import numpy as np
 import pickle
 import os.path
 
+# Require Yaafe
+if not timeside._WITH_YAAFE:
+    raise ImportError('yaafelib must be missing')
+
 
 class GMM:
     """
@@ -149,11 +153,7 @@ class LimsiSad(Analyzer):
                         'mfccd1: MFCC CepsIgnoreFirstCoeff=0 blockSize=1024 stepSize=256 > Derivate DOrder=1',
                         'mfccd2: MFCC CepsIgnoreFirstCoeff=0 blockSize=1024 stepSize=256 > Derivate DOrder=2',
                         'zcr: ZCR blockSize=1024 stepSize=256']
-        try:
-            yaafe_analyzer = get_processor('yaafe')
-        except timeside.exceptions.PIDError as e:
-            raise ImportError(e.message + '.yaafelib must be missing')
-
+        yaafe_analyzer = get_processor('yaafe')
         self.parents['yaafe'] = yaafe_analyzer(feature_plan=feature_plan,
                                                input_samplerate=16000)