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?
>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?