Functions related to dictation and the recognizer state.
| Function | Description | Parameters | Returns |
|---|
| INVOX.SwitchDictation() | Starts or stops the dictation depending on its current state. | — | void |
INVOX.SwitchDictation();
| Function | Description | Parameters | Returns |
|---|
| INVOX.SetDictationRunning() | Starts the dictation (recognizer active). | — | void |
INVOX.SetDictationRunning();
| Function | Description | Parameters | Returns |
|---|
| INVOX.SetDictationPaused() | Pauses the dictation (recognizer stopped). | — | void |
INVOX.SetDictationPaused();
| Function | Description | Parameters | Returns |
|---|
| INVOX.SetLang(lang) | Sets the recognition language. | String | void |
INVOX.SetLang("es-ES");
| Function | Description | Parameters | Returns |
|---|
| INVOX.GetCurrentLang() | Returns the current recognition language. | — | String |
const lang = INVOX.GetCurrentLang();
| Function | Description | Parameters | Returns |
|---|
| INVOX.GetLangs() | Returns the list of available recognition languages. | — | Array<String> |
const langs = INVOX.GetLangs();
| Function | Description | Parameters | Returns |
|---|
| INVOX.GetMicrophoneName() | Returns the name of the current microphone. | — | String |
const micName = INVOX.GetMicrophoneName();
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnStartedRecognizer(callback) | Sets a handler called when the recognizer starts initializing. | Function | void |
INVOX.OnStartedRecognizer(() => {
console.log("Recognizer is starting...");
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnRunningRecognizer(callback) | Sets a handler called when the recognizer is actively listening. | Function | void |
INVOX.OnRunningRecognizer(() => {
console.log("Microphone is active");
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnPausedRecognizer(callback) | Sets a handler called when the recognizer is paused. | Function | void |
INVOX.OnPausedRecognizer(() => {
console.log("Microphone is paused");
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnReconnectingRecognizer(callback) | Sets a handler called when the recognizer is reconnecting. | Function | void |
INVOX.OnReconnectingRecognizer(() => {
console.log("Recognizer reconnecting...");
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnErrorRecognizer(callback) | Sets a handler called when a recognizer error occurs. | Function | void |
INVOX.OnErrorRecognizer((error) => {
console.error("Recognizer error:", error);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnChangeVisorHypothesis(callback) | Sets a handler called when the hypothesis viewer content changes. | Function | void |
INVOX.OnChangeVisorHypothesis((hypothesis) => {
console.log("Hypothesis updated:", hypothesis);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnChangeVisorHypothesisPartialHypothesis(callback) | Sets a handler called when a partial (interim) hypothesis is received. | Function | void |
INVOX.OnChangeVisorHypothesisPartialHypothesis((hypothesis) => {
console.log("Partial:", hypothesis.text);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnChangeVisorHypothesisAcceptedHypothesis(callback) | Sets a handler called when a final accepted hypothesis is committed. | Function | void |
INVOX.OnChangeVisorHypothesisAcceptedHypothesis((hypothesis) => {
console.log("Accepted:", hypothesis.text);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnChangeVisorHypothesisRejectedHypothesis(callback) | Sets a handler called when a hypothesis is rejected. | Function | void |
INVOX.OnChangeVisorHypothesisRejectedHypothesis((hypothesis) => {
console.warn("Rejected:", hypothesis.text);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnChangeVisorHypothesisCommandHypothesis(callback) | Sets a handler called when a voice command hypothesis is detected. | Function | void |
INVOX.OnChangeVisorHypothesisCommandHypothesis((hypothesis) => {
console.log("Command detected:", hypothesis.text);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnChangeVisorHypothesisMacroHypothesis(callback) | Sets a handler called when a macro hypothesis is detected. | Function | void |
INVOX.OnChangeVisorHypothesisMacroHypothesis((hypothesis) => {
console.log("Macro detected:", hypothesis.text);
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnDeniedAudioSource(callback) | Sets a handler called when the microphone permission is denied. | Function | void |
INVOX.OnDeniedAudioSource(() => {
console.warn("Microphone access denied");
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnGrantedAudioSource(callback) | Sets a handler called when the microphone permission is granted. | Function | void |
INVOX.OnGrantedAudioSource(() => {
console.log("Microphone access granted");
});
| Function | Description | Parameters | Returns |
|---|
| INVOX.OnUpdateVumeterMicActivity(callback) | Sets a handler called when the microphone audio level changes. | Function | void |
INVOX.OnUpdateVumeterMicActivity((level) => {
console.log("Audio level:", level);
});