I tried playing a .wav file using pyaudio. It works great on windows, but doesn't work in Ubuntu when another device is using sound.
The error is "IOError: [Errorno Invalid output device (no default output device)] -9996
Is there another library I could try to use? Another method?
You can use wxPython
sound = wx.Sound('sound.wav')
sound.Play(wx.SOUND_SYNC)
or
sound.Play(wx.SOUND_ASYNC)
Here is an example from the wxPython demo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With