public class TAipSpeech extends BaseClient
app_id, app_key| 构造器和说明 |
|---|
TAipSpeech(String app_id,
String app_key) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
asrEcho(byte[] audio,
int format)
语音识别-echo版
对音频进行语音识别,并返回语音的文字内容
|
String |
asrEcho(byte[] audio,
int format,
int rate)
语音识别-echo版
对音频进行语音识别,并返回语音的文字内容
|
String |
asrEcho(String filePath,
int format)
语音识别-echo版
对音频进行语音识别,并返回语音的文字内容
|
String |
asrEcho(String filePath,
int format,
int rate)
语音识别-echo版
对音频进行语音识别,并返回语音的文字内容
|
String |
asrLab(int format,
int rate,
int seq,
int len,
int end,
byte[] audio)
语音识别-流式版(AI Lab)
对音频进行语音识别,并返回语音的文字内容
|
String |
asrLab(int format,
int rate,
int seq,
int len,
int end,
String speech_chunk)
语音识别-流式版(AI Lab)
对音频进行语音识别,并返回语音的文字内容
|
String |
asrLab(String filePath,
int format,
int rate,
int seq,
int len,
int end,
String speech_id)
语音识别-流式版(AI Lab)
对音频进行语音识别,并返回语音的文字内容
|
String |
asrWx(byte[] audio,
int format,
int rate,
int bits,
int seq,
int len,
int end,
int cont_res)
语音识别-流式版(WeChat AI)
对音频进行语音识别,并返回语音的文字内容
|
String |
asrWx(String filePath,
int format,
int rate,
int bits,
int seq,
int len,
int end,
int cont_res)
语音识别-流式版(WeChat AI)
对音频进行语音识别,并返回语音的文字内容
|
public String asrEcho(byte[] audio, int format, int rate) throws Exception
audio - - 二进制音频数据format - - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4rate - - 语音采样率编码 8000 16000Exceptionpublic String asrEcho(String filePath, int format, int rate) throws Exception
filePath - - 音频文件本地路径format - - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4rate - - 语音采样率编码 8000 16000Exceptionpublic String asrEcho(byte[] audio, int format) throws Exception
audio - - 二进制音频数据format - - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4Exceptionpublic String asrEcho(String filePath, int format) throws Exception
filePath - - 音频文件本地路径format - - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4Exceptionpublic String asrLab(int format, int rate, int seq, int len, int end, String speech_chunk) throws Exception
format - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4rate - 音频采样率编码 8000 16000seq - 语音分片所在语音流的偏移量(字节)len - 语音分片长度(字节)end - 是否结束分片标识 0中间分片 1结束分片speech_chunk - 待识别语音分片 base64编码数据Exceptionpublic String asrLab(int format, int rate, int seq, int len, int end, byte[] audio) throws Exception
format - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4rate - 音频采样率编码 8000 16000seq - 语音分片所在语音流的偏移量(字节)len - 语音分片长度(字节)end - 是否结束分片标识 0中间分片 1结束分片audio - 音频二进制数据Exceptionpublic String asrLab(String filePath, int format, int rate, int seq, int len, int end, String speech_id) throws Exception
filePath - 音频文件本地路径format - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4rate - 音频采样率编码 8000 16000seq - 语音分片所在语音流的偏移量(字节)len - 语音分片长度(字节)end - 是否结束分片标识 0中间分片 1结束分片Exceptionpublic String asrWx(byte[] audio, int format, int rate, int bits, int seq, int len, int end, int cont_res) throws Exception
audio - - 二进制音频数据format - - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4 SPEEX-5 MP3-8rate - - 语音采样率编码 8000 16000bits - 音频采样位数 16seq - 语音分片所在语音流的偏移量(字节)len - 语音分片长度(字节)end - 是否结束分片标识 0中间分片 1结束分片cont_res - 是否获取中间识别结果 0不获取 1获取Exceptionpublic String asrWx(String filePath, int format, int rate, int bits, int seq, int len, int end, int cont_res) throws Exception
filePath - - 音频文件本地路径format - - 语音压缩格式编码 PCM-1 WAV-2 AMR-3 SILK-4rate - - 语音采样率编码 8000 16000bits - 音频采样位数 16seq - 语音分片所在语音流的偏移量(字节)len - 语音分片长度(字节)end - 是否结束分片标识 0中间分片 1结束分片cont_res - 是否获取中间识别结果 0不获取 1获取ExceptionCopyright © 2018. All rights reserved.