public abstract class BaseCarSspeKernel extends BaseSspeKernel implements ICarFunction
Modifier and Type | Class and Description |
---|---|
protected class |
BaseCarSspeKernel.CarDoaCallbackImpl |
protected class |
BaseCarSspeKernel.CarWakeupCallbackImpl
唤醒信息回调
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
cachedWakeupData |
protected java.lang.String |
currentWakeupWord |
protected java.lang.String |
dynamicParams |
protected int |
mCachedWakeUpDoa
定位模式下/自由组合模式,通过唤醒角度doa来自动设置主驾或者副驾模式
对话完成后需要重新复位,设置为-1
|
protected int |
mDriveMode |
protected java.util.List<java.lang.String> |
mRangesWords |
protected int |
mWakeupChannelMask
自由组合模式,默认只有主驾
|
engine, isStopped, isWakeuped, mConfig, mHasDoaOut, mHasVpOut, mHasWkpOut, mInAudioFileNeedCreated, mListener, mOutAudioFileNeedCreated, mWakeupProcessor, params, TAG
CAR_DOA_COPILOT, CAR_DOA_LEFT_BACKSEAT, CAR_DOA_MAIN, CAR_DOA_RIGHT_BACKSEAT, COMBINATION_POSITION_COPILOT, COMBINATION_POSITION_ENTIRE, COMBINATION_POSITION_LEFT_BACKSEAT, COMBINATION_POSITION_MAIN, COMBINATION_POSITION_RIGHT_BACKSEAT, DRIVEMODE_COPILOT, DRIVEMODE_ENTIRE, DRIVEMODE_FREE_COMBINTION, DRIVEMODE_MAIN, DRIVEMODE_POSITIONING, SP_KEY_DRIVER_MODEL, SP_NAME_CAR_CACHE
Constructor and Description |
---|
BaseCarSspeKernel(java.lang.String tag,
FespxKernelListener listener) |
Modifier and Type | Method and Description |
---|---|
protected void |
doCallbackResultData(byte[] vadData,
byte[] asrData) |
protected void |
doCallbackResultData(byte[] data,
int size,
int wakeupType) |
int |
getDriveMode()
获取 驾驶模式,只有 fespCar 模块有这个功能
|
protected void |
handleCustomMessage(Message message) |
protected void |
handleMsgRelease() |
protected void |
handleMsgStart(Message message) |
protected void |
handleMsgStop() |
boolean |
isAutoSetDriveMode() |
boolean |
isCallBackResultData(int ResultData)
判断该场景是否开启了音频回调
|
boolean |
needUpdateCacheDoa() |
void |
onDoaResult(int doa,
int doaType) |
void |
onWakeup(AIResult result) |
protected void |
preInitEngine(com.aispeech.kernel.LiteSoFunction engine,
LocalSignalProcessingConfig config) |
protected void |
processDoaResultByDriveModel(java.lang.String retString)
在返回唤醒角度后,依据设置的驾驶模式来处理唤醒
|
void |
resetDriveMode()
在定位模式下,如果原来自动设置成主驾模式或者副驾模式,则还原成定位模式
|
void |
set(java.lang.String setParam) |
void |
setDoaManually(int doa)
手动设置唤醒角度
|
void |
setDriveMode(int driveMode) |
void |
setDriveMode(int driveMode,
int wakeupChannelMask) |
void |
setFespcarDataReceivedEnable(int fespcarDataReceivedEnable)
设置取消fesp回传,关闭fespcar音频接口回调的抛出
|
void |
setRangesWords(java.util.List<java.lang.String> rangesWords)
设置定位模式下唤醒后不切换音区的唤醒词
|
createFileWriter, feedRawAudio, getNewConf, getSspeCallbacks, getValueOf, initEngine, processWakeupCallback, run
protected java.lang.String cachedWakeupData
protected java.lang.String dynamicParams
protected java.lang.String currentWakeupWord
protected java.util.List<java.lang.String> mRangesWords
protected volatile int mDriveMode
protected volatile int mCachedWakeUpDoa
protected volatile int mWakeupChannelMask
public BaseCarSspeKernel(java.lang.String tag, FespxKernelListener listener)
protected void handleCustomMessage(Message message)
handleCustomMessage
in class BaseSspeKernel
public void onDoaResult(int doa, int doaType)
onDoaResult
in class BaseSspeKernel
public void setDriveMode(int driveMode, int wakeupChannelMask)
setDriveMode
in interface ICarFunction
public void setDoaManually(int doa)
ICarFunction
setDoaManually
in interface ICarFunction
doa
- 1:主驾唤醒 2:副驾唤醒protected void preInitEngine(com.aispeech.kernel.LiteSoFunction engine, LocalSignalProcessingConfig config)
preInitEngine
in class BaseSspeKernel
public void setRangesWords(java.util.List<java.lang.String> rangesWords)
ICarFunction
setRangesWords
in interface ICarFunction
rangesWords
- 不主动切换音区的词public void set(java.lang.String setParam)
set
in class BaseSspeKernel
public void setFespcarDataReceivedEnable(int fespcarDataReceivedEnable)
public int getDriveMode()
getDriveMode
in interface ICarFunction
public boolean isAutoSetDriveMode()
public void resetDriveMode()
resetDriveMode
in interface ICarFunction
public void setDriveMode(int driveMode)
setDriveMode
in interface ICarFunction
public void onWakeup(AIResult result)
onWakeup
in class BaseSspeKernel
protected void handleMsgRelease()
handleMsgRelease
in class BaseSspeKernel
protected void handleMsgStop()
handleMsgStop
in class BaseSspeKernel
protected void handleMsgStart(Message message)
handleMsgStart
in class BaseSspeKernel
protected void processDoaResultByDriveModel(java.lang.String retString)
retString
- public boolean needUpdateCacheDoa()
protected void doCallbackResultData(byte[] vadData, byte[] asrData)
protected void doCallbackResultData(byte[] data, int size, int wakeupType)
public boolean isCallBackResultData(int ResultData)