public class BaseSspeKernel
extends BaseKernel
Modifier and Type | Field and Description |
---|---|
protected com.aispeech.kernel.Sspe |
engine |
protected boolean |
isStopped |
protected boolean |
isWakeuped |
protected LocalSignalProcessingConfig |
mConfig |
protected boolean |
mHasDoaOut |
protected boolean |
mHasVpOut |
protected boolean |
mHasWkpOut |
protected boolean |
mInAudioFileNeedCreated |
protected FespxKernelListener |
mListener |
protected boolean |
mOutAudioFileNeedCreated |
protected AIWakeupProcessor |
mWakeupProcessor |
protected SignalProcessingParams |
params |
static java.lang.String |
TAG |
Constructor and Description |
---|
BaseSspeKernel(java.lang.String tag,
FespxKernelListener listener) |
Modifier and Type | Method and Description |
---|---|
protected void |
createFileWriter() |
protected void |
doCallbackResultData(byte[] vadData,
byte[] asrData) |
protected void |
doCallbackResultData(byte[] data,
int size,
int wakeupType) |
protected void |
feedRawAudio(byte[] data) |
java.lang.String |
getNewConf() |
protected java.lang.Object[] |
getSspeCallbacks()
先抽离方法,方便后续拓展
|
int |
getValueOf(java.lang.String param) |
protected void |
handleCustomMessage(Message message) |
protected void |
handleMsgRelease() |
protected void |
handleMsgStart(Message message) |
protected void |
handleMsgStop() |
protected int |
initEngine(com.aispeech.kernel.LiteSoFunction engine,
LocalSignalProcessingConfig config) |
void |
onDoaResult(int doa,
int doaType) |
void |
onWakeup(AIResult result) |
protected void |
preInitEngine(com.aispeech.kernel.LiteSoFunction engine,
LocalSignalProcessingConfig config) |
protected void |
processWakeupCallback(java.lang.String retString)
处理唤醒回调信息
|
void |
run() |
void |
set(java.lang.String setParam) |
public static final java.lang.String TAG
protected FespxKernelListener mListener
protected com.aispeech.kernel.Sspe engine
protected AIWakeupProcessor mWakeupProcessor
protected volatile boolean isStopped
protected volatile boolean isWakeuped
protected volatile boolean mHasVpOut
protected volatile boolean mHasDoaOut
protected SignalProcessingParams params
protected volatile boolean mHasWkpOut
protected volatile boolean mInAudioFileNeedCreated
protected volatile boolean mOutAudioFileNeedCreated
protected LocalSignalProcessingConfig mConfig
public BaseSspeKernel(java.lang.String tag, FespxKernelListener listener)
public void onWakeup(AIResult result)
public void onDoaResult(int doa, int doaType)
public int getValueOf(java.lang.String param)
public java.lang.String getNewConf()
public void run()
protected void handleCustomMessage(Message message)
protected void handleMsgStart(Message message)
protected void handleMsgRelease()
protected void handleMsgStop()
protected void preInitEngine(com.aispeech.kernel.LiteSoFunction engine, LocalSignalProcessingConfig config)
protected int initEngine(com.aispeech.kernel.LiteSoFunction engine, LocalSignalProcessingConfig config)
protected java.lang.Object[] getSspeCallbacks()
protected void feedRawAudio(byte[] data)
protected void createFileWriter()
public void set(java.lang.String setParam)
protected void processWakeupCallback(java.lang.String retString)
retString
- protected void doCallbackResultData(byte[] vadData, byte[] asrData)
protected void doCallbackResultData(byte[] data, int size, int wakeupType)