/ros-vosk

Vosk node for ROS Robot Operating System

Primary LanguagePythonApache License 2.0Apache-2.0

ros_vosk

A ROS package for speech-to-text services based on Vosk

Tutorials

  1. Install this package and vosk
sudo apt install ros-${ROS_DISTRO}-ros-vosk

don't forget to run catkin_make

  1. Install Dependencies

If using ROS MELODIC run first:

sudo apt install python3-pip 

Then run for MELODIC & NOETIC:

roscd ros_vosk
pip3 install -r requirements.txt

And if you want to use the TTS engine please run:

sudo apt install espeak
pip3 install pyttsx3

Launch

Launch the speech recognition node

roslaunch ros_vosk ros_vosk.launch

or by running:

rosrun ros_vosk vosk_node.py

Parameters

Param Description Values Default
models_path path to a folder where vosk audio models are stored string -
use_tts_engine use tts True/False False

Interface

Node vosk_engine

Published topics

Topic Type Description
vosk/speech_recognition/vosk_result ros_vosk/speech_recognition a custom "speech_recognition" message
vosk/speech_recognition/final_result std_msgs/String a string with the final result
vosk/speech_recognition/partial_result std_msgs/String a string with the partial result

Subscribed topics

Topic Type Description
vosk/tts/status std_msgs/Bool the state of the tts engine. True if it is speaking False if it is not. If the status is true vosk_node won't process the audio stream so it won't listen to itself

Node tts_engine

Published topics

Topic Type Description
vosk/tts/status std_msgs/Bool the state of the engine. True if it is speaking False if it is not.

Subscribed topics

Topic Type Description
vosk/tts/phrase std_msgs/String get a string to say

Author

Angelo Antikatzidis an.antikatzidis@gmail.com Nickolay V. Shmyrev nshmyrev@gmail.com