public class LfasrService extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static LfasrService |
build(String appId,
String secretKey,
int maxConnections,
int connTimeout,
int soTimeout)
构建LfasrService实例
|
LfasrResponse |
getResult(String orderId,
String resultType)
获取转写结果
|
LfasrResponse |
uploadFile(Map<String,String> param,
File audioFile)
上传本地音频文件进行转写
|
LfasrResponse |
uploadUrl(Map<String,String> param)
上传音频URL进行转写
|
public static LfasrService build(String appId, String secretKey, int maxConnections, int connTimeout, int soTimeout) throws SignatureException
appId - 应用IDsecretKey - 密钥maxConnections - 最大连接数connTimeout - 连接超时时间(毫秒)soTimeout - Socket超时时间(毫秒)SignatureException - 签名异常public LfasrResponse uploadFile(Map<String,String> param, File audioFile)
param - 请求参数,包含文件名、语种等信息audioFile - 音频文件对象public LfasrResponse uploadUrl(Map<String,String> param)
param - 请求参数public LfasrResponse getResult(String orderId, String resultType)
orderId - 订单ID,上传接口返回resultType - 结果类型,默认为transferCopyright © 2025. All rights reserved.