| 构造器和说明 |
|---|
AsrClient(AsrConfig config,
java.util.concurrent.ThreadPoolExecutor executorService)
构造方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
正常关闭请求线程池
|
TCall |
newCall(java.lang.String streamId,
AsrRequest request,
BaseEventListener<AsrResponse> baseEventListener,
RealTimeEventListener realTimeEventListener,
AsrConstant.DataType type)
创建请求
|
TCall |
newCall(java.lang.String streamId,
AsrRequest request,
RealTimeEventListener realTimeEventListener,
AsrConstant.DataType type)
创建请求
|
static AsrClient |
newInstance(AsrConfig config)
实例化方法
|
static AsrClient |
newInstance(AsrConfig config,
java.util.concurrent.ThreadPoolExecutor executorService)
实例化Client
|
void |
start()
开启错误上报和统计
|
public static AsrClient newInstance(AsrConfig config)
config - 配置AsrConfigpublic static AsrClient newInstance(AsrConfig config, java.util.concurrent.ThreadPoolExecutor executorService)
config - 配置AsrConfigexecutorService - 线程池public TCall newCall(java.lang.String streamId, AsrRequest request, BaseEventListener<AsrResponse> baseEventListener, RealTimeEventListener realTimeEventListener, AsrConstant.DataType type)
streamId - 流的唯一标示request - 请求参数 AsrRequestrealTimeEventListener - 监听器 RealTimeEventListenerbaseEventListener - 回调type - 类型表示具体是通过http还是ws请求,指定请求参数是流或byte[]public TCall newCall(java.lang.String streamId, AsrRequest request, RealTimeEventListener realTimeEventListener, AsrConstant.DataType type)
streamId - 流的唯一标示request - 请求参数 AsrRequestrealTimeEventListener - 监听器 RealTimeEventListenertype - 类型表示具体是通过http还是ws请求,指定请求参数是流或byte[]Copyright © 2023. All rights reserved.