The Keyword Detection Node is responsible for detecting specific keywords in audio data and publishing events to a ROS topic. This node is designed to work seamlessly with other speech processing nodes in the TIAGo robot's speech recognition pipeline.
- Keyword Detection: Detects predefined keywords in the audio stream.
- ROS Integration: Publishes detection events to a ROS topic for use by other nodes.
- ROS version: Noetic
- Dependencies:
sudo apt-get install ros-noetic-audio-common
cd ~/<your_workspace>/src
git clone https://github.com/socrob/keyword_detection.git
Navigate to the cloned repository and install the required dependencies:
cd keyword_detection
pip install pvporcupine
Navigate to your catkin workspace and build the package:
cd ~/<your_workspace>
catkin build
After building, source the workspace to update the environment:
source ~/<your_workspace>/devel/setup.bash
Signup or Login to Picovoice Console to get your access key. This key should be stored in src/keyword_detection_ros/access_key
.
Then, in the same console you can create and download the .ppn
models to recognize custom keywords. These models should be stored in the models
folder.
To launch the keyword detection node, use the following command:
roslaunch keyword_detection keyword_detection.launch
The launch file keyword_detection.launch
accepts several arguments to customize the behavior of the keyword detection node:
audio_topic
: Specifies the ROS topic for audio data. Default is"/microphone_node/audio"
.output_topic
: Specifies the ROS topic for detection events. Default is"/mbot_speech_recognition/event_in"
.keyword_models
: Path to the keyword models. Default is"models"
.
These arguments allow you to tailor the keyword detection node's behavior to match your specific requirements and environment.