类 AICloudLASRConfig.AudioParam
- java.lang.Object
-
- com.aispeech.export.config.AICloudLASRConfig.AudioParam
-
- 封闭类:
- AICloudLASRConfig
public static class AICloudLASRConfig.AudioParam extends java.lang.Object
音频参数
-
-
构造器概要
构造器 构造器 说明 AudioParam(java.lang.String audioType)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.String
getAudioType()
int
getChannel()
int
getSampleBytes()
int
getSampleRate()
boolean
isAudioStandard()
音频是否符合以下信息: 音频格式为 wav, ogg_speex, ogg_oups, mp3,并且音频 sampleRate 为 16000 Hz,channel 为 1。boolean
isValid()
void
setAudioType(java.lang.String audioType)
音频类型void
setChannel(int channel)
可选,音频通道数,默认1void
setSampleBytes(int sampleBytes)
可选,取样字节数,默认2void
setSampleRate(int sampleRate)
可选,音频文件的采样率。java.lang.String
toString()
-
-
-
方法详细资料
-
isValid
public boolean isValid()
-
isAudioStandard
public boolean isAudioStandard()
音频是否符合以下信息: 音频格式为 wav, ogg_speex, ogg_oups, mp3,并且音频 sampleRate 为 16000 Hz,channel 为 1。- 返回:
- true 是,false 不是
-
toString
public java.lang.String toString()
- 覆盖:
toString
在类中java.lang.Object
-
getAudioType
public java.lang.String getAudioType()
-
setAudioType
public void setAudioType(java.lang.String audioType)
音频类型- 参数:
audioType
- 音频类型
-
getSampleRate
public int getSampleRate()
-
setSampleRate
public void setSampleRate(int sampleRate)
可选,音频文件的采样率。可选值: 16000(默认值), 8000
客户端没有传递sample_rate参数时,等同于sample_rate=16000。
(警告) 转写服务会在音频检查时,重新检测音频本身的采样率,并以检测后的结果为准。
- 参数:
sampleRate
- 16000
-
getSampleBytes
public int getSampleBytes()
-
setSampleBytes
public void setSampleBytes(int sampleBytes)
可选,取样字节数,默认2- 参数:
sampleBytes
- 取样字节数
-
getChannel
public int getChannel()
-
setChannel
public void setChannel(int channel)
可选,音频通道数,默认1- 参数:
channel
- 音频通道数
-
-