]> git.parisson.com Git - timeside-diadems.git/commitdiff
Clean-up code for checking external librairies availability
authorThomas Fillon <thomas@parisson.com>
Fri, 16 May 2014 16:05:22 +0000 (18:05 +0200)
committerThomas Fillon <thomas@parisson.com>
Fri, 16 May 2014 16:05:22 +0000 (18:05 +0200)
- Enhance code to check if Aubio, Yaafe and Vamp host are available
- Corresponding processors should not be shown in processors list
- TimeSide can now be installed without all or any of these librairies
- Tests ands Doctests will passed (for doctest I had to skip some new server sub-modules)

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

index 062ee5c0b2be077d05096d4f81f08772a3372c05..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import absolute_import
-
-# ----- Load external libraries ------
-# Aubio
-try:
-    WITH_AUBIO = True
-    import aubio
-except ImportError:
-    WITH_AUBIO = False
-else:
-    del aubio
-
-# Yaafe
-try:
-    WITH_YAAFE = True
-    import yaafelib
-except ImportError:
-    WITH_YAAFE = False
-else:
-    del yaafelib
-
-# Vamp Plugins
-try:
-    from . vamp_plugin import VampSimpleHost
-    VampSimpleHost.SimpleHostProcess(['-v'])
-    WITH_VAMP = True
-except OSError:
-    WITH_VAMP = False
index 9044c5287971e0cef684e2ecd123be5d27dc3423..df9603d68acbd28b1f7ee6a5ced8114b12f1ce81 100644 (file)
@@ -23,11 +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
-WITH_YAAFE = True
-if WITH_YAAFE:
-    from yaafe import Yaafe
-    import yaafelib
+
+import yaafelib
 import numpy as N
 import pickle
 import os.path