#include <awaken_offline.h>
|
static int | cb_ivw_msg_proc (const char *sessionID, int msg, int param1, int param2, const void *info, void *userData) |
|
科大讯飞离线唤醒模块接
Definition at line 13 of file awaken_offline.h.
void AwakenOffline::awakenInit |
( |
| ) |
|
int AwakenOffline::cb_ivw_msg_proc |
( |
const char * |
sessionID, |
|
|
int |
msg, |
|
|
int |
param1, |
|
|
int |
param2, |
|
|
const void * |
info, |
|
|
void * |
userData |
|
) |
| |
|
staticprivate |
void AwakenOffline::checkIsAwaken |
( |
| ) |
|
void AwakenOffline::dataLoopAwaken |
( |
| ) |
|
struct DataBuff AwakenOffline::getOneChannelData |
( |
| ) |
|
|
private |
void AwakenOffline::getPcmFileData |
( |
| ) |
|
void AwakenOffline::loginAndSetParams |
( |
const std::string |
base_path, |
|
|
const std::string |
pcm_file, |
|
|
const int |
channel |
|
) |
| |
科大讯飞离线唤醒登录以及参数设置.
- Parameters
-
base_path | - [in] 到/xbot_talker目录的结对路径. |
pcm_file | - [in] 用于进行离线唤醒的录音文件. |
channel | - [in] 音频声道数.1表示单声道,2表示双声道. |
Definition at line 34 of file awaken_offline.cpp.
void AwakenOffline::recordThroughMIC |
( |
const float |
record_time, |
|
|
bool |
enable_audio_save |
|
) |
| |
录音并进行语音唤醒.
- Parameters
-
record_time | - [in] 录音时长(s). |
enable_audio_save | - [in] 是否将录音保存到pcm文件. |
Definition at line 187 of file awaken_offline.cpp.
void AwakenOffline::saveRecordDataToFile |
( |
| ) |
|
void AwakenOffline::stopRecordThroughMIC |
( |
| ) |
|
void AwakenOffline::uninitAsr |
( |
| ) |
|
void AwakenOffline::writeAudioData |
( |
const char * |
audio_data, |
|
|
unsigned int |
audio_len |
|
) |
| |
将pcm音频写入科大讯飞QIVWAudioWrite接口.
- Parameters
-
audio_data | - [in] pcm音频数据. |
audio_len | - [in] pcm音频大小. |
Definition at line 86 of file awaken_offline.cpp.
int AwakenOffline::audio_stat_ |
|
private |
const char* AwakenOffline::awaken_params_ |
|
private |
struct recorder* AwakenOffline::awaken_record_ = NULL |
|
private |
char * AwakenOffline::awaken_result_ = NULL |
|
static |
std::string AwakenOffline::base_path_ |
|
private |
int AwakenOffline::channel_ |
|
private |
const int AwakenOffline::FRAME_LEN = 640 |
|
private |
bool AwakenOffline::is_awaken = false |
|
static |
struct DataBuff AwakenOffline::pcm_data_ = { NULL, 0 } |
|
private |
std::string AwakenOffline::pcm_file_ |
|
private |
int AwakenOffline::record_loops_ |
|
private |
const char* AwakenOffline::session_id_ = NULL |
|
private |
The documentation for this class was generated from the following files: