Functions to customize the Invox Dictation SDK components. These allow you to connect the SDK events to your own UI elements.
Function Description Parameters Returns 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));
Copy to clipboard Function Description Parameters Returns 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 + "%" ;
});
Copy to clipboard Function Description Parameters Returns INVOX.OnChangeStatusBar(callback) Sets a handler called when the status bar message changes. Functionvoid
INVOX . OnChangeStatusBar (( msg ) => {
document. getElementById ( "my-status" ).textContent = msg;
});
Copy to clipboard Function Description Parameters Returns INVOX.OnChangeHypothesisViewer(callback) Sets a handler called when a new hypothesis is received during dictation. Functionvoid
INVOX . OnChangeHypothesisViewer (( hypothesis ) => {
document. getElementById ( "my-hypothesis" ).textContent = hypothesis;
});
Copy to clipboard Function Description Parameters Returns INVOX.OnChangeAudioLevelIndicator(callback) Sets a handler called when the audio level changes. Functionvoid
INVOX . OnChangeAudioLevelIndicator (( level ) => {
document. getElementById ( "my-vumeter" ).style.width = level + "%" ;
});
Copy to clipboard Additional customization functions for each component allow you to override the default rendering. See CustomizeProgressBar, CustomizeStatusBar, and CustomizeHypothesisViewer in the API reference for full details.