public final class TranslationRecognizerChat extends Object
| 构造器和说明 |
|---|
TranslationRecognizerChat()
Gummy Translation and Recognition Chat SDK.
|
TranslationRecognizerChat(String baseUrl)
Gummy Translation and Recognition chat SDK.
|
TranslationRecognizerChat(String baseUrl,
ConnectionOptions connectionOptions)
Gummy Translation and Recognition chat SDK.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
call(TranslationRecognizerParam param,
ResultCallback<TranslationRecognizerResult> callback)
Start Speech Translation and Recognition chat via sendAudioFrame API.
|
long |
getFirstPackageDelay()
First Package Delay is the time between start sending audio and receive first words package
|
long |
getLastPackageDelay()
Last Package Delay is the time between stop sending audio and receive last words package
|
String |
getLastRequestId() |
boolean |
sendAudioFrame(ByteBuffer audioFrame)
Send one frame audio
|
void |
stop()
Stop Speech Translation and Recognition real-time via call and sendAudioFrame API.
|
public TranslationRecognizerChat()
public TranslationRecognizerChat(String baseUrl)
baseUrl - Base URLpublic TranslationRecognizerChat(String baseUrl, ConnectionOptions connectionOptions)
baseUrl - Base URLconnectionOptions - Connection optionspublic void call(TranslationRecognizerParam param, ResultCallback<TranslationRecognizerResult> callback)
param - Configuration for speech translation and recognition, including audio format,
source language, target languages, etc.callback - ResultCallbackpublic boolean sendAudioFrame(ByteBuffer audioFrame)
audioFrame - One frame of binary audio The correct order of calls is: first call, then
repeatedly sendAudioFrame, and finally stop.public void stop()
public long getFirstPackageDelay()
public long getLastPackageDelay()
public String getLastRequestId()
Copyright © 2025. All rights reserved.