maad.util.get_metadata_dir

maad.util.get_metadata_dir(path_dir, verbose=False)[source]

Get metadata asociated with audio recordings in a directory. Metadata includes basic information of the audio file format (sample rate, number of channels, bit depth and file size), and date information from the filename. Note however, that this function is intended for use only with audio files with a self-describing header.

Parameters:
path_dirstr

Path of either a directory or a file. it will select all wav files in the parent folder (of either the file or directory in path_dir). The search for file is performed recursively.

verboseboolean, optional

Output file progress. The default is False.

Returns:
df_metadatapandas.DataFrame

Dataframe with metadata, files as rows and metadata as columns.

Examples

>>> from maad import util
>>> df_metadata = util.get_metadata_dir('../data/indices/')