Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

failure to make sound with "IPython.display import Audio, display"  #1947

Closed

Description

@stonebig

Bug: Notebook Editor, Interactive Window, Editor cells

I can't get the sound button working on this widget: the sound button is grey/not clickable

%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import interactive
from IPython.display import Audio, display
def beat_freq(f1=220.0, f2=224.0):
    max_time = 3
    rate = 8000
    times = np.linspace(0,max_time,rate*max_time)
    signal = np.sin(2*np.pi*f1*times) + np.sin(2*np.pi*f2*times)
    print(f1, f2, abs(f1-f2))
    display(Audio(data=signal, rate=rate))
    try:
         plt.plot(signal); #plt.plot(v.result);
    except:
         pass
    return signal
v = interactive(beat_freq, f1=(200.0,300.0), f2=(200.0,300.0))
display(v)

Steps to cause the bug to occur

  1. run this cell in a jupyter notebook

Actual behavior

sound button is grey / not clickable

image

Expected behavior

I can launch and hear the sound

Your Jupyter and/or Python environment

  • Winpython, Jupyter-2.2, vscode-1.44.2

Please provide as much info as you readily know

  • **Jupyter server running: Local
  • **Extension version: 2020.4.74986
  • **VS Code version: 1.44.2
  • **Setting python.jediEnabled: (the default , don't know what it is)
  • Python and/or Anaconda version: Python-3.8.2 (Winpython64-3.8.2.1b2.exe)
  • OS: Windows | Mac | Linux (distro): Windows 10 1909
  • **Virtual environment: nothing

remark: all the rest of this works, so it's not bad at all https://github.com/winpython/winpython_afterdoc/blob/master/docs/Winpython_checker.ipynb

Microsoft Data Science for VS Code Engineering Team: Rich Chiodo (@rchiodo), Ian Huff (@IanMatthewHuff), David Kutugata (@DavidKutu), Don Jayamanne (@DonJayamanne), Jim Griesmer (@greazer)

Activity

  1. rchiodo commented on Apr 22, 2020

    @rchiodo
    Contributor

    I believe VS code doesn't support audio or video output:
    microsoft/vscode#32540

  2. stonebig commented on Apr 25, 2020

    @stonebig
    Author

    That limits a bit the usage
    I hope a progressive de confinement of the sound will happen someday.

  3. locked as resolved and limited conversation to collaborators on May 5, 2020
  4. unlocked this conversation on Nov 13, 2020
  5. audioplastic commented on Jan 20, 2021

    @audioplastic

    I reproduced the lack of functionality in vscode, but works fine in vscodium. What's the difference here?

  6. rchiodo commented on Jan 20, 2021

    @rchiodo
    Contributor

    VS code does not ship the codecs for Electron to support audio or video playback. I don't know for sure but I suspect vscodium might.

  7. locked as resolved and limited conversation to collaborators on May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions