# Respekaer launch file not working

**URL:** <https://forum.hello-robot.com/t/respekaer-launch-file-not-working/832>\
**Category:** Ask\
**Created:** [October 20, 2023, 5:03pm UTC](https://forum.hello-robot.com/t/respekaer-launch-file-not-working/832 "2023-10-20T17:03:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony\_rob](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/tony_rob/32/486_2.png) [@tony\_rob](https://forum.hello-robot.com/u/tony_rob)\
**Post date:** [October 20, 2023, 5:03pm UTC](https://forum.hello-robot.com/t/respekaer-launch-file-not-working/832/1 "2023-10-20T17:03:50Z")

</div>

Hello,  
I am trying to get some speech to text output from the respeaker package that comes within the catking ws that is installed via hello-robot shell file. But I am getting the following error when I talk to the microphone:

```auto
hello-robot@stretch-re2-2014:>catkin_ws$ roslaunch respeaker_ros respeaker.launch 
... logging to /home/hello-robot/.ros/log/613e11f4-6f69-11ee-932d-c915c5b5e8ce/roslaunch-stretch-re2-2014-29129.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://10.65.18.187:34049/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.15
 * /speech_to_text/language: $(arg language)
 * /speech_to_text/self_cancellation: $(arg self_cancel...
 * /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 [29144]
ROS_MASTER_URI=http://localhost:11311/

setting /run_id to 613e11f4-6f69-11ee-932d-c915c5b5e8ce
process[rosout-1]: started with pid [29161]
started core service [/rosout]
process[static_transformer-2]: started with pid [29164]
process[respeaker_node-3]: started with pid [29169]
process[sound_play-4]: started with pid [29170]
process[speech_to_text-5]: started with pid [29176]
/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)
[INFO] [1697820890.651790]: Initializing Respeaker device (takes 10 seconds)
[INFO] [1697820901.090814]: Respeaker device initialized (Version: 16)
[WARN] [1697820901.506349]: Failed to find respeaker device by name. Using default input
[WARN] [1697820901.507423]: 32 channel is found for respeaker
[WARN] [1697820901.508421]: You may have to update firmware.
[INFO] [1697820901.509473]: Using channels range(0, 32)
[INFO] [1697820905.573201]: Speech detected for 3.944 seconds
[ERROR] [1697820905.603939]: bad callback: <bound method SpeechToText.audio_cb of < __main__.SpeechToText object at 0x7f071190e130>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/hello-robot/catkin_ws_tony/src/respeaker_ros/scripts/speech_to_text.py", line 73, in audio_cb
    result, confidence = self.recognizer.recognize_google(
TypeError: recognize_google() got an unexpected keyword argument 'with_confidence'

```

I also tried to run the stretch\_respeaker\_test.py command and it seems to work. However, the launch file command that is mentioned in the resepaker tutorial on the hello robot documentation isn’t in the respeaker folder anymore. That’s why I am running a different one.

---

<div class="post-metadata">

**Author:** ![lamsey](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/lamsey/32/177_2.png) [@lamsey](https://forum.hello-robot.com/u/lamsey)\
**Post date:** [October 20, 2023, 8:38pm UTC](https://forum.hello-robot.com/t/respekaer-launch-file-not-working/832/2 "2023-10-20T20:38:22Z")

</div>

From looking at the `respeaker_ros` [github repo](https://github.com/furushchev/respeaker_ros/blob/master/scripts/speech_to_text.py), it uses the `SpeechRecogntion` [package](https://pypi.org/project/SpeechRecognition/). `recognize_google()` is defined [here](https://github.com/Uberi/speech_recognition/blob/master/speech_recognition/ __init__.py#L673) in that package’s github repo. It looks like `with_confidence` is included as an argument on the github repo, so maybe your `SpeechRecognition` package is out of date? Alternatively, you could patch the `respeaker_ros` script to not include that argument.

---

<div class="post-metadata">

**Author:** ![tony\_rob](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/tony_rob/32/486_2.png) [@tony\_rob](https://forum.hello-robot.com/u/tony_rob)\
**Post date:** [October 25, 2023, 3:45pm UTC](https://forum.hello-robot.com/t/respekaer-launch-file-not-working/832/3 "2023-10-25T15:45:20Z")

</div>

Hey @lamsey ,

Thanks, I patched the issue by removing the with\_confidence argument. However, I recall setting up an other robot to work with this package as well and it could return confidence values. Not sure what’s the problem since the package is up to date. I’ll have to check my other robot and see what’s the difference. Anyways, it is working right now, thanks for the help!
