#! /usr/bin/env python
from unit_timeside import *
-from timeside.decoder import *
+from timeside.decoder import FileDecoder
from timeside.analyzer.level import Level
+import os
class TestAnalyzerLevel(unittest.TestCase):
#! /usr/bin/env python
from unit_timeside import *
-from timeside.decoder import *
+from timeside.decoder import FileDecoder
from timeside.analyzer import WITH_AUBIO
if WITH_AUBIO:
from timeside.analyzer.aubio_melenergy import AubioMelEnergy
-
+import os
@unittest.skipIf(not WITH_AUBIO, 'Aubio library is not available')
class TestAubioMelEnergy(unittest.TestCase):
#! /usr/bin/env python
from unit_timeside import *
-from timeside.decoder import *
+from timeside.decoder import FileDecoder
from timeside.analyzer import WITH_AUBIO
if WITH_AUBIO:
from timeside.analyzer.aubio_mfcc import AubioMfcc
+import os
@unittest.skipIf(not WITH_AUBIO, 'Aubio library is not available')
from timeside.analyzer import WITH_AUBIO
if WITH_AUBIO:
from timeside.analyzer.aubio_pitch import AubioPitch
+import os
@unittest.skipIf(not WITH_AUBIO, 'Aubio library is not available')
#! /usr/bin/env python
from unit_timeside import *
-from timeside.decoder import *
+from timeside.decoder import FileDecoder
from timeside.analyzer import WITH_AUBIO
if WITH_AUBIO:
from timeside.analyzer.aubio_specdesc import AubioSpecdesc
+import os
@unittest.skipIf(not WITH_AUBIO, 'Aubio library is not available')
#! /usr/bin/env python
from unit_timeside import *
-from timeside.decoder import *
+from timeside.decoder import FileDecoder
from timeside.analyzer import WITH_AUBIO
if WITH_AUBIO:
from timeside.analyzer.aubio_temporal import AubioTemporal
+import os
@unittest.skipIf(not WITH_AUBIO, 'Aubio library is not available')
#! /usr/bin/env python
from unit_timeside import *
-from timeside.decoder import *
+from timeside.decoder import FileDecoder
from timeside.analyzer import WITH_YAAFE
if WITH_YAAFE:
from timeside.analyzer import Yaafe
from yaafelib import DataFlow, FeaturePlan
+import os
@unittest.skipIf(not WITH_YAAFE, 'Yaafe library is not available')
import encoder
__version__ = '0.5.5'
+
+__all__ = ['api', 'core', 'decoder', 'analyzer', 'grapher', 'encoder']
WITH_AUBIO = True
from aubio_temporal import AubioTemporal
from aubio_pitch import AubioPitch
- from aubio_mfcc import *
- from aubio_melenergy import *
- from aubio_specdesc import *
+ from aubio_mfcc import AubioMfcc
+ from aubio_melenergy import AubioMelEnergy
+ from aubio_specdesc import AubioSpecdesc
except ImportError:
WITH_AUBIO = False
# Yaafe
try:
WITH_YAAFE = True
- from yaafe import *
+ from yaafe import Yaafe
except ImportError:
WITH_YAAFE = False
'''
>>> import timeside
+ >>> from timeside.analyzer.core import Analyzer
>>> wav_file = 'tests/samples/sweep.mp3' # doctest: +SKIP
>>> d = timeside.decoder.FileDecoder(wav_file)
- >>> a = timeside.analyzer.Analyzer()
+ >>> a = Analyzer()
>>> (d|a).run()
>>> a.new_result() #doctest: +ELLIPSIS
FrameValueResult(id_metadata=IdMetadata(id='analyzer', name='Generic analyzer', unit='', description='', date='...', version='...', author='TimeSide', uuid='...'), data_object=DataObject(value=array([], dtype=float64)), audio_metadata=AudioMetadata(uri='...', start=0.0, duration=8.0..., is_segment=False, sha1='...', channels=2, channelsManagement=''), frame_metadata=FrameMetadata(samplerate=44100, blocksize=8192, stepsize=8192), parameters={})
# -*- coding: utf-8 -*-
-from file import *
-from array import *
-from live import *
+from file import FileDecoder
+from array import ArrayDecoder
+from live import LiveDecoder
+
+__all__ = ['FileDecoder', 'ArrayDecoder', 'LiveDecoder']
from webm import WebMEncoder
from audiosink import AudioSink
from opus import OpusEncoder
+
+__all__ = ['VorbisEncoder', 'WavEncoder', 'Mp3Encoder', 'FlacEncoder',
+ 'AacEncoder', 'WebMEncoder', 'AudioSink', 'OpusEncoder']
# -*- coding: utf-8 -*-
-from waveform_simple import *
-from waveform_centroid import *
-from waveform_transparent import *
-from waveform_contour import *
-from spectrogram_log import *
-from spectrogram_lin import *
-from render_analyzers import *
+from waveform_simple import Waveform
+from waveform_centroid import WaveformCentroid
+from waveform_transparent import WaveformTransparent
+from waveform_contour import WaveformContourBlack, WaveformContourWhite
+from spectrogram_log import SpectrogramLog
+from spectrogram_lin import SpectrogramLinear
+from render_analyzers import DisplayOnsetDetectionFunction, DisplayWaveform
+from render_analyzers import Display4hzSpeechSegmentation
+
+__all__ = ['Waveform', 'WaveformCentroid', 'WaveformTransparent',
+ 'WaveformContourBlack', 'WaveformContourWhite',
+ 'SpectrogramLog', 'SpectrogramLinear',
+ 'DisplayOnsetDetectionFunction', 'DisplayWaveform',
+ 'Display4hzSpeechSegmentation']
--------
>>> import numpy as np
- >>> from timeside.grapher import smooth
+ >>> from timeside.grapher.utils import smooth
>>> t = np.arange(-2,2,0.1)
>>> x = np.sin(t)+np.random.randn(len(t))*0.1
>>> y = smooth(x)
-from cache import *
-from logger import *
+from cache import Cache
+from logger import Logger
from gstutils import *