carat.util.example_audio_file

carat.util.example_audio_file(num_file=None)[source]

Get the path to an included audio example file.

Parameters:
num_file : int

Number to select among the example files available.

Returns:
filename : str

Path to the audio example file included with carat.

Examples

>>> # Load the waveform from the default example track
>>> y, sr = carat.audio.load(carat.util.example_audio_file())
>>> # Load 10 seconds of the waveform from the example track number 1
>>> y, sr = carat.audio.load(carat.util.example_audio_file(num_file=1), duration=10.0))
>>> # Load the waveform from the example track number 2
>>> y, sr = carat.audio.load(carat.util.example_audio_file(num_file=2))