Respeaker Package Broken

I am trying to use the respeaker microphone in the tutorials. I am getting the following error when following the guide.

csrobot@sporky:~$ roslaunch respeaker_ros sample_respeaker.launch 
... logging to /home/csrobot/.ros/log/673d8eb6-f671-11ed-9b44-a9302036bb29/roslaunch-sporky-8027.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server


 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /speech_to_text/language: en-US
 * /speech_to_text/self_cancellation: True
 * /speech_to_text/tts_tolerance: 0.5

    respeaker_node (respeaker_ros/
    sound_play (sound_play/
    speech_to_text (respeaker_ros/
    static_transformer (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [8042]

setting /run_id to 673d8eb6-f671-11ed-9b44-a9302036bb29
process[rosout-1]: started with pid [8059]
started core service [/rosout]
process[static_transformer-2]: started with pid [8062]
process[respeaker_node-3]: started with pid [8066]
process[sound_play-4]: started with pid [8068]
process[speech_to_text-5]: started with pid [8073]
/opt/ros/noetic/lib/sound_play/ PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See:
/opt/ros/noetic/lib/sound_play/ PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
  self.g_loop = threading.Thread(target=GObject.MainLoop().run)
[ERROR] [1684520250.900346]: action 'soundplay' is not initialized.
/opt/ros/noetic/share/respeaker_ros/scripts/ DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
  config[name] =
Traceback (most recent call last):
  File "/opt/ros/noetic/share/respeaker_ros/scripts/", line 428, in <module>
    n = RespeakerNode()
  File "/opt/ros/noetic/share/respeaker_ros/scripts/", line 323, in __init__
    self.respeaker_audio = RespeakerAudio(self.on_audio, suppress_error=suppress_pyaudio_error)
  File "/opt/ros/noetic/share/respeaker_ros/scripts/", line 236, in __init__
    if name.lower().find("respeaker") >= 0:
TypeError: argument should be integer or bytes-like object, not 'str'
Exception ignored in: <function RespeakerAudio.__del__ at 0x7f781d955f70>
Traceback (most recent call last):
  File "/opt/ros/noetic/share/respeaker_ros/scripts/", line 263, in __del__
  File "/opt/ros/noetic/share/respeaker_ros/scripts/", line 290, in stop
AttributeError: 'RespeakerAudio' object has no attribute 'stream'
[respeaker_node-3] process has died [pid 8066, exit code 1, cmd /opt/ros/noetic/share/respeaker_ros/scripts/ __name:=respeaker_node __log:=/home/csrobot/.ros/log/673d8eb6-f671-11ed-9b44-a9302036bb29/respeaker_node-3.log].
log file: /home/csrobot/.ros/log/673d8eb6-f671-11ed-9b44-a9302036bb29/respeaker_node-3*.log

Hi @nwright, would you run the following commands in a terminal to collect some information about the software on your robot.

  1. echo $HELLO_FLEET_ID to get the robot’s serial number (e.g. stretch-re1-1000)
  2. lsb_release -d to get the OS version
  3. sudo apt list | grep respeaker to determine if the Respeaker binary is installed.
  4. cd ~/catkin_ws/src/ && ll to list out the ROS packages built in your workspace.

From #3, it turns out that the “ros-noetic-respeaker-ros” binary has a known bug and shouldn’t be installed. Instead, the respeaker driver is built from source. If you sudo apt remove the binary and follow the Adding a ROS Workspace - Stretch Documentation guide, you will be able to create a new workspace that can launch roslaunch respeaker_ros respeaker.launch without error.

Creating a new workspace worked to fix the issue. I had the package installed through the apt which was the issue.

1 Like

Great! Glad to hear that fixed it.