Class MultiModalDialog
author songsong.shao date 2025/4/24
-
Constructor Summary
ConstructorsConstructorDescriptionMultiModalDialog(MultiModalRequestParam param, MultiModalDialogCallback callback) Deprecated.Constructor initializes service options and creates a duplex communication API instance.MultiModalDialog(MultiModalRequestParam param, MultiModalDialogCallback callback, ApiServiceOption serviceOption) Deprecated.Constructor allows custom service options.MultiModalDialog(MultiModalRequestParam param, MultiModalDialogCallback callback, ConnectionOptions connectionOptions) Deprecated.Constructor initializes service options and creates a duplex communication API instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Force closes the dialog immediately without sending any message to the server.Deprecated.Gets current dialogue state.Deprecated.voidDeprecated.Interrupts current operation.voidDeprecated.Local player broadcast tts endvoidDeprecated.Local player start broadcast ttsvoidrequestToRespond(String type, String text, MultiModalRequestParam.UpdateParams updateParams) Deprecated.Requests response.voidsendAudioData(ByteBuffer audioFrame) Deprecated.Sends audio frame.voidDeprecated.send heart beat request ,will respond heart beatvoidstart()Deprecated.Starts the dialog session.voidDeprecated.Starts upload speech.voidstop()Deprecated.Stops the MultiModalDialog gracefully.voidDeprecated.Stops upload speech.voidupdateInfo(MultiModalRequestParam.UpdateParams updateParams) Deprecated.Updates information.
-
Constructor Details
-
MultiModalDialog
Deprecated.Constructor initializes service options and creates a duplex communication API instance.param: param Request parameter param: callback Callback interface
-
MultiModalDialog
public MultiModalDialog(MultiModalRequestParam param, MultiModalDialogCallback callback, ConnectionOptions connectionOptions) Deprecated.Constructor initializes service options and creates a duplex communication API instance.param: param Request parameter param: callback Callback interface param: connectionOptions Connection options
-
MultiModalDialog
public MultiModalDialog(MultiModalRequestParam param, MultiModalDialogCallback callback, ApiServiceOption serviceOption) Deprecated.Constructor allows custom service options.param: param Request parameter param: callback Callback interface param: serviceOption Custom service options
-
-
Method Details
-
start
public void start()Deprecated.Starts the dialog session. -
startSpeech
public void startSpeech()Deprecated.Starts upload speech. -
stopSpeech
public void stopSpeech()Deprecated.Stops upload speech. -
interrupt
public void interrupt()Deprecated.Interrupts current operation. -
localRespondingStarted
public void localRespondingStarted()Deprecated.Local player start broadcast tts -
localRespondingEnded
public void localRespondingEnded()Deprecated.Local player broadcast tts end -
sendHeartBeat
public void sendHeartBeat()Deprecated.send heart beat request ,will respond heart beat -
requestToRespond
public void requestToRespond(String type, String text, MultiModalRequestParam.UpdateParams updateParams) Deprecated.Requests response.param: type Response type param: text Response text param: updateParams Update parameters
-
updateInfo
Deprecated.Updates information.param: updateParams Update parameters
-
stop
public void stop()Deprecated.Stops the MultiModalDialog gracefully. Sends a finish message to the server and waits for the server to acknowledge. If the server does not respond within the timeout (30s), falls back to force close.This method is safe to call after onError — it will not deadlock.
-
close
public void close()Deprecated.Force closes the dialog immediately without sending any message to the server. Safe to call from any callback thread (including onError/onStopped). Does not block.This method: - Nullifies emitter to prevent further data sending - Disposes upstream subscription to stop sendBinaryWithRetry - Forces WebSocket cancel (non-blocking) - Sets isClosed to short-circuit any reconnection loops in progress - Releases stopLatch to unblock any thread waiting in stop()
-
getDialogState
Deprecated.Gets current dialogue state.return: Current dialogue state
-
sendAudioData
Deprecated.Sends audio frame.param: audioFrame Audio frame data
-
getDuplexApi
Deprecated.
-