whisper_ros: whisper.cpp for ROS 2
Loading...
Searching...
No Matches
whisper_ros::WhisperNode Class Reference

#include <whisper_node.hpp>

Inheritance diagram for whisper_ros::WhisperNode:
Collaboration diagram for whisper_ros::WhisperNode:

Public Member Functions

 WhisperNode ()
 
void activate_ros_interfaces ()
 
void deactivate_ros_interfaces ()
 
- Public Member Functions inherited from whisper_ros::WhisperBaseNode
 WhisperBaseNode ()
 
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_configure (const rclcpp_lifecycle::State &)
 
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_activate (const rclcpp_lifecycle::State &)
 
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_deactivate (const rclcpp_lifecycle::State &)
 
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_cleanup (const rclcpp_lifecycle::State &)
 
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_shutdown (const rclcpp_lifecycle::State &)
 

Private Member Functions

void vad_callback (const std_msgs::msg::Float32MultiArray::SharedPtr msg)
 
void set_grammar_service_callback (const std::shared_ptr< whisper_msgs::srv::SetGrammar::Request > request, std::shared_ptr< whisper_msgs::srv::SetGrammar::Response > response)
 
void reset_grammar_service_callback (const std::shared_ptr< std_srvs::srv::Empty::Request > request, std::shared_ptr< std_srvs::srv::Empty::Response > response)
 
void set_init_prompt_service_callback (const std::shared_ptr< whisper_msgs::srv::SetInitPrompt::Request > request, std::shared_ptr< whisper_msgs::srv::SetInitPrompt::Response > response)
 
void reset_init_prompt_service_callback (const std::shared_ptr< std_srvs::srv::Empty::Request > request, std::shared_ptr< std_srvs::srv::Empty::Response > response)
 

Private Attributes

rclcpp::Publisher< whisper_msgs::msg::Transcription >::SharedPtr publisher_
 
rclcpp::Subscription< std_msgs::msg::Float32MultiArray >::SharedPtr subscription_
 
rclcpp::Service< whisper_msgs::srv::SetGrammar >::SharedPtr set_grammar_service_
 
rclcpp::Service< std_srvs::srv::Empty >::SharedPtr reset_grammar_service_
 
rclcpp::Service< whisper_msgs::srv::SetInitPrompt >::SharedPtr set_init_prompt_service_
 
rclcpp::Service< std_srvs::srv::Empty >::SharedPtr reset_init_prompt_service_
 

Additional Inherited Members

- Protected Member Functions inherited from whisper_ros::WhisperBaseNode
whisper_msgs::msg::Transcription transcribe (const std::vector< float > &audio)
 
- Protected Attributes inherited from whisper_ros::WhisperBaseNode
std::string language
 
std::shared_ptr< Whisperwhisper
 

Constructor & Destructor Documentation

◆ WhisperNode()

WhisperNode::WhisperNode ( )

Member Function Documentation

◆ activate_ros_interfaces()

void WhisperNode::activate_ros_interfaces ( )
virtual

Reimplemented from whisper_ros::WhisperBaseNode.

◆ deactivate_ros_interfaces()

void WhisperNode::deactivate_ros_interfaces ( )
virtual

Reimplemented from whisper_ros::WhisperBaseNode.

◆ reset_grammar_service_callback()

void WhisperNode::reset_grammar_service_callback ( const std::shared_ptr< std_srvs::srv::Empty::Request > request,
std::shared_ptr< std_srvs::srv::Empty::Response > response )
private

◆ reset_init_prompt_service_callback()

void WhisperNode::reset_init_prompt_service_callback ( const std::shared_ptr< std_srvs::srv::Empty::Request > request,
std::shared_ptr< std_srvs::srv::Empty::Response > response )
private

◆ set_grammar_service_callback()

void WhisperNode::set_grammar_service_callback ( const std::shared_ptr< whisper_msgs::srv::SetGrammar::Request > request,
std::shared_ptr< whisper_msgs::srv::SetGrammar::Response > response )
private

◆ set_init_prompt_service_callback()

void WhisperNode::set_init_prompt_service_callback ( const std::shared_ptr< whisper_msgs::srv::SetInitPrompt::Request > request,
std::shared_ptr< whisper_msgs::srv::SetInitPrompt::Response > response )
private

◆ vad_callback()

void WhisperNode::vad_callback ( const std_msgs::msg::Float32MultiArray::SharedPtr msg)
private

Member Data Documentation

◆ publisher_

rclcpp::Publisher<whisper_msgs::msg::Transcription>::SharedPtr whisper_ros::WhisperNode::publisher_
private

◆ reset_grammar_service_

rclcpp::Service<std_srvs::srv::Empty>::SharedPtr whisper_ros::WhisperNode::reset_grammar_service_
private

◆ reset_init_prompt_service_

rclcpp::Service<std_srvs::srv::Empty>::SharedPtr whisper_ros::WhisperNode::reset_init_prompt_service_
private

◆ set_grammar_service_

rclcpp::Service<whisper_msgs::srv::SetGrammar>::SharedPtr whisper_ros::WhisperNode::set_grammar_service_
private

◆ set_init_prompt_service_

rclcpp::Service<whisper_msgs::srv::SetInitPrompt>::SharedPtr whisper_ros::WhisperNode::set_init_prompt_service_
private

◆ subscription_

rclcpp::Subscription<std_msgs::msg::Float32MultiArray>::SharedPtr whisper_ros::WhisperNode::subscription_
private

The documentation for this class was generated from the following files: