>>> # Load an ogg vorbis file
>>> filename = librosa.ex('trumpet')
>>> y, sr = librosa.load(filename)
array([-1.407e-03, -4.461e-04, ..., -3.042e-05, 1.277e-05],
dtype=float32)
22050
>>> # Load a file and resample to 11 KHz
>>> filename = librosa.ex('trumpet')
>>> y, sr = librosa.load(filename, sr=11025)
array([-8.746e-04, -3.363e-04, ..., -1.301e-05, 0.000e+00],
dtype=float32)
11025
>>> # Load 5 seconds of a file, starting 15 seconds in
>>> filename = librosa.ex('brahms')
>>> y, sr = librosa.load(filename, offset=15.0, duration=5.0)
array([0.146, 0.144, ..., 0.128, 0.015], dtype=float32)
22050