Inconsistent Audio Output Issues

I’ve been having some mysterious audio output issues in Ubuntu 20.04 on a Stretch RE1.

At some point a while ago, after using the Python playsound module and playsound function several times successfully in a while loop, the audio stops being output. After the Python script has finished running, audio on the robot cannot be output even from other sources e.g. from the Test Audio tool in Settings.

When I have restarted the robot after that, the audio seems to work fine for other things again, but trying to play audio again in a python script doesn’t work at all. After the script runs, again all of the audio on the robot cannot be output from other sources as well. I have also attempted to use the simpleaudio package from python but it also does not successfully play audio.

I don’t know if anyone else has had similar audio issues with the Stretch. I attempted to go through the steps in this tutorial but to no avail either:
How to Fix the No Sound Issue in Ubuntu 20.04 | by Windows 11 and Windows 10 How to Guide! | Medium.

Hi Jehan. One issue we’ve seen in the past is that the ReSpeaker device can hijack the audio system. If you run do you hear anything?

This script configures the sound settings to use the external speakers:

Unfortunately no audio is output from that script either.

Hey @jehan ,

I am trying to recreate this issue on my robot. It would be extremely helpful if you could share a code snippet that caused this issue.