类 DmaspKernel
- java.lang.Object
-
- com.aispeech.lite.BaseKernel
-
- com.aispeech.lite.dmasp.DmaspKernel
-
- 所有已实现的接口:
ICarFunction,java.lang.Runnable
public class DmaspKernel extends BaseKernel implements ICarFunction
Created by wuwei on 18-6-19.
-
-
嵌套类概要
-
从类继承的嵌套类/接口 com.aispeech.lite.BaseKernel
BaseKernel.EngineState
-
-
字段概要
字段 修饰符和类型 字段 说明 protected int[]wakeupStates唤醒状态 wakeupStates[0] 是否需要动态对齐 wakeupStates[1] chanIndex wakeupStates[2] sslIndex-
从类继承的字段 com.aispeech.lite.BaseKernel
mErrorProcessor, mQueue, mState, profile
-
从接口继承的字段 com.aispeech.lite.function.ICarFunction
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
-
-
构造器概要
构造器 构造器 说明 DmaspKernel(LocalDmaspConfig dmaspConfig, DmaspKernelListener listener)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcancelKernel()intdoa2DriveMode(int doa)依照唤醒角度自动设置主副驾模式voidfeed(byte[] data)intgetDoaByDriveMode()通过驾驶模式获取对应音频线路 定位模式 返回缓存的唤醒线路intgetDriveMode()获取 驾驶模式,intgetValueOf(java.lang.String param)booleanisAutoSetDriveMode()booleanisDriveModeEntire()当前是否为全车模式booleanisDriveModePositioning()当前是否为定位模式booleanisWakeupSsp()获取唤醒资源是否带VAD状态流voidnewKernel()初始化Dmasp内核voidreleaseKernel()voidresetDriveMode()每次对话结束需要重置唤醒缓存,用于定位模式voidrun()voidsaveDriveModeData(byte[] data, int size)全车模式保存四合一单路数据 其他驾驶模式保存对应doa单路数据voidsetDoaManually(int doa)手动设置唤醒角度voidsetDriveMode(int driveMode)voidsetDriveMode(int driveMode, int wakeupChannelMask)voidsetNWakeupEnable(boolean enable)唤醒模块的单独控制开关voidsetRangesWords(java.util.List<java.lang.String> rangesWords)设置定位模式下唤醒后不切换音区的唤醒词voidstartKernel()启动Dmasp内核voidstopKernel()-
从类继承的方法 com.aispeech.lite.BaseKernel
async, clearMessage, close, feed, feedback, feedback2PRIVCloud, forceRequestWakeupResult, get, getInnerThreadName, getNewConf, getProfile, getStartConf, innerRelease, newKernel, semaphoreP, semaphoreV, sendMessage, set, setMaxMessageQueueSize, setProfile, showErrorMessage, startKernel, trackInvalidState, transferState, triggerIntent, update, update, updateNaviVocab, updateTrails, updateVocab, updateVocab, updateVocabs, useBuiltinWakeupWords, waitMessage
-
-
-
-
构造器详细资料
-
DmaspKernel
public DmaspKernel(LocalDmaspConfig dmaspConfig, DmaspKernelListener listener)
-
-
方法详细资料
-
saveDriveModeData
public void saveDriveModeData(byte[] data, int size)全车模式保存四合一单路数据 其他驾驶模式保存对应doa单路数据
-
isDriveModeEntire
public boolean isDriveModeEntire()
当前是否为全车模式- 返回:
-
isDriveModePositioning
public boolean isDriveModePositioning()
当前是否为定位模式- 返回:
-
getDoaByDriveMode
public int getDoaByDriveMode()
通过驾驶模式获取对应音频线路 定位模式 返回缓存的唤醒线路
-
getValueOf
public int getValueOf(java.lang.String param)
- 覆盖:
getValueOf在类中BaseKernel
-
newKernel
public void newKernel()
初始化Dmasp内核
-
startKernel
public void startKernel()
启动Dmasp内核
-
setNWakeupEnable
public void setNWakeupEnable(boolean enable)
唤醒模块的单独控制开关- 参数:
enable- true 可用 false 不可用
-
isWakeupSsp
public boolean isWakeupSsp()
获取唤醒资源是否带VAD状态流- 返回:
- true 带状态流 false 不带状态流
-
feed
public void feed(byte[] data)
- 覆盖:
feed在类中BaseKernel
-
cancelKernel
public void cancelKernel()
- 覆盖:
cancelKernel在类中BaseKernel
-
stopKernel
public void stopKernel()
- 覆盖:
stopKernel在类中BaseKernel
-
releaseKernel
public void releaseKernel()
- 覆盖:
releaseKernel在类中BaseKernel
-
run
public void run()
- 指定者:
run在接口中java.lang.Runnable- 覆盖:
run在类中BaseKernel
-
setDriveMode
public void setDriveMode(int driveMode)
- 指定者:
setDriveMode在接口中ICarFunction- 参数:
driveMode- 0为定位模式, 按照声源定位;1为主驾模式;2为副驾模式;3为全车模式
-
setDriveMode
public void setDriveMode(int driveMode, int wakeupChannelMask)- 指定者:
setDriveMode在接口中ICarFunction
-
setDoaManually
public void setDoaManually(int doa)
从接口复制的说明:ICarFunction手动设置唤醒角度- 指定者:
setDoaManually在接口中ICarFunction- 参数:
doa- 1:主驾唤醒 2:副驾唤醒
-
setRangesWords
public void setRangesWords(java.util.List<java.lang.String> rangesWords)
从接口复制的说明:ICarFunction设置定位模式下唤醒后不切换音区的唤醒词- 指定者:
setRangesWords在接口中ICarFunction- 参数:
rangesWords- 不主动切换音区的词
-
doa2DriveMode
public int doa2DriveMode(int doa)
依照唤醒角度自动设置主副驾模式- 参数:
doa- 唤醒角度- 返回:
- 主副驾模式
-
getDriveMode
public int getDriveMode()
获取 驾驶模式,- 指定者:
getDriveMode在接口中ICarFunction- 返回:
- 0为定位模式, 按照声源定位;1为主驾模式;2为副驾模式;3为全车模式,-1 错误,没有获取到
-
resetDriveMode
public void resetDriveMode()
每次对话结束需要重置唤醒缓存,用于定位模式- 指定者:
resetDriveMode在接口中ICarFunction
-
isAutoSetDriveMode
public boolean isAutoSetDriveMode()
-
-