Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ASRModuleRos Class Reference

#include <xbot_talker_ros.h>

Public Member Functions

 ASRModuleRos ()
 
bool init ()
 
void offlineRecog ()
 
void onlineRecogBaidu ()
 
void onlineRecogXfei ()
 
 ~ASRModuleRos ()
 

Public Attributes

std::string baidu_online_result
 
std::string offline_recog_result
 
std::string xfei_online_result
 

Private Member Functions

void advertiseService ()
 
void advertiseTopics ()
 
void pubOfflineRecogResult (const std::string result, const int accuracy)
 
void pubOnlineRecogResult (const std::string result)
 
bool requestChat (xbot_talker::chat::Request &req, xbot_talker::chat::Response &res)
 
bool requestKeywordConfig (xbot_talker::keyword_config::Request &req, xbot_talker::keyword_config::Response &res)
 
void subscribeAwakenStatus (const xbot_talker::awaken_status)
 
void subscribeTopics ()
 

Private Attributes

ros::NodeHandle asr_nodehandle
 
std::string asr_params_
 
int audio_channel
 
std::string audio_save_path
 
BaiduAsrOnline baidu_sr_online
 
std::string base_path
 
ros::ServiceServer chat_server_
 
FileOperation config_file
 
std::string config_path
 
CSVOperation csv_file
 
bool enable_baidu_online
 
bool enable_offline
 
bool enable_record_save
 
bool enable_xfei_online
 
std::string grammar_path
 
ros::Subscriber is_awaken_sub
 
ros::ServiceServer keyword_config_service
 
int log_count_ = 0
 
std::string log_path
 
std::vector< std::string > offline_result_vector
 
int online_log_count_ = 0
 
ros::Publisher online_result_pub
 
struct DataBuff pcm_buff = { NULL, 0 }
 
std::string pcm_file
 
char * recog_result_json
 
ros::Publisher recog_result_pub
 
float record_time
 
ros::Publisher sound_mute
 
bool use_mic
 
bool use_pcm_file
 
XfeiSpeechRecog xfei_sr_offline
 
XfeiSpeechRecog xfei_sr_online
 
std::string xunfei_online_asr_params_
 

Detailed Description

Definition at line 21 of file xbot_talker_ros.h.

Constructor & Destructor Documentation

ASRModuleRos::ASRModuleRos ( )
inline

Definition at line 24 of file xbot_talker_ros.h.

ASRModuleRos::~ASRModuleRos ( )
inline

Definition at line 27 of file xbot_talker_ros.h.

Member Function Documentation

void ASRModuleRos::advertiseService ( )
private

Definition at line 82 of file xbot_talker_ros.cpp.

void ASRModuleRos::advertiseTopics ( )
private

Definition at line 68 of file xbot_talker_ros.cpp.

bool ASRModuleRos::init ( )

Definition at line 13 of file xbot_talker_ros.cpp.

void ASRModuleRos::offlineRecog ( )

Definition at line 127 of file xbot_talker_ros.cpp.

void ASRModuleRos::onlineRecogBaidu ( )

Definition at line 211 of file xbot_talker_ros.cpp.

void ASRModuleRos::onlineRecogXfei ( )

Definition at line 165 of file xbot_talker_ros.cpp.

void ASRModuleRos::pubOfflineRecogResult ( const std::string  result,
const int  accuracy 
)
private

Definition at line 110 of file xbot_talker_ros.cpp.

void ASRModuleRos::pubOnlineRecogResult ( const std::string  result)
private

Definition at line 119 of file xbot_talker_ros.cpp.

bool ASRModuleRos::requestChat ( xbot_talker::chat::Request &  req,
xbot_talker::chat::Response &  res 
)
private

Definition at line 253 of file xbot_talker_ros.cpp.

bool ASRModuleRos::requestKeywordConfig ( xbot_talker::keyword_config::Request &  req,
xbot_talker::keyword_config::Response &  res 
)
private

Definition at line 91 of file xbot_talker_ros.cpp.

void ASRModuleRos::subscribeAwakenStatus ( const xbot_talker::awaken_status  msg)
private

Definition at line 307 of file xbot_talker_ros.cpp.

void ASRModuleRos::subscribeTopics ( )
private

Definition at line 76 of file xbot_talker_ros.cpp.

Member Data Documentation

