Issue
Using a jupyter notebook in VSCode, I'm trying to run the following code from this documentation:
import numpy as np
from IPython.display import Audio
framerate = 44100
t = np.linspace(0,5,framerate*5)
data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)
Audio(data, rate=framerate)
However, I only get this
If I press play button, then nothing happens...
Solution
As of today, it seems VSCode Jupyter extension does not support audio. You can track the issue here on their Github.
One solution can be merging this pull request and rebuilding VSCode, which is not suggested.
The preferred alternate solution is using jupyter lab
instead of VSCode for such use cases.
Answered By - Sadra Naddaf
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.