Invox Dictation SDK Version:

Dictation Functions


Functions related to dictation and the recognizer state.

SwitchDictation

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

SetDictationRunning

FunctionDescriptionParametersReturns
INVOX.SetDictationRunning()Starts the dictation (recognizer active).—void
INVOX.SetDictationRunning();

SetDictationPaused

FunctionDescriptionParametersReturns
INVOX.SetDictationPaused()Pauses the dictation (recognizer stopped).—void
INVOX.SetDictationPaused();

SetLang

FunctionDescriptionParametersReturns
INVOX.SetLang(lang)Sets the recognition language.Stringvoid
INVOX.SetLang("es-ES");

GetCurrentLang

FunctionDescriptionParametersReturns
INVOX.GetCurrentLang()Returns the current recognition language.—String
const lang = INVOX.GetCurrentLang();

GetLangs

FunctionDescriptionParametersReturns
INVOX.GetLangs()Returns the list of available recognition languages.—Array<String>
const langs = INVOX.GetLangs();

GetMicrophoneName

FunctionDescriptionParametersReturns
INVOX.GetMicrophoneName()Returns the name of the current microphone.—String
const micName = INVOX.GetMicrophoneName();

OnStartedRecognizer

FunctionDescriptionParametersReturns
INVOX.OnStartedRecognizer(callback)Sets a handler called when the recognizer starts initializing.Functionvoid
INVOX.OnStartedRecognizer(() => {
    console.log("Recognizer is starting...");
});

OnRunningRecognizer

FunctionDescriptionParametersReturns
INVOX.OnRunningRecognizer(callback)Sets a handler called when the recognizer is actively listening.Functionvoid
INVOX.OnRunningRecognizer(() => {
    console.log("Microphone is active");
});

OnPausedRecognizer

FunctionDescriptionParametersReturns
INVOX.OnPausedRecognizer(callback)Sets a handler called when the recognizer is paused.Functionvoid
INVOX.OnPausedRecognizer(() => {
    console.log("Microphone is paused");
});

OnReconnectingRecognizer

FunctionDescriptionParametersReturns
INVOX.OnReconnectingRecognizer(callback)Sets a handler called when the recognizer is reconnecting.Functionvoid
INVOX.OnReconnectingRecognizer(() => {
    console.log("Recognizer reconnecting...");
});

OnErrorRecognizer

FunctionDescriptionParametersReturns
INVOX.OnErrorRecognizer(callback)Sets a handler called when a recognizer error occurs.Functionvoid
INVOX.OnErrorRecognizer((error) => {
    console.error("Recognizer error:", error);
});

OnChangeVisorHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesis(callback)Sets a handler called when the hypothesis viewer content changes.Functionvoid
INVOX.OnChangeVisorHypothesis((hypothesis) => {
    console.log("Hypothesis updated:", hypothesis);
});

OnChangeVisorHypothesisPartialHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesisPartialHypothesis(callback)Sets a handler called when a partial (interim) hypothesis is received.Functionvoid
INVOX.OnChangeVisorHypothesisPartialHypothesis((hypothesis) => {
    console.log("Partial:", hypothesis.text);
});

OnChangeVisorHypothesisAcceptedHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesisAcceptedHypothesis(callback)Sets a handler called when a final accepted hypothesis is committed.Functionvoid
INVOX.OnChangeVisorHypothesisAcceptedHypothesis((hypothesis) => {
    console.log("Accepted:", hypothesis.text);
});

OnChangeVisorHypothesisRejectedHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesisRejectedHypothesis(callback)Sets a handler called when a hypothesis is rejected.Functionvoid
INVOX.OnChangeVisorHypothesisRejectedHypothesis((hypothesis) => {
    console.warn("Rejected:", hypothesis.text);
});

OnChangeVisorHypothesisCommandHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesisCommandHypothesis(callback)Sets a handler called when a voice command hypothesis is detected.Functionvoid
INVOX.OnChangeVisorHypothesisCommandHypothesis((hypothesis) => {
    console.log("Command detected:", hypothesis.text);
});

OnChangeVisorHypothesisMacroHypothesis

FunctionDescriptionParametersReturns
INVOX.OnChangeVisorHypothesisMacroHypothesis(callback)Sets a handler called when a macro hypothesis is detected.Functionvoid
INVOX.OnChangeVisorHypothesisMacroHypothesis((hypothesis) => {
    console.log("Macro detected:", hypothesis.text);
});

OnDeniedAudioSource

FunctionDescriptionParametersReturns
INVOX.OnDeniedAudioSource(callback)Sets a handler called when the microphone permission is denied.Functionvoid
INVOX.OnDeniedAudioSource(() => {
    console.warn("Microphone access denied");
});

OnGrantedAudioSource

FunctionDescriptionParametersReturns
INVOX.OnGrantedAudioSource(callback)Sets a handler called when the microphone permission is granted.Functionvoid
INVOX.OnGrantedAudioSource(() => {
    console.log("Microphone access granted");
});

OnUpdateVumeterMicActivity

FunctionDescriptionParametersReturns
INVOX.OnUpdateVumeterMicActivity(callback)Sets a handler called when the microphone audio level changes.Functionvoid
INVOX.OnUpdateVumeterMicActivity((level) => {
    console.log("Audio level:", level);
});