public final class TranslationRecognizerRealtime extends Object
| 构造器和说明 |
|---|
TranslationRecognizerRealtime()
Gummy Translation and Recognition real-time SDK.
|
TranslationRecognizerRealtime(String baseUrl)
Gummy Translation and Recognition real-time SDK.
|
TranslationRecognizerRealtime(String baseUrl,
ConnectionOptions connectionOptions)
Gummy Translation and Recognition real-time SDK.
|
| 限定符和类型 | 方法和说明 |
|---|---|
TranslationRecognizerResultPack |
call(TranslationRecognizerParam param,
File file)
Speech Translation and Recognition real-time from local file.
|
void |
call(TranslationRecognizerParam param,
ResultCallback<TranslationRecognizerResult> callback)
Start Speech Translation and Recognition real-time 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() |
void |
sendAudioFrame(ByteBuffer audioFrame)
Send one frame audio
|
void |
stop()
Stop Speech Translation and Recognition real-time via call and sendAudioFrame API.
|
io.reactivex.Flowable<TranslationRecognizerResult> |
streamCall(TranslationRecognizerParam param,
io.reactivex.Flowable<ByteBuffer> audioFrame)
Speech Translation and Recognition real-time using Flowable features
|
public TranslationRecognizerRealtime()
public TranslationRecognizerRealtime(String baseUrl)
baseUrl - Base URLpublic TranslationRecognizerRealtime(String baseUrl, ConnectionOptions connectionOptions)
baseUrl - Base URLconnectionOptions - Connection optionspublic io.reactivex.Flowable<TranslationRecognizerResult> streamCall(TranslationRecognizerParam param, io.reactivex.Flowable<ByteBuffer> audioFrame) throws ApiException, NoApiKeyException
param - Configuration for speech translation and recognition, including audio format,
source language, target languages, etc.audioFrame - The audio stream to be recognizedApiExceptionNoApiKeyExceptionpublic void call(TranslationRecognizerParam param, ResultCallback<TranslationRecognizerResult> callback)
param - Configuration for speech translation and recognition, including audio format,
source language, target languages, etc.callback - ResultCallbackpublic TranslationRecognizerResultPack call(TranslationRecognizerParam param, File file)
param - Configuration for speech translation and recognition, including audio format,
source language, target languages, etc.file - Local audio filepublic void 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.