Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Method for playing a sound file in pyaudio at Ubuntu?

I attempted to play a.wav file with pyaudio. It works fine in Windows, but not in Ubuntu when another device is using sound.

and got this error:

The error is "IOError: [Errorno Invalid output device (no default output device)] -9996

Is there another way?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Did you try wxPython
as example:

sound.Play(wx.SOUND_ASYNC)

and sound variable can be defined like this:

sound = wx.Sound('sound.wav')

you can see this question as reference seems you have the same problem.
What's a cross platform way to play a sound file in python?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading