Invox Dictation SDK Version:

Customizing Components


Functions to customize the Invox Dictation SDK components. These allow you to connect the SDK events to your own UI elements.

CustomizeComponents

FunctionDescriptionParametersReturns
INVOX.CustomizeComponents(callback)Allows you to handle Invox Dictation feedback before the session starts.Functionvoid

Use this function to register your component handlers before logging in:

// 1. Prepare your handlers
function customizeFeedback() {
    INVOX.OnChangeProgressBar((msg, type) => updateProgressbar(msg.Percentage));
    INVOX.OnChangeStatusBar((msg) => showProgressStatus(msg));
    /* All your required customizations */
}

// 2. Apply customization (must be called before session starts)
INVOX.CustomizeComponents(customizeFeedback);

// 3. Login starts...

// 4. (Optional) Overwrite handlers after session starts
INVOX.OnChangeStatusBar((msg) => showSessionStatus(msg));

OnChangeProgressBar

FunctionDescriptionParametersReturns
INVOX.OnChangeProgressBar(callback)Sets a handler called when the progress bar state changes.Functionvoid

The callback receives a message object with a Percentage property (0–100):

INVOX.OnChangeProgressBar((msg, type) => {
    document.getElementById("my-progress").style.width = msg.Percentage + "%";
});

OnChangeStatusBar

FunctionDescriptionParametersReturns
INVOX.OnChangeStatusBar(callback)Sets a handler called when the status bar message changes.Functionvoid
INVOX.OnChangeStatusBar((msg) => {
    document.getElementById("my-status").textContent = msg;
});

OnChangeVisorHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesis(callback)Sets a handler called when the hypothesis viewer changes during dictation.Functionvoid
INVOX.OnChangeVisorHypothesis((hypothesis) => {
    document.getElementById("my-hypothesis").textContent = hypothesis;
});

OnUpdateVumeterMicActivity

FunctionDescriptionParametersReturns
INVOX.OnUpdateVumeterMicActivity(callback)Sets a handler called when microphone activity changes.Functionvoid
INVOX.OnUpdateVumeterMicActivity((level) => {
    document.getElementById("my-vumeter").style.width = level + "%";
});

Register all component callbacks inside CustomizeComponents before Login. The SDK invokes that callback after it creates the session, when the callback APIs are available.