I am trying to read Mp3 audio from URL using Librosa. I understand that Librosa first uses PySoundFile to load the audio and if that fails it then uses audioread.
I have the following code so far:
import librosa
import io
from six.moves.urllib.request import urlopen
url = "https://sneezoramafunction.blob.core.windows.net/usersounds/00bd9b8c914947d48724fd7e0c88041b.mp3"
data, samplerate = librosa.load(io.BytesIO(urlopen(url).read()))
But this gives me the following error:
RuntimeError: Error opening <_io.BytesIO object at 0x1c234747d0>: File contains data in an unknown format.
Additionally, I would be deploying this on Azure ML service and would not have any local storage available.
Thank you all for any help/advice