ertk.dataset.get_audio_paths

ertk.dataset.get_audio_paths(path: PathLike | str, absolute: bool = True) List[Path]

Given a path to a dir or list of audio files, return a sequence of absolute paths to those files. Note that this method handles relative paths but returns absolute paths, and doesn’t resolve canonical paths (i.e. it doesn’t follow symlinks.)

Parameters:
file: pathlike or str

Path to a directory containing audio clips, or a file containing a list of paths to audio clips.

absolute: bool

If True, return absolute paths, otherwise return the paths already in the file/directory. Default is True.

Returns:
List of paths to audio files. Paths will be absolute paths if
absolute=True.