public class IatClient extends WebSocketClient
| 限定符和类型 | 类和说明 |
|---|---|
static class |
IatClient.Builder |
callTimeout, connectTimeout, okHttpClient, originHostUrl, pingInterval, readTimeout, request, retryOnConnectionFailure, signature, webSocket, writeTimeout| 构造器和说明 |
|---|
IatClient(IatClient.Builder builder) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getAccent() |
int |
getCallTimeout() |
int |
getConnectTimeout() |
String |
getDomain() |
String |
getDwa() |
String |
getEncoding() |
String |
getFormat() |
Integer |
getFrameSize() |
String |
getHostUrl() |
String |
getLanguage() |
Integer |
getNbest() |
int |
getNunum() |
okhttp3.OkHttpClient |
getOkHttpClient() |
String |
getOriginHostUrl() |
String |
getPd() |
int |
getPingInterval() |
int |
getPtt() |
int |
getReadTimeout() |
okhttp3.Request |
getRequest() |
String |
getRlang() |
AbstractSignature |
getSignature() |
Integer |
getSpeex_size() |
int |
getVad_eos() |
int |
getVinfo() |
Integer |
getWbest() |
int |
getWriteTimeout() |
boolean |
isRetryOnConnectionFailure() |
void |
send(byte[] bytes,
Closeable closeable,
okhttp3.WebSocketListener webSocketListener) |
void |
send(File file,
okhttp3.WebSocketListener webSocketListener)
发送文件给语音听写服务端
|
void |
send(InputStream inputStream,
okhttp3.WebSocketListener webSocketListener)
发送文件流给服务端
|
void |
sendMessage(byte[] bytes,
Integer status)
听写发送数据
|
void |
start(okhttp3.WebSocketListener webSocketListener)
听写服务端启动
|
closeWebsocket, createWebSocketConnect, getWebSocket, newWebSocketgetApiKey, getApiSecret, getAppIdpublic IatClient(IatClient.Builder builder)
public void start(okhttp3.WebSocketListener webSocketListener)
throws MalformedURLException,
SignatureException
public void sendMessage(byte[] bytes,
Integer status)
public void send(File file, okhttp3.WebSocketListener webSocketListener) throws FileNotFoundException, MalformedURLException, SignatureException
file - 发送的文件FileNotFoundExceptionMalformedURLExceptionSignatureExceptionpublic void send(InputStream inputStream, okhttp3.WebSocketListener webSocketListener) throws MalformedURLException, SignatureException
inputStream - 需要发送的流MalformedURLExceptionSignatureExceptionpublic void send(byte[] bytes,
Closeable closeable,
okhttp3.WebSocketListener webSocketListener)
throws MalformedURLException,
SignatureException
bytes - closeable - 需要关闭的流,可为空MalformedURLExceptionSignatureExceptionpublic String getHostUrl()
getHostUrl 在类中 Clientpublic String getOriginHostUrl()
public String getLanguage()
public String getDomain()
public String getAccent()
public String getFormat()
public String getEncoding()
public int getVad_eos()
public String getDwa()
public String getPd()
public int getPtt()
public String getRlang()
public int getVinfo()
public int getNunum()
public Integer getSpeex_size()
public Integer getNbest()
public Integer getWbest()
public Integer getFrameSize()
public AbstractSignature getSignature()
public okhttp3.Request getRequest()
public okhttp3.OkHttpClient getOkHttpClient()
public boolean isRetryOnConnectionFailure()
public int getCallTimeout()
public int getConnectTimeout()
public int getReadTimeout()
public int getWriteTimeout()
public int getPingInterval()
Copyright © 2025. All rights reserved.