# Respeaker Package Broken

**URL:** https://forum.hello-robot.com/t/respeaker-package-broken/731
**Category:** Ask
**Created:** [May 19, 2023, 6:20pm UTC](https://forum.hello-robot.com/t/respeaker-package-broken/731 "2023-05-19T18:20:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nwright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/nwright/32/172_2.png) [@nwright](https://forum.hello-robot.com/u/nwright)
#### Post date: [May 19, 2023, 6:20pm UTC](https://forum.hello-robot.com/t/respeaker-package-broken/731/1 "2023-05-19T18:20:14Z")

</div>

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

> **[ReSpeaker Microphone Array - Stretch Documentation](https://docs.hello-robot.com/0.2/stretch-tutorials/ros1/respeaker_microphone_array/)**
>
> Hello Robot User Documentation

```auto
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 http://192.168.10.3:36007/

SUMMARY
========

PARAMETERS
 * /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

NODES
  /
    respeaker_node (respeaker_ros/respeaker_node.py)
    sound_play (sound_play/soundplay_node.py)
    speech_to_text (respeaker_ros/speech_to_text.py)
    static_transformer (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [8042]
ROS_MASTER_URI=http://localhost:11311

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/soundplay_node.py:330: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
/opt/ros/noetic/lib/sound_play/soundplay_node.py:331: 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/respeaker_node.py:351: DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
  config[name] = self.respeaker.read(name)
Traceback (most recent call last):
  File "/opt/ros/noetic/share/respeaker_ros/scripts/respeaker_node.py", line 428, in <module>
    n = RespeakerNode()
  File "/opt/ros/noetic/share/respeaker_ros/scripts/respeaker_node.py", line 323, in __init__
    self.respeaker_audio = RespeakerAudio(self.on_audio, suppress_error=suppress_pyaudio_error)
  File "/opt/ros/noetic/share/respeaker_ros/scripts/respeaker_node.py", 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/respeaker_node.py", line 263, in __del__
    self.stop()
  File "/opt/ros/noetic/share/respeaker_ros/scripts/respeaker_node.py", line 290, in stop
    if self.stream.is_active():
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/respeaker_node.py __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

```

---

<div class="post-metadata">

### Author: ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)
#### Post date: [May 19, 2023, 8:37pm UTC](https://forum.hello-robot.com/t/respeaker-package-broken/731/2 "2023-05-19T20:37:22Z")

</div>

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](https://docs.hello-robot.com/0.2/stretch-install/docs/ros_workspace/) guide, you will be able to create a new workspace that can launch `roslaunch respeaker_ros respeaker.launch` without error.

---

<div class="post-metadata">

### Author: ![nwright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/nwright/32/172_2.png) [@nwright](https://forum.hello-robot.com/u/nwright)
#### Post date: [May 22, 2023, 4:29pm UTC](https://forum.hello-robot.com/t/respeaker-package-broken/731/3 "2023-05-22T16:29:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)
#### Post date: [May 22, 2023, 4:31pm UTC](https://forum.hello-robot.com/t/respeaker-package-broken/731/4 "2023-05-22T16:31:48Z")

</div>

Great! Glad to hear that fixed it.
