Offline speech recognition based on Vosk
- Ubuntu 20.04
- ROS Noetic
For other systems, the ROS node needs to be run as Python3 node.
Install python requirements:
pip3 install -r requirements.txt
Download models
cd ros_offline_asr
./download_models.sh
These are the following parameters that can be passed to ROS node:
models_dir: /path/to/models # By default its ./models
microphone_id: "default" # Microphone identifier for sounddevice library
sample_rate: "" # Sample rate, by deefault it will use device default sample rate
For microphone selection see: sounddevice.query_devices
Model names should correspond to language codes in dynamic reconfigure parameters: cfg/OfflineAsr.cfg
Following dynamic reconfigure parameters supported:
enable: false
langauge: en-US # see cfg/Offline.asr for all options
roslaunch ros_offline_asr offline_asr.launch
ROS node publishes the following topics
offline_speech (std_msgs/String) - Publishes final result of speech recognition.
offline_interim_speech (std_msgs/String) - Publishes interrim results as they are here