ipython / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
https://ipython.readthedocs.org
BSD 3-Clause "New" or "Revised" License
16.24k stars 4.43k forks source link

Audio autoplay does not work #14299

Open ttkrpink opened 7 months ago

ttkrpink commented 7 months ago
from IPython.display import display, Audio
import numpy as np

beep = np.sin(2*np.pi*400*np.arange(1300*2)/10000)
test = Audio(beep, rate=10000, autoplay=True)
display(test)
Audio(data= beep, rate=10000, autoplay=True)

The autoplay does not work, I have to click the "play" button for the audio to play. I tried mp3 and wav file also, none worked.

ipykernel==6.28.0 jupyter_client==8.6.0 jupyter_core==5.7.1 jupyterlab-widgets==3.0.9 ipywidgets==8.1.1 ipython==8.20.0

Any help will be appreciated.

krassowski commented 7 months ago

@ttkrpink are you clicking the play button in an IPython terminal, or in a Jupyter Notebook or JupyterLab interface?