file_duration_table
- ketos.data_handling.selection_table.file_duration_table(path, search_subdirs=False, datetime_format=None)[source]
Create file duration table.
- Args:
- path: str
Path to folder with audio files with extensions wav, WAV, flac, FLAC.
- search_subdirs: bool
If True, search include also any audio files in subdirectories. Default is False.
- datetime_format: str
String defining the date-time format. Example: %d_%m_%Y* would capture “14_3_1999.txt”. See https://pypi.org/project/datetime-glob/ for a list of valid directives. If specified, the method will attempt to parse the datetime information from the filename.
- Returns:
- df: pandas DataFrame
File duration table. Columns: filename, duration, (datetime)