7 #ifndef XFEI_SPEECH_RECOG_H_ 8 #define XFEI_SPEECH_RECOG_H_ 39 void setAsrParams(
const std::string
base_path,
const std::string pcm_file,
const std::string params,
52 void getPcmFileData();
59 void getPCMData(
struct DataBuff pcm_buff);
68 struct DataBuff recordThroughMIC(const float record_time, bool enable_audio_save);
76 void writeAudioData(
const char* audio_data,
unsigned int audio_len);
83 char* dataLoopRecog();
95 void stopRecordThroughMIC();
102 std::vector<std::string> resultFromJson();
110 char* getRecogResultLoop();
117 struct DataBuff getOneChannelData();
123 void saveRecordDataToFile();
125 int record_loops_ = 0;
127 const char* session_id_ = NULL;
131 char* rec_result_ = NULL;
133 int recog_confidence_ = 0;
143 #endif // XFEI_SPEECH_RECOG_H_
FileOperation pcm_file_operation
std::vector< std::string > recog_result_vector
char * session_begin_params
std::string final_recog_result_
const std::string base_path
RecordAlsaAPI record_alsa