public class LfasrClient extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
LfasrClient.Builder |
| 构造器和说明 |
|---|
LfasrClient(LfasrClient.Builder builder)
通过Builder构建LfasrClient实例
|
| 限定符和类型 | 方法和说明 |
|---|---|
LfasrResponse |
getResult(String orderId)
获取结果接口
|
LfasrResponse |
getResult(String orderId,
String resultType)
获取结果接口
|
LfasrResponse |
uploadFile(String audioFilePath)
本地音频文件上传接口
|
LfasrResponse |
uploadUrl(String audioUrl)
音频URL上传接口
|
public LfasrClient(LfasrClient.Builder builder)
builder - 构建器public LfasrResponse uploadFile(String audioFilePath) throws LfasrException, SignatureException
audioFilePath - 音频文件路径LfasrException - 转写异常SignatureException - 签名异常public LfasrResponse uploadUrl(String audioUrl) throws LfasrException, SignatureException
audioUrl - 音频链接LfasrException - 转写异常SignatureException - 签名异常public LfasrResponse getResult(String orderId) throws SignatureException
orderId - 转写订单IDSignatureException - 签名异常public LfasrResponse getResult(String orderId, String resultType) throws SignatureException
orderId - 转写订单IDresultType - 查询结果类型
- 转写结果:transfer(默认)
- 翻译结果:translate
- 质检结果:predict
- 组合结果查询:多个类型结果使用”,”隔开,目前只支持转写和质检结果一起返回,不支持转写和翻译结果一起返回(如果任务有失败则只返回处理成功的结果)
- 转写和质检结果组合返回:transfer,predict
- 注:使用质检功能请先在控制台开启SignatureException - 签名异常Copyright © 2025. All rights reserved.