Invox Dictation SDK Version:

Essential Functions


Essential functions to implement the basic functionality of Invox Dictation SDK.

Init

FunctionDescriptionParametersReturns
INVOX.init(config)Initializes global SDK connection context used by Login and related services.Objectvoid

Initialize SDK configuration before calling Login.

Parameters:

  • config: Object
    • organizationId: String — required.
    • transcriptionServiceUrl: String — optional. Defaults to wss://debug.invoxmedical.com.
    • adminServiceUrl: String — optional. Defaults to https://debug.invoxmedical.com/INVOX/.
    • appId: String — optional.
    • apiKey: String — optional.
import INVOX, { InitializationConfigType } from "@invox-medical-npm/invox-dictation";

const config: InitializationConfigType = {
    organizationId: "example-organization-id",
    transcriptionServiceUrl: "wss://debug.invoxmedical.com",
    adminServiceUrl: "https://debug.invoxmedical.com/INVOX/",
    appId: "example-app-id",
    apiKey: "example-api-key",
};

INVOX.init(config);

Login

FunctionDescriptionParametersReturns
INVOX.Login(credentials)Starts connection with Invox Dictation Service.ObjectPromise<void>

Allows you to login a user into Invox Dictation SDK using a username and password. This function also establishes communication with the Dictation Service.

Before calling Login, initialize the SDK connection context with INVOX.init(...).

Parameters:

  • credentials: Object
    • user: String — the user's login name.
    • password: String — the user's password.

Returns: Promise<void> — The promise indicates successful connection, not successful login.

import INVOX, { InitializationConfigType, LoginCredentialsType } from "@invox-medical-npm/invox-dictation";

const config: InitializationConfigType = {
    organizationId: "example-organization-id",
};

INVOX.init(config);

const credentials = {
    user: "example",
    password: "example",
};

const typedCredentials: LoginCredentialsType = credentials;

try {
  await INVOX.Login(typedCredentials);
} catch (e) {
  console.error(e);
}

Logout

FunctionDescriptionParametersReturns
INVOX.Logout()Ends the current Invox Dictation session.—Promise<void>
try {
  await INVOX.Logout();
} catch (e) {
  console.error(e);
}

SwitchDictation

FunctionDescriptionParametersReturns
INVOX.SwitchDictation()Starts or stops the dictation depending on its internal state.—void
INVOX.SwitchDictation();

SetTextWriter

FunctionDescriptionParametersReturns
INVOX.SetTextWriter(writer)Sets the TextWriter implementation to use for writing operations.Objectvoid

Parameters:

  • writer: Object — an instance of a TextWriter. Use INVOX.TextAreaTextWriter for standard HTML TextAreas, or a custom writer for other editors.
// For standard HTML TextArea
INVOX.SetTextWriter(INVOX.TextAreaTextWriter);

// For a custom writer
INVOX.SetTextWriter(myCustomWriter);

SetWriterTarget

FunctionDescriptionParametersReturns
INVOX.SetWriterTarget(target)Sets the target editor element where dictation results will be written.Elementvoid
const textareaElement = document.getElementById("invox-textarea-1");
INVOX.SetWriterTarget(textareaElement);

GetWriterTarget

FunctionDescriptionParametersReturns
INVOX.GetWriterTarget()Returns the current writer target element.—Element
const currentTarget = INVOX.GetWriterTarget();

ShowHelp

FunctionDescriptionParametersReturns
INVOX.ShowHelp()Opens the Invox Dictation help viewer.—void
INVOX.ShowHelp();