Skip to main content

Debug mode and internal settings

Iara's SDK was developed to make the integration of our technologies as easy as possible with your software and company. To facilitate the integration process or resolve possible problems, but, the recognizer can run in debug mode or have its own internal settings adjusted.

IMPORTANT: The described alterations in this page can negatively affect your application. Unless you have the Iara team help, is not a good idea change the internal settings by yourself.

Debug mode use

Debug mode causes the SDK to send multiple messages on the browser develop console. These messages can be used to identify a problem, for example.

The voice recognition can run in debug mode through the initialization parameter debug: true, as the example below:

var recognition = new IaraSpeechRecognition();

recognition.init({
userId: 'meu@email.com',
apiToken: '197765800edb8affcb44a7ae7b4ff0a3',
debug: true // activate debug mode
});

Also, the recognizer's debug mode can be turned on and off at any time through the recognizer debug property. For example:

var recognition = new IaraSpeechRecognition();

recognition.init({
userId: 'meu@email.com',
apiToken: '197765800edb8affcb44a7ae7b4ff0a3',
});

// (...) Several code lines of your application

recognition.debug = true;

// (...) Several code lines of your application

recognition.debug = false;

Execution environment information

The Iara voice recognizer need some conditions to work. You can use the env recognizer property to verify if such conditions are available or not. For example, you can know whether the operating system is Windows or Mac, etc.

The example above show some useful methods of the env property:

var recognition = new IaraSpeechRecognition();

// SDK environment overview where is running
console.log(recognition.env.summary())

// Shows information of each available group
console.log(recognition.env.os.name);
console.log(recognition.env.os.version);
console.log(recognition.env.arch);
console.log(recognition.env.browser.name);
console.log(recognition.env.browser.version);
console.log(recognition.env.incompatible);
console.log(recognition.env.useBrowserRecorder);
Tip: to learn more about the operation of the property env, see the code example env-test.

Internal configurations

Functionalities may can become inoperative or unexpected behaviors may occur. PROCEED WITH CARE AND GUIDANCE!Much of the internal operation of the Iara voice recognizer can be customized, for example, to inspect the addition/removing of input devices, limit the memory consumption, etc.

To change the internal settings of the recognizer, use the recognizer's internal.settings object properties:

var recognition = new IaraSpeechRecognition();

recognition.init({
userId: 'meu@email.com',
apiToken: '197765800edb8affcb44a7ae7b4ff0a3',
});

// Change the configuration `prop` with the value `false`.
recognition.internal.settings.prop = false;

An example of internal configuration is the size of made transcripts historic, that is used to emit events. By default, the recognizer keep in memory the last 200 recognitions. To change this amount to 10, for example, you can do:

recognition.internal.settings.transcriptHistorySize = 10;

To find out which are the available internal settings, assuming that you have an instance of the Iara voice recognizer called recognition in your application (like in the example above), open the browser development console (usually through the F12 key) and type:

console.log(recognition.internal.settings);