Previous topic

audiodb module

Next topic

metadata module

This Page

audiocollection module

class bregman.audiocollection.AudioCollection(path=None, root_path='/home/mcasey/exp')
A class for extracting, persisting, and searching audio features in a collection


Instantiate a new collection at the given path. This directory is where features and
audioDB databases will be stored. The collection path does not have to be the same as the
audio files path for inserted audio. Audio can come from any location, but features are consolodated into
the AudioCollection path.
extract_features(key=None, keyrepl=None, extract_only=False, wave_suffix='.wav')
Extract features over the collection
 self.audio_collection - set of audio files to extract
 self.feature_params - features to extract

 key - optional string to append on filename stem as database key
 keyrepl - if key is specified then keyrepl is a pattern to replace with key
 extract_only - set to True to skip audioDB insertion
 wave_suffix - fileName extension for key replacement

Returns rTupleList of features,powers,keys or None if fail.
Make a new collection path with an empty audioDB instance.
Each instance is unique to a set of feature_params.
Return False if an equivalent instance already exists.
Return True if new instance was created.
Maintain a set of audio files as a collection. Each item is unique in the set. Collisions are ignored.
classmethod lc(expand=False, limit=None)
Alias for ls_collections()
Load stored data for this collection
classmethod ls_collections(expand=False, limit=None)
For the given class, return a list of instances
If expand is set to True, pint each collection's TOC
Save data for this collection
List contents of this collection, or collection at collection_path.