Essential functions to implement the basic functionality of Invox Dictation SDK.
Function Description Parameters Returns INVOX.Login(credentials, connectionConfig) Starts connection with Invox Dictation Service. Object, ObjectPromise<void>
Allows you to login a user into Invox Dictation Service using a username and password. This function also establishes communication with the Dictation Service.
Parameters:
credentials: Objectuser: String — the user's login name.password: String — the user's password.connectionConfig: Objecthost: String — sets the host.port: String — sets the port.useDictationService: Boolean — true for Remote Dictation Service, false for Local Dictation Service.Returns: Promise<void> — The promise indicates successful connection, not successful login.
const credentials = {
user: "example" ,
password: "example" ,
}
const connectionConfig = {
host: "example.cloud.net" ,
port: "8443" ,
useDictationService: true
}
INVOX . Login (credentials, connectionConfig)
. then (() => alert ( "Successful connection!" ))
. catch (( e ) => console. error (e));
Copy to clipboard Function Description Parameters Returns INVOX.Logout() Ends the current Invox Dictation session. — Promise<void>
INVOX . Logout ()
. then (() => console. log ( "Logged out successfully" ))
. catch (( e ) => console. error (e));
Copy to clipboard Function Description Parameters Returns INVOX.SwitchDictation() Starts or stops the dictation depending on its internal state. — void
INVOX . SwitchDictation ();
Copy to clipboard Function Description Parameters Returns 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);
Copy to clipboard Function Description Parameters Returns 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);
Copy to clipboard Function Description Parameters Returns INVOX.GetWriterTarget() Returns the current writer target element. — Element
const currentTarget = INVOX . GetWriterTarget ();
Copy to clipboard Function Description Parameters Returns INVOX.ShowHelp() Opens the Invox Dictation help viewer. — void
INVOX . ShowHelp ();
Copy to clipboard