public class DUILiteConfig
extends java.lang.Object
implements java.lang.Cloneable
限定符和类型 | 字段和说明 |
---|---|
static int |
audioSourceType_MIC
MediaRecorder.AudioSource.MIC声音源
|
static int |
audioSourceType_VOICE_RECOGNITION
MediaRecorder.AudioSource.VOICE_RECOGNITION声音源
|
static int |
TYPE_COMMON_CIRCLE4
环形4麦模式SDK,获取四通道音频
|
static int |
TYPE_COMMON_CIRCLE6
环形6麦模式SDK,获取六通道音频
|
static int |
TYPE_COMMON_DUAL
家居双麦模式SDK,获取双通道音频
|
static int |
TYPE_COMMON_ECHO
echo模式SDK,获取双通道音频(包含一路参考音)
|
static int |
TYPE_COMMON_FESPCAR
车载双麦模式SDK,获取双通道音频
|
static int |
TYPE_COMMON_LINE4
线性4麦模式SDK,获取四通道音频
|
static int |
TYPE_COMMON_MIC
普通单麦模式SDK,获取单通道音频
|
static int |
TYPE_TINYCAP_CIRCLE4
线性四麦通过TinyCap方式录音,获取4+2音频
|
static int |
TYPE_TINYCAP_DUAL
家居双麦通过TinyCap方式录音,获取2+2音频
|
static int |
TYPE_TINYCAP_LINE4
线性四麦通过TinyCap方式录音,获取4+2音频
|
static int |
UPLOAD_AUDIO_LEVEL_ALL
上传唤醒和预唤醒音频
|
static int |
UPLOAD_AUDIO_LEVEL_NONE
音频都不上传
|
static byte |
UPLOAD_AUDIO_LEVEL_PREWAKEUP
只上传预唤醒音频
|
static int |
UPLOAD_AUDIO_LEVEL_WAKEUP
只上传唤醒音频
|
构造器和说明 |
---|
DUILiteConfig(java.lang.String apiKey,
java.lang.String productId,
java.lang.String productKey,
java.lang.String productSecret) |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone() |
java.lang.String |
getApiKey() |
int |
getAudioRecorderType() |
int |
getAudioSourceType() |
int |
getAuthTimeout() |
int |
getCacheUploadMaxNumber()
已过时。
|
java.lang.String |
getDeviceProfileDirPath() |
AIEchoConfig |
getEchoConfig() |
java.util.Map<java.lang.String,java.lang.String> |
getExtraParameter() |
int |
getIntervalTime() |
java.lang.String |
getLogFilePath() |
java.lang.String |
getProductId() |
java.lang.String |
getProductKey() |
java.lang.String |
getProductSecret() |
int |
getThreadAffinity() |
int |
getUploadAudioDelayTime()
已过时。
|
int |
getUploadAudioLevel() |
java.lang.String |
getUploadUrl() |
boolean |
isLogEnable() |
boolean |
isMaxVolumeMode()
获取当前大音量模式
|
boolean |
isMonitorUploadEnable() |
boolean |
isProductInfoValid() |
boolean |
isUpdateTrailProfileToOnlineProfile() |
void |
openLog()
打开sdk日志
日志打开,性能会受影响,调试时可打开日志, 默认日志关闭
|
void |
openLog(java.lang.String logFilePath)
打开sdk日志
日志打开,性能会受影响,调试时可打开日志, 默认日志关闭
|
void |
setAudioRecorderType(int type)
设置录音机采集数据的方式
|
void |
setAudioSourceType(int audioSourceType)
设置audioRecorder的声音源
|
void |
setAuthTimeout(int authTimeout)
授权网络连接超时时间
单位:毫秒 默认值:5000ms |
void |
setCacheUploadMaxNumber(int cacheUploadMaxNumber)
已过时。
|
void |
setDeviceProfileDirPath(java.lang.String deviceProfileDirPath)
授权文件保存目录的绝对路径
取值:绝对路径字符串, e.g. |
void |
setEchoConfig(AIEchoConfig echoConfig)
设置 ECHO 模式的配置,其它模式下无影响
|
void |
setExtraParameter(java.lang.String key,
int value)
参数设置
需在init前调用生效
|
void |
setExtraParameter(java.lang.String key,
java.lang.String value)
参数设置
需在init前调用生效
|
void |
setIntervalTime(int recordInterValTime)
设置录音机录音间隔
|
void |
setMaxVolumeMode(boolean isMaxVolumeMode)
设置开启线性四麦大音量检测模式
|
void |
setMonitorUploadEnable(boolean monitorUploadEnable)
设置 SDK信息(异常监控信息/音频)是否上传,默认上传
|
void |
setThreadAffinity(int threadAffinity)
设置算法绑定线程开关,降低CPU占用,默认值:0
取值:具体的核id |
void |
setUpdateTrailProfileToOnlineProfile(boolean updateTrailProfileToOnlineProfile)
当试用授权文件认证检查时,是否尝试更新为在线授权文件。
|
void |
setUploadAudioLevel(int uploadAudioLevel)
已过时。
|
void |
setUploadAudioLevel(int uploadAudioLevel,
int uploadAudioDelayTime)
已过时。
|
void |
setUploadUrl(java.lang.String uploadUrl)
设置大数据上传url地址
取值:字符串 是否必需:否 默认值:http://log.aispeech.com |
java.lang.String |
toString() |
public static final int UPLOAD_AUDIO_LEVEL_NONE
public static final byte UPLOAD_AUDIO_LEVEL_PREWAKEUP
public static final int UPLOAD_AUDIO_LEVEL_WAKEUP
public static final int UPLOAD_AUDIO_LEVEL_ALL
public static int audioSourceType_VOICE_RECOGNITION
public static int audioSourceType_MIC
public static final int TYPE_COMMON_MIC
public static final int TYPE_COMMON_DUAL
public static final int TYPE_COMMON_LINE4
public static final int TYPE_COMMON_CIRCLE6
public static final int TYPE_COMMON_ECHO
public static final int TYPE_COMMON_FESPCAR
public static final int TYPE_COMMON_CIRCLE4
public static final int TYPE_TINYCAP_DUAL
public static final int TYPE_TINYCAP_LINE4
public static final int TYPE_TINYCAP_CIRCLE4
public DUILiteConfig(java.lang.String apiKey, java.lang.String productId, java.lang.String productKey, java.lang.String productSecret)
public java.lang.String getUploadUrl()
public void setUploadUrl(java.lang.String uploadUrl)
取值:字符串
是否必需:否
默认值:http://log.aispeech.com
uploadUrl
- 大数据上传url地址public int getAuthTimeout()
public void setAuthTimeout(int authTimeout)
单位:毫秒 默认值:5000ms
authTimeout
- 网络连接超时时间public boolean isUpdateTrailProfileToOnlineProfile()
public void setUpdateTrailProfileToOnlineProfile(boolean updateTrailProfileToOnlineProfile)
不进行联网更新授权文件才需要设置
updateTrailProfileToOnlineProfile
- 是否尝试更新为在线授权文件public java.lang.String getDeviceProfileDirPath()
public void setDeviceProfileDirPath(java.lang.String deviceProfileDirPath)
取值:绝对路径字符串, e.g./sdard/speech
默认存放目录 /data/data/包名/files/
deviceProfileDirPath
- 授权文件保存目录的绝对路径@Deprecated public int getCacheUploadMaxNumber()
@Deprecated public void setCacheUploadMaxNumber(int cacheUploadMaxNumber)
cacheUploadMaxNumber
- 最大缓存文件数据个数public int getThreadAffinity()
public void setThreadAffinity(int threadAffinity)
threadAffinity
- 具体的核idpublic int getUploadAudioLevel()
@Deprecated public void setUploadAudioLevel(int uploadAudioLevel)
UPLOAD_AUDIO_LEVEL_NONE
UPLOAD_AUDIO_LEVEL_NONE
UPLOAD_AUDIO_LEVEL_WAKEUP
UPLOAD_AUDIO_LEVEL_PREWAKEUP
UPLOAD_AUDIO_LEVEL_ALL
uploadAudioLevel
- 上传音频等级@Deprecated public int getUploadAudioDelayTime()
@Deprecated public void setUploadAudioLevel(int uploadAudioLevel, int uploadAudioDelayTime)
uploadAudioLevel
- 上传音频等级, default is UPLOAD_AUDIO_LEVEL_NONE
UPLOAD_AUDIO_LEVEL_NONE
UPLOAD_AUDIO_LEVEL_WAKEUP
UPLOAD_AUDIO_LEVEL_PREWAKEUP
UPLOAD_AUDIO_LEVEL_ALL
uploadAudioDelayTime
- 上传唤醒音频的延迟时间,单位:毫秒,default is 300000毫秒 uploadAudioLevel
不能为 UPLOAD_AUDIO_LEVEL_NONE
public void setIntervalTime(int recordInterValTime)
recordInterValTime
- 音频间隔public int getIntervalTime()
public void setAudioSourceType(int audioSourceType)
audioSourceType
- 默认为VOICE_RECOGNITION
可选值:audioSourceType_VOICE_RECOGNITION
和
audioSourceType_MIC
public int getAudioSourceType()
public void setAudioRecorderType(int type)
type
- 默认为common_dualpublic int getAudioRecorderType()
public void setMaxVolumeMode(boolean isMaxVolumeMode)
isMaxVolumeMode
- 大音量模式开关,默认关闭为falsepublic boolean isMaxVolumeMode()
public void setExtraParameter(java.lang.String key, java.lang.String value)
key
- keyvalue
- valuepublic void setExtraParameter(java.lang.String key, int value)
key
- keyvalue
- valuepublic java.util.Map<java.lang.String,java.lang.String> getExtraParameter()
public boolean isProductInfoValid()
public java.lang.String getApiKey()
public java.lang.String getProductId()
public java.lang.String getProductKey()
public java.lang.String getProductSecret()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
在类中 java.lang.Object
java.lang.CloneNotSupportedException
public boolean isMonitorUploadEnable()
public void setMonitorUploadEnable(boolean monitorUploadEnable)
monitorUploadEnable
- true 上传,false 不上传public boolean isLogEnable()
public java.lang.String getLogFilePath()
public void openLog()
public void openLog(java.lang.String logFilePath)
logFilePath
- 保存的日志文件路径,包含文件名,比如"/sdcard/duilite/DUILite_SDK.log"public AIEchoConfig getEchoConfig()
public void setEchoConfig(AIEchoConfig echoConfig)
echoConfig
- ECHO 模式的配置public java.lang.String toString()
toString
在类中 java.lang.Object