Is it possible to play a numpy array outside a notebook environment?

1,070 views
Skip to first unread message

NumesSanguis

unread,
Sep 15, 2017, 2:19:00 AM9/15/17
to librosa

I'm aware you can play a numpy array in a Jupyter Notebook using `IPython.display.Audio(data=wav[:], rate=sr)`, with `wav` being a numpy array.
However, I cannot find any information how to play audio in a Python script.
Is it possible with librosa to do something like this?: `librosa.play(data=wav[:], rate=sr)`

Brian McFee

unread,
Sep 18, 2017, 8:35:56 AM9/18/17
to librosa
You might consider looking at this package: https://python-sounddevice.readthedocs.io/en/0.3.8/

NumesSanguis

unread,
Sep 19, 2017, 10:23:09 PM9/19/17
to librosa
I tried using sounddevice, but I got stuck with the following problem (PortAudio: IOError: No Default Output Device Available):
https://github.com/ContinuumIO/anaconda-issues/issues/2999
Reply all
Reply to author
Forward
0 new messages