find_wave_files
- ketos.data_handling.data_handling.find_wave_files(path, return_path=True, search_subdirs=False, search_path=False)[source]
Find all wave files in the specified directory
- Args:
- path: str
Directory path
- return_path: bool
If True, path to each file, relative to the top directory. If false, only return the filenames
- search_subdirs: bool
If True, search all subdirectories
- search_path: bool
Search for substring occurrence in relative path rather than just the filename
- Returns:
- : list (str)
Alphabetically sorted list of file names
- Examples:
>>> from ketos.data_handling.data_handling import find_wave_files >>> >>> find_wave_files(path="ketos/tests/assets", return_path=False) ['2min.wav', 'empty.wav', 'grunt1.wav', 'super_short_1.wav', 'super_short_2.wav']