# Inconsistent Audio Output Issues

**URL:** https://forum.hello-robot.com/t/inconsistent-audio-output-issues/618
**Category:** Ask
**Created:** [March 3, 2023, 8:29pm UTC](https://forum.hello-robot.com/t/inconsistent-audio-output-issues/618 "2023-03-03T20:29:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jehan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/jehan/32/347_2.png) [@jehan](https://forum.hello-robot.com/u/jehan)
#### Post date: [March 3, 2023, 8:29pm UTC](https://forum.hello-robot.com/t/inconsistent-audio-output-issues/618/1 "2023-03-03T20:29:13Z")

</div>

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](https://medium.com/@windows101tricks/how-to-fix-the-no-sound-issue-in-ubuntu-18-04-220ba9bbe61e).

---

<div class="post-metadata">

### Author: ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)
#### Post date: [March 3, 2023, 9:06pm UTC](https://forum.hello-robot.com/t/inconsistent-audio-output-issues/618/2 "2023-03-03T21:06:17Z")

</div>

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

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

> <https://github.com/hello-robot/stretch_body/blob/master/tools/bin/stretch_audio_test.py>

---

<div class="post-metadata">

### Author: ![jehan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/jehan/32/347_2.png) [@jehan](https://forum.hello-robot.com/u/jehan)
#### Post date: [March 5, 2023, 1:18am UTC](https://forum.hello-robot.com/t/inconsistent-audio-output-issues/618/3 "2023-03-05T01:18:34Z")

</div>

Unfortunately no audio is output from that script either.

---

<div class="post-metadata">

### Author: ![chintujaguar](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/chintujaguar/32/260_2.png) [@chintujaguar](https://forum.hello-robot.com/u/chintujaguar)
#### Post date: [March 6, 2023, 7:30pm UTC](https://forum.hello-robot.com/t/inconsistent-audio-output-issues/618/4 "2023-03-06T19:30:21Z")

</div>

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.

Best,  
Chintan
