maad.sound.load_url

maad.sound.load_url(url)[source]

Download audio file from the web and load it as a variable. The audio file must be a Waveform Audio Format (WAV) file.

Parameters:
urlstr

Audio code name or URL address where the file is located.

Returns:
s1d ndarray

Array with the signal amplitude

fsint

Sampling frequency of the signal, in Hertz (Hz)

Examples

Load an audio example using its code name.

>>> from maad import sound
>>> s, fs = sound.load_url('spinetail')
>>> print('The samping rate of the audio file is {} Hz'.format(fs))
The samping rate of the audio file is 44100 Hz

Load an audio example using the full web address.

>>> s, fs = sound.load_url('https://github.com/scikit-maad/scikit-maad/raw/production/data/spinetail.wav')
>>> print('The samping rate of the audio file is {} Hz'.format(fs))
The samping rate of the audio file is 44100 Hz