ipython.display.audio

已回答

Hi,

I am working with project with some audio application .I got code to display audio using ipython in a jupiter notebook (mentioned below).

code snippet as below

================

rate , s = wavefile.read('speech.wav')

Ipython.display.Audio(s,rate=rate)

i am using pycharm and i wrote the same above line in pycharm script file "test.py" and i run the code.

Its showing like execution over but its not showing audio clip. In jupyter note book it will show the audio file and you can play the audio also.

this is not happening in pycharm . 

How can i play the audio using abone line of code ? I want to write as a script not as cells.

 

Thanks and Regards,

sarath V A

 

0

Hi Sarathverinkal, did you try to run your script in the terminal? PyCharm simply calls python your_script.py, so if it doesn't work in the terminal - it won't work in PyCharm.

0
Avatar
Permanently deleted user

Hi Pavel Karateev ,

Yes i ran my script in console it is not playing audio, but in jupyter notebook it will play the audio. 

Can you tell me a way to play audio file in pycharm. 

 

Regards,

sarath V A

0

Unfortunately, PyCharms' Jupyter integration doesn't support widgets (PY-14534) so it is impossible to play audio files from the IDE.

0

请先登录再写评论。