https://github.com/alphacep/ros-vosk
Vosk node for ROS Robot Operating System
https://github.com/alphacep/ros-vosk
Last synced: 11 months ago
JSON representation
Vosk node for ROS Robot Operating System
- Host: GitHub
- URL: https://github.com/alphacep/ros-vosk
- Owner: alphacep
- License: apache-2.0
- Created: 2020-10-05T20:47:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-02T21:02:37.000Z (about 3 years ago)
- Last Synced: 2025-06-22T18:51:51.389Z (12 months ago)
- Language: Python
- Homepage:
- Size: 38.5 MB
- Stars: 41
- Watchers: 5
- Forks: 19
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ros_vosk
======================
A ROS package for speech-to-text services based on [Vosk](https://github.com/alphacep/vosk-api)
## Tutorials
1. Install this package and vosk
```bash
sudo apt install ros-${ROS_DISTRO}-ros-vosk
```
don't forget to run `catkin_make`
2. Install Dependencies
If using ROS MELODIC run first:
```bash
sudo apt install python3-pip python3-yaml
```
Then run for MELODIC & NOETIC:
```bash
pip3 install sounddevice
pip3 install vosk
```
And if you want to use the TTS engine please run:
```bash
sudo apt install espeak
pip install pyttsx3
```
3. Launch the node
Launch the speech recognition node
```bash
roslaunch ros_vosk ros_vosk.launch
```
or by running:
```bash
rosrun ros_vosk vosk_node.py
```
## Interface
### Publishing Topics
* speech_recognition/vosk_result -> vosk_node.py publishes a custom "speech_recognition" message
* speech_recognition/final_result -> vosk_node.py publishes a simple string with the final result
* speech_recognition/partial_result -> vosk_node.py publishes a simple string with the partial result
* tts/status -> tts_engine.py publishes the state of the 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
* tts/phrase -> tts_engine.py subscribes to this topic in order to speak the given string. Name your desire and it shall be heard by all in the room..
## Author
Angelo Antikatzidis
Nickolay V. Shmyrev