]> git.parisson.com Git - timeside-diadems.git/commitdiff
Automatic discovering of processors
authorThomas Fillon <thomas@parisson.com>
Wed, 14 May 2014 10:35:42 +0000 (12:35 +0200)
committerThomas Fillon <thomas@parisson.com>
Wed, 14 May 2014 10:35:42 +0000 (12:35 +0200)
- Automatic discovering of processors by walking through timeside decoder, analyzer, encoder and grapher subpackages.
- Empty corresponding __init__ files i.e. remove explicit import of processors

timeside/analyzer/__init__.py
timeside/analyzer/limsi_sad.py

index b49b82aeb8c73b538b4d142a1aa57cda44ec4b77..7da90fd52b7c79246469b7da44159d3588d20424 100644 (file)
@@ -1,41 +1,27 @@
 # -*- coding: utf-8 -*-
+from __future__ import absolute_import
 
 # ----- Load external libraries ------
 # Aubio
 try:
     WITH_AUBIO = True
-    from aubio_temporal import AubioTemporal
-    from aubio_pitch import AubioPitch
-    from aubio_mfcc import AubioMfcc
-    from aubio_melenergy import AubioMelEnergy
-    from aubio_specdesc import AubioSpecdesc
+    import aubio
 except ImportError:
     WITH_AUBIO = False
-
+else:
+    del aubio
 # Yaafe
 try:
     WITH_YAAFE = True
-    from yaafe import Yaafe
-
+    import yaafelib
 except ImportError:
     WITH_YAAFE = False
-
+else:
+    del yaafelib
 # Vamp Plugins
 try:
-    from vamp_plugin import VampSimpleHost
+    from vamp_plugin import VampSimpleHost
     VampSimpleHost.SimpleHostProcess(['-v'])
     WITH_VAMP = True
 except OSError:
     WITH_VAMP = False
-
-
-# ----- Load timeside analyzers ------
-from level import Level
-from dc import MeanDCShift
-from spectrogram import Spectrogram
-from waveform import Waveform
-from irit_speech_entropy import IRITSpeechEntropy
-from irit_speech_4hz import IRITSpeech4Hz
-from odf import OnsetDetectionFunction
-if WITH_YAAFE:
-    from limsi_sad import LimsiSad
index 294d9533b3aa349725135bd03386d504413212c5..9044c5287971e0cef684e2ecd123be5d27dc3423 100644 (file)
@@ -23,7 +23,8 @@ from timeside.core import implements, interfacedoc
 from timeside.analyzer.core import Analyzer
 from timeside.api import IAnalyzer
 import timeside
-from timeside.analyzer import WITH_YAAFE
+#from timeside.analyzer import WITH_YAAFE
+WITH_YAAFE = True
 if WITH_YAAFE:
     from yaafe import Yaafe
     import yaafelib