From 64c6504ced3d41ceca14060d1ebb158c76e4de12 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Mon, 20 Oct 2014 21:43:58 +0200 Subject: [PATCH] Doc(Spectrogram): add documentation on parameters --- doc/source/api/analyzer/analyzers.rst | 40 ++++++++++++++++++--------- timeside/analyzer/spectrogram.py | 14 +++++++++- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/doc/source/api/analyzer/analyzers.rst b/doc/source/api/analyzer/analyzers.rst index 7d6e524..3061c55 100644 --- a/doc/source/api/analyzer/analyzers.rst +++ b/doc/source/api/analyzer/analyzers.rst @@ -21,53 +21,67 @@ Level :undoc-members: :show-inheritance: +Other Analyzers +=============== + +Spectrogram +----------- +.. automodule:: timeside.analyzer.spectrogram + :members: + :undoc-members: + :show-inheritance: + + + +External librairies +=================== Aubio -===== +----- **aubio** is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. See http://aubio.org/ Aubio Melenergy ---------------- -.. automodule:: timeside.analyzer.aubio.aubio_melenergy +~~~~~~~~~~~~~~~ +.. automodule:: timeside.analyzer.externals.aubio_melenergy :members: :undoc-members: :show-inheritance: aubio_mfcc ----------- -.. automodule:: timeside.analyzer.aubio.aubio_mfcc +~~~~~~~~~~ +.. automodule:: timeside.analyzer.externals.aubio_mfcc :members: :undoc-members: :show-inheritance: aubio_pitch ------------ -.. automodule:: timeside.analyzer.aubio.aubio_pitch +~~~~~~~~~~~ +.. automodule:: timeside.analyzer.externals.aubio_pitch :members: :undoc-members: :show-inheritance: aubio_specdesc --------------- -.. automodule:: timeside.analyzer.aubio.aubio_specdesc +~~~~~~~~~~~~~~ +.. automodule:: timeside.analyzer.externals.aubio_specdesc :members: :undoc-members: :show-inheritance: aubio_temporal --------------- -.. automodule:: timeside.analyzer.aubio.aubio_temporal +~~~~~~~~~~~~~~ +.. automodule:: timeside.analyzer.externals.aubio_temporal :members: :undoc-members: :show-inheritance: Yaafe -===== -.. automodule:: timeside.analyzer.yaafe +----- +.. automodule:: timeside.analyzer.externals.yaafe :members: :undoc-members: :show-inheritance: diff --git a/timeside/analyzer/spectrogram.py b/timeside/analyzer/spectrogram.py index aba1a78..10a745a 100644 --- a/timeside/analyzer/spectrogram.py +++ b/timeside/analyzer/spectrogram.py @@ -33,11 +33,23 @@ import numpy as np class Spectrogram(Analyzer): """Spectrogram analyzer + Parameters + ---------- + input_blocksize : int, optional + Blocksize of the input signal, default to 2048 + input_stepsize : str, optional + The second parameter, default to half blocksize. + fft_size : int, optional + The size of the fft, default to blocksize. + + Examples + -------- + >>> import timeside >>> from timeside.tools.data_samples import samples as ts_samples >>> audio_source = ts_samples['sweep.wav'] >>> decoder = timeside.decoder.file.FileDecoder(uri=audio_source) - >>> spectrogram = Spectrogram(input_blocksize=2048, input_stepsize=1024) + >>> spectrogram = timeside.analyzer.spectrogram.Spectrogram(input_blocksize=2048, input_stepsize=1024) >>> pipe = (decoder | spectrogram) >>> pipe.run() -- 2.39.5