whisper_ros: whisper.cpp for ROS 2
Loading...
Searching...
No Matches
whisper_ros.silero_vad_node.SileroVadNode Class Reference
Inheritance diagram for whisper_ros.silero_vad_node.SileroVadNode:
Collaboration diagram for whisper_ros.silero_vad_node.SileroVadNode:

Public Member Functions

None __init__ (self)
 
None audio_cb (self, AudioStamped msg)
 
SetBool.Response enable_cb (self, SetBool.Request req, SetBool.Response res)
 

Public Attributes

bool recording = False
 
list data = []
 
tuple enabled
 
tuple threshold
 
 vad_iterator = VADIterator(model, threshold=self.threshold)
 
list enabled = int2float(msg_to_array(msg.audio))
 
str enabled = "Silero enabled"
 

Protected Attributes

 _enable_srv = self.create_service(SetBool, "enable_vad", self.enable_cb)
 
 _pub = self.create_publisher(Float32MultiArray, "vad", 10)
 
 _sub
 

Constructor & Destructor Documentation

◆ __init__()

None whisper_ros.silero_vad_node.SileroVadNode.__init__ ( self)

Member Function Documentation

◆ audio_cb()

None whisper_ros.silero_vad_node.SileroVadNode.audio_cb ( self,
AudioStamped msg )

◆ enable_cb()

SetBool.Response whisper_ros.silero_vad_node.SileroVadNode.enable_cb ( self,
SetBool.Request req,
SetBool.Response res )

Member Data Documentation

◆ _enable_srv

whisper_ros.silero_vad_node.SileroVadNode._enable_srv = self.create_service(SetBool, "enable_vad", self.enable_cb)
protected

◆ _pub

whisper_ros.silero_vad_node.SileroVadNode._pub = self.create_publisher(Float32MultiArray, "vad", 10)
protected

◆ _sub

whisper_ros.silero_vad_node.SileroVadNode._sub
protected
Initial value:
= self.create_subscription(
AudioStamped, "audio", self.audio_cb, qos_profile_sensor_data
)

◆ data

list whisper_ros.silero_vad_node.SileroVadNode.data = []

◆ enabled [1/3]

tuple whisper_ros.silero_vad_node.SileroVadNode.enabled
Initial value:
= (
self.get_parameter("enabled").get_parameter_value().bool_value
)

◆ enabled [2/3]

list whisper_ros.silero_vad_node.SileroVadNode.enabled = int2float(msg_to_array(msg.audio))

◆ enabled [3/3]

str whisper_ros.silero_vad_node.SileroVadNode.enabled = "Silero enabled"

◆ recording

bool whisper_ros.silero_vad_node.SileroVadNode.recording = False

◆ threshold

tuple whisper_ros.silero_vad_node.SileroVadNode.threshold
Initial value:
= (
self.get_parameter("threshold").get_parameter_value().double_value
)

◆ vad_iterator

whisper_ros.silero_vad_node.SileroVadNode.vad_iterator = VADIterator(model, threshold=self.threshold)

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