5#include <rclcpp/rclcpp.hpp>
6#include <fp_perception_msgs/msg/perception_audio.hpp>
7#include <fp_perception_msgs/msg/perception_text.hpp>
22 bool override =
false;
47 fp_perception_msgs::msg::PerceptionAudio msg;
49 msg.header.stamp = rclcpp::Clock().now();
50 msg.header.frame_id =
"audio_frame";
83 fp_perception_msgs::msg::PerceptionText msg;
85 msg.header.stamp = rclcpp::Clock().now();
86 msg.header.frame_id =
"text_frame";
88 msg.voice = data.
voice;
99 data.
voice = msg.voice;
Definition audio_buffer.hpp:16
text_data msg_to_text_data(const fp_perception_msgs::msg::PerceptionText &msg)
Definition structs.hpp:94
fp_perception_msgs::msg::PerceptionText text_data_to_msg(const text_data &data)
Definition structs.hpp:81
fp_perception_msgs::msg::PerceptionAudio audio_data_to_msg(const audio_data &data)
Convert fp_perception::audio_data to fp_perception_msgs::msg::PerceptionAudio message.
Definition structs.hpp:45
audio_data msg_to_audio_data(const fp_perception_msgs::msg::PerceptionAudio &msg)
Convert fp_perception_msgs::msg::PerceptionAudio message to audio_data.
Definition structs.hpp:67
Definition structs.hpp:26
int duration_seconds
Definition structs.hpp:27
bool use_time_window
Definition structs.hpp:28
rclcpp::Time start_time
Definition structs.hpp:29
Struct to hold audio data.
Definition structs.hpp:16
int chunk_count
Number of chunks in the audio data.
Definition structs.hpp:21
std::vector< int16_t > samples
Audio samples.
Definition structs.hpp:17
int sample_rate
Sample rate in Hz.
Definition structs.hpp:18
int channels
Number of audio channels.
Definition structs.hpp:19
bool override
if the system sample_rate, channels, and chunk_size should be overridden by message data
Definition structs.hpp:22
int chunk_size
Size of each audio chunk in samples.
Definition structs.hpp:20
Definition structs.hpp:33
std::string instructions
Model to be used for processing.
Definition structs.hpp:36
std::string voice
Options for processing the text.
Definition structs.hpp:35
std::string text
Text data to be processed.
Definition structs.hpp:34