Invox Dictation SDK Version:

Session Management


Two independent connections

After Login, the SDK maintains a Corporate Server (SC) session and starts Direct Dictation. These connections have different recovery behavior.

Authenticate

Login creates the Corporate Server session and starts Direct Dictation.

Recover a temporary ASR interruption

The SDK invokes OnReconnectingRecognizer, retries the ASR WebSocket, and replays buffered audio when recovery succeeds within 120 seconds.

Request a new login after a terminal failure

A Corporate Server session expiration or terminal Direct Dictation failure emits LOGIN_ERROR. Return the user to the normal sign-in flow.

Corporate Server session

The SDK authenticates against Corporate Server before creating the dictation session and periodically checks its validity. When the browser becomes online or visible again, the SDK checks the session immediately.

If the Corporate Server session expires, the SDK closes the active session and emits LOGIN_ERROR. The integration must present its normal sign-in flow and call Login again. Calling Logout intentionally emits LOGGING_OUT and resolves to true when the session has been closed.

Direct Dictation reconnection

The ASR WebSocket reconnects automatically after a transient connection loss. The SDK invokes callbacks registered through OnReconnectingRecognizer while it recovers.

  • The first retry is scheduled after 500 ms.
  • Retry delay increases up to 3 seconds.
  • The automatic recovery window lasts up to 120 seconds.
  • Up to 120 seconds of audio are held in memory so they can be replayed after reconnection.

These settings are owned by the SDK build and are not configured through INVOX.init.

Handle recovery state

Register component callbacks before Login. The callback is invoked once the session has been created.

INVOX.CustomizeComponents(() => {
  INVOX.OnReconnectingRecognizer(() => {
    setDictationStatus("Reconnecting...");
  });

  INVOX.OnErrorRecognizer((error) => {
    showDictationError(error);
  });
});

Do not force a second login while the SDK is retrying. Ask the user to authenticate again only after a terminal Direct Dictation failure or a LOGIN_ERROR event, including Corporate Server session expiration.