ros::NodeHandle ASRModuleRos::asr_nodehandle
private

Definition at line 38 of file xbot_talker_ros.h.

std::string ASRModuleRos::asr_params_
private

Definition at line 81 of file xbot_talker_ros.h.

int ASRModuleRos::audio_channel
private

Definition at line 89 of file xbot_talker_ros.h.

std::string ASRModuleRos::audio_save_path
private

Definition at line 87 of file xbot_talker_ros.h.

std::string ASRModuleRos::baidu_online_result

Definition at line 29 of file xbot_talker_ros.h.

BaiduAsrOnline ASRModuleRos::baidu_sr_online
private

Definition at line 99 of file xbot_talker_ros.h.

std::string ASRModuleRos::base_path
private

Definition at line 83 of file xbot_talker_ros.h.

ros::ServiceServer ASRModuleRos::chat_server_
private

Definition at line 44 of file xbot_talker_ros.h.

FileOperation ASRModuleRos::config_file
private

Definition at line 96 of file xbot_talker_ros.h.

std::string ASRModuleRos::config_path
private

Definition at line 85 of file xbot_talker_ros.h.

CSVOperation ASRModuleRos::csv_file
private

Definition at line 100 of file xbot_talker_ros.h.

bool ASRModuleRos::enable_baidu_online
private

Definition at line 76 of file xbot_talker_ros.h.

bool ASRModuleRos::enable_offline
private

Definition at line 77 of file xbot_talker_ros.h.

bool ASRModuleRos::enable_record_save
private

Definition at line 80 of file xbot_talker_ros.h.

bool ASRModuleRos::enable_xfei_online
private

Definition at line 75 of file xbot_talker_ros.h.

std::string ASRModuleRos::grammar_path
private

Definition at line 84 of file xbot_talker_ros.h.

ros::Subscriber ASRModuleRos::is_awaken_sub
private

Definition at line 65 of file xbot_talker_ros.h.

ros::ServiceServer ASRModuleRos::keyword_config_service
private

Definition at line 48 of file xbot_talker_ros.h.

int ASRModuleRos::log_count_ = 0
private

Definition at line 90 of file xbot_talker_ros.h.

std::string ASRModuleRos::log_path
private

Definition at line 88 of file xbot_talker_ros.h.

std::string ASRModuleRos::offline_recog_result

Definition at line 27 of file xbot_talker_ros.h.

std::vector<std::string> ASRModuleRos::offline_result_vector
private

Definition at line 94 of file xbot_talker_ros.h.

int ASRModuleRos::online_log_count_ = 0
private

Definition at line 91 of file xbot_talker_ros.h.

ros::Publisher ASRModuleRos::online_result_pub
private

Definition at line 55 of file xbot_talker_ros.h.

struct DataBuff ASRModuleRos::pcm_buff = { NULL, 0 }
private

Definition at line 95 of file xbot_talker_ros.h.

std::string ASRModuleRos::pcm_file
private

Definition at line 86 of file xbot_talker_ros.h.

char* ASRModuleRos::recog_result_json
private

Definition at line 93 of file xbot_talker_ros.h.

ros::Publisher ASRModuleRos::recog_result_pub
private

Definition at line 54 of file xbot_talker_ros.h.

float ASRModuleRos::record_time
private

Definition at line 92 of file xbot_talker_ros.h.

ros::Publisher ASRModuleRos::sound_mute
private

Definition at line 56 of file xbot_talker_ros.h.

bool ASRModuleRos::use_mic
private

Definition at line 79 of file xbot_talker_ros.h.

bool ASRModuleRos::use_pcm_file
private

Definition at line 78 of file xbot_talker_ros.h.

std::string ASRModuleRos::xfei_online_result

Definition at line 30 of file xbot_talker_ros.h.

XfeiSpeechRecog ASRModuleRos::xfei_sr_offline
private

Definition at line 97 of file xbot_talker_ros.h.

XfeiSpeechRecog ASRModuleRos::xfei_sr_online
private

Definition at line 98 of file xbot_talker_ros.h.

std::string ASRModuleRos::xunfei_online_asr_params_
private

Definition at line 82 of file xbot_talker_ros.h.


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


xbot_talker
Author(s): wangxiaoyun
autogenerated on Sat Oct 10 2020 03:27:54