Respeaker package broken on new Stretch 3

Below is the error encountered when running ‘ros2 launch respeaker_ros2 respeaker.launch.py‘ on a brand new Stretch 3 that has all of the Ubuntu software updates installed.

$ ros2 launch respeaker_ros2 respeaker.launch.py
\[INFO\] \[launch\]: All log files can be found below …
\[INFO\] \[launch\]: Default logging verbosity is set to INFO
\[INFO\] \[launch.user\]: Sound play node will be launched.
\[INFO\] \[respeaker_node-1\]: process started with pid \[3953\]
\[INFO\] \[soundplay_node.py-2\]: process started with pid \[3955\]
\[INFO\] \[speech_to_text-3\]: process started with pid \[3957\]
\[soundplay_node.py-2\] /home/hello-robot/ament_ws/install/sound_play/lib/sound_play/soundplay_node.py:215: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
\[soundplay_node.py-2\]   GObject.threads_init()
\[soundplay_node.py-2\] /home/hello-robot/ament_ws/install/sound_play/lib/sound_play/soundplay_node.py:216: PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
\[soundplay_node.py-2\]   self.g_loop = threading.Thread(target=GObject.MainLoop().run)
\[respeaker_node-1\] \[INFO\] \[1768086302.367954908\] \[respeaker_node\]: Initializing Respeaker device (takes 10 seconds)
\[soundplay_node.py-2\] \[INFO\] \[1768086302.925731446\] \[sound_play\]: sound_play node is ready to play sound
\[respeaker_node-1\] \[INFO\] \[1768086312.770102533\] \[respeaker_node\]: Respeaker device initialized (Version: 16)
\[respeaker_node-1\] \[INFO\] \[1768086313.059007758\] \[respeaker_node\]: Found 5: ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0) (channels: 0)
\[respeaker_node-1\] \[WARN\] \[1768086313.059489217\] \[respeaker_node\]: 0 channel is found for respeaker
\[respeaker_node-1\] \[WARN\] \[1768086313.059912736\] \[respeaker_node\]: You may have to update firmware.
\[respeaker_node-1\] Traceback (most recent call last):
\[respeaker_node-1\]   File “/home/hello-robot/ament_ws/install/respeaker_ros2/lib/respeaker_ros2/respeaker_node”, line 33, in 
\[respeaker_node-1\]     sys.exit(load_entry_point(‘respeaker-ros2==0.1.0’, ‘console_scripts’, ‘respeaker_node’)())
\[respeaker_node-1\]   File “/home/hello-robot/ament_ws/install/respeaker_ros2/lib/python3.10/site-packages/respeaker_ros2/respeaker_node.py”, line 469, in main
\[respeaker_node-1\]     respeaker_node = RespeakerNode()
\[respeaker_node-1\]   File “/home/hello-robot/ament_ws/install/respeaker_ros2/lib/python3.10/site-packages/respeaker_ros2/respeaker_node.py”, line 339, in **init**
\[respeaker_node-1\]     self.respeaker_audio = RespeakerAudio(self, suppress_error=suppress_pyaudio_error)
\[respeaker_node-1\]   File “/home/hello-robot/ament_ws/install/respeaker_ros2/lib/python3.10/site-packages/respeaker_ros2/respeaker_node.py”, line 273, in **init**
\[respeaker_node-1\]     raise RuntimeError(‘Invalid channels %s. (Available channels are %s)’ % (
\[respeaker_node-1\] RuntimeError: Invalid channels range(0, 0). (Available channels are 0)
\[respeaker_node-1\] Exception ignored in: <function RespeakerAudio.**del** at 0x735089dc88b0>
\[respeaker_node-1\] Traceback (most recent call last):
\[respeaker_node-1\]   File “/home/hello-robot/ament_ws/install/respeaker_ros2/lib/python3.10/site-packages/respeaker_ros2/respeaker_node.py”, line 288, in **del**
\[respeaker_node-1\]     self.stop()
\[respeaker_node-1\]   File “/home/hello-robot/ament_ws/install/respeaker_ros2/lib/python3.10/site-packages/respeaker_ros2/respeaker_node.py”, line 318, in stop
\[respeaker_node-1\]     if self.stream.is_active():
\[respeaker_node-1\] AttributeError: ‘RespeakerAudio’ object has no attribute ‘stream’
\[ERROR\] \[respeaker_node-1\]: process has died \[pid 3953, exit code 1, cmd ‘/home/hello-robot/ament_ws/install/respeaker_ros2/lib/respeaker_ros2/respeaker_node --ros-args’\].

‘sudo apt list | grep respeaker’ returns nothing

Aside: the perception ROS 2 tutorial page goes to 404.

1 Like

Hi @Zackory, Happy New Year! I hope that you are doing well!

Thank you for your post and logs.

It looks like it is not able to pull the available audio channels:

Found 5: ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0) (channels: 0)
0 channel is found for respeaker
You may have to update firmware.

Do you have another process using the device? You can check by running lsof /dev/hello-respeaker

Could you please post the output from the following commands?

cat /proc/asound/cards

python3 <<EOF
import pyaudio
p = pyaudio.PyAudio()
for i in range(p.get_device_count()):
    info = p.get_device_info_by_index(i)
    if "ReSpeaker" in info.get('name'):
        print(f"Index: {i}")
        print(f"Name: {info.get('name')}")
        print(f"Max Input Channels: {info.get('maxInputChannels')}")
        print(f"Max Output Channels: {info.get('maxOutputChannels')}")
        print(f"Sample Rate: {info.get('defaultSampleRate')}")
p.terminate()
EOF

I have found that input channels are zero if you run ros2 launch respeaker_ros2 respeaker.launch.py and attempt to query the device channels from another process using the python3 command above.

fyi, those commands should output something like

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x603d1a8000 irq 219
 1 [ArrayUAC10     ]: USB-Audio - ReSpeaker 4 Mic Array (UAC1.0)
                      SEEED ReSpeaker 4 Mic Array (UAC1.0) at usb-0000:00:14.0-1.1.3, full speed


Index: 5
Name: ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)
Max Input Channels: 6
Max Output Channels: 2
Sample Rate: 16000.0

It is able to find the device, but just to be thorough, do you mind posting the output from these commands as well? It might help us understand why it’s not working for you.

  1. Restart Stretch
  2. Run the following
sudo dmesg 
ll /dev/hello-respeaker
ll /etc/udev/rules.d/
cat /etc/udev/rules.d/90-hello-respeaker.rules

The sudo apt list --installed | grep respeaker command not returning anything is expected. The respeaker package is built from ~/ament_ws/src/respeaker_ros2.

You could also try to reinstall the ament_ws by following the ros2 upgrade workspace tutorial: Updating your ROS Workspace - Stretch Docs . Note that this will remove the existing ~/ament_ws directory, so please back up your packages before running this!

fyi, a working output looks like this:

$ ~/ament_ws/src$ ros2 launch respeaker_ros2 respeaker.launch.py
[INFO] [launch]: All log files can be found below /home/hello-robot/.ros/log/2026-01-12-14-56-57-147888-stretch-se3-3011-34081
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: Sound play node will be launched.
[INFO] [respeaker_node-1]: process started with pid [34082]
[INFO] [soundplay_node.py-2]: process started with pid [34084]
[INFO] [speech_to_text-3]: process started with pid [34086]
[soundplay_node.py-2] /home/hello-robot/ament_ws/install/sound_play/lib/sound_play/soundplay_node.py:215: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
[soundplay_node.py-2]   GObject.threads_init()
[soundplay_node.py-2] /home/hello-robot/ament_ws/install/sound_play/lib/sound_play/soundplay_node.py:216: PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
[soundplay_node.py-2]   self.g_loop = threading.Thread(target=GObject.MainLoop().run)
[respeaker_node-1] [INFO] [1768247817.654125909] [respeaker_node]: Initializing Respeaker device (takes 10 seconds)
[soundplay_node.py-2] [INFO] [1768247818.261432611] [sound_play]: sound_play node is ready to play sound
[respeaker_node-1] [INFO] [1768247828.062109231] [respeaker_node]: Respeaker device initialized (Version: 16)
[respeaker_node-1] [INFO] [1768247828.333481317] [respeaker_node]: Found 5: ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0) (channels: 6)
[respeaker_node-1] [INFO] [1768247828.334069181] [respeaker_node]: Using channels range(0, 6)

Thank you for catching the broken link; the perception tutorial has been moved to the RViz Basics tutorial. You can access it here: RViz Tutorial - Stretch Docs
We’ll push a PR to fix the broken link soon!

Best wishes,
Shehab

Returns nothing.

Here is the output of the commands:

ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
Index: 5
Name: ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)
Max Input Channels: 6
Max Output Channels: 2
Sample Rate: 16000.0
1 Like

Could you please also run the following commands?

  1. Restart the robot
  2. sudo dmesg
  3. ll /dev/hello-respeaker
  4. ll /etc/udev/rules.d/
  5. cat /etc/udev/rules.d/90-hello-respeaker.rules

Also, are you able to play any audio out of the speakers?

Does ros2 launch respeaker_ros2 respeaker.launch.py work after a reboot?

Thank you!

I ran those commands and restarted and still get the same error as in the first post when launching respeaker.

Yes, the speakers work just fine.

Hi @Zackory,

Good to know that the speaker works.

I apologize, I meant to ask you to share the outputs from those commands.

Could I trouble you to run them one more time and share their outputs?

  1. Restart the robot
  2. sudo dmesg
  3. ll /dev/hello-respeaker
  4. ll /etc/udev/rules.d/
  5. cat /etc/udev/rules.d/90-hello-respeaker.rules

Thank you very much!

temp.txt (102.5 KB)

1 Like

Hi @Zackory, could you please run these two commands and paste the output here?

1) Check what ALSA sees for the ReSpeaker:

arecord -D hw:1,0 --dump-hw-params -d 1 /dev/null

2) Try a real 6-mic recording:

arecord -D hw:1,0 -c 6 -r 16000 -f S16_LE -d 3 /tmp/respeaker_test.wav
ls -lh /tmp/respeaker_test.wav

If the WAV file is around ~500–600 KB, that confirms the mic array itself is working.

1 Like

ALSA:

arecord: main:831: audio open error: Device or resource busy

Cannot record a .wav for the same error above.

This same issue happens on two different Stretch 3 robots, both are new. So, I doubt the mic array is broken on both robots. Definitely a software issue.

It seems that another process already has the ReSpeaker audio device open, which prevents arecord from accessing it. For the arecord test, please run it when no other audio processes are using the device (e.g., respeaker_node)

1) Check which process is holding the mic:

Could you please run this before launching any ROS audio nodes and share the ouput?

fuser -v /dev/snd/*

Seeing PulseAudio on /dev/snd/controlC* is normal and does not block recording. What matters is whether anything has /dev/snd/pcm* open.

2) Then run the following and share the output:

arecord -D hw:1,0 --dump-hw-params -d 1 /dev/null
arecord -D hw:1,0 -c 6 -r 16000 -f S16_LE -d 3 /tmp/respeaker_test.wav
ls -lh /tmp/respeaker_test.wav

Hi @Zackory,
Just following up here. When you get a chance, could you share the outputs from the commands we asked for? Once we have those, we can keep digging into this together. Thanks!

Hi Jason,

Here is the output:

/dev/snd/controlC0:  hello-robot   1916 F.... pulseaudio
/dev/snd/controlC1:  hello-robot   1916 F.... pulseaudio
/dev/snd/pcmC0D0p:   hello-robot   1916 F...m pulseaudio
$ arecord -D hw:1,0 --dump-hw-params -d 1 /dev/null
Warning: Some sources (like microphones) may produce inaudiable results
         with 8-bit sampling. Use '-f' argument to increase resolution
         e.g. '-f S16_LE'.
Recording WAVE '/dev/null' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:1,0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 96
CHANNELS: 6
RATE: 16000
PERIOD_TIME: [1000 1000000]
PERIOD_SIZE: [16 16000]
PERIOD_BYTES: [192 192000]
PERIODS: [2 1024]
BUFFER_TIME: [2000 2000000]
BUFFER_SIZE: [32 32000]
BUFFER_BYTES: [384 384000]
TICK_TIME: ALL
--------------------
arecord: set_params:1352: Sample format non available
Available formats:
- S16_LE

$ arecord -D hw:1,0 -c 6 -r 16000 -f S16_LE -d 3 /tmp/respeaker_test.wav
Recording WAVE '/tmp/respeaker_test.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Channels 6

$ ls -lh /tmp/respeaker_test.wav
-rw-r--r-- 1 hello-robot hello-robot 563K Jan 16 12:02 /tmp/respeaker_test.wav

Hi @Zackory,

It seems that your desktop audio service (PulseAudio) is taking control of the microphone, which prevents the ROS node from accessing it.

Please try this quick workaround:

  1. Stop PulseAudio:
systemctl --user stop pulseaudio.socket pulseaudio.service 2>/dev/null || true
  1. Launch the node:
ros2 launch respeaker_ros2 respeaker.launch.py
  1. When finished, restart audio:
systemctl --user start pulseaudio.socket pulseaudio.service 2>/dev/null || true

(You may lose desktop audio temporarily while PulseAudio is stopped, this is expected.)


If the issue still occurs:
Could you please share the output of this command before launching the node and after it fails?

fuser -v /dev/snd/*

That will help us confirm whether another application is grabbing the microphone at launch time.

1 Like

After stopping PulseAudio, respeaker.launch.py works just fine! Can this be pushed into a software update somehow, so that users don’t need to stop pulseaudio manually?

1 Like

Hi @Zackory,

Great! Thanks for confirming.

We’ll take this as feedback and work toward a software update so users won’t need to stop PulseAudio manually in the future.

Thanks again!

Hi @Zackory,

I wanted to let you know that we’ve updated our software with the Respeaker fix.

To apply these changes, you’ll just need to update your ROS 2 workspace by following the instructions here.

Once you’ve completed the update, please let us know if everything is working as expected or if you run into any issues.

Best,
Jason

2 Likes