Skip to main content

Sending reports

Sending reports functionality aims to collect data to improve the voice recognition accuracy and speed up the process of generating new voice models. This step is optional, but we recommend adding it to your integration.

Basic operation

To simplify, are available the methods beginReport and finishReport that can be used in your system when the doctor starts and finishes a report, respectively. Is also possible to access directly the object report to advanced usages, as example, the method change which can be used to save the report before finish it.

Basic usage

Reports are initiated through the method beginReport, that expects two optional parameters text and callback:

var recognition = new IaraSpeechRecognition();

recognition.init({
// ...
}).done(function(e) {
recognition.beginReport(``, () => {
// report initiated successfully
});
});

These parameters indicate, respectively, the report content in its beginning (frequently empty or a report mask), and a callback to be executed if the report has been successfully started.

Reports are finished through the method finishReport, which also wait parameters text and callback, being only the last optional:

var recognition = new IaraSpeechRecognition();

recognition.init({
// ...
}).done(function(e) {
recognition.finishReport(`texto do laudo`, () => {
// report completed successfully
});
});

These parameters indicate, respectively, the report content finished, and a callback to be executed if the report has been successfully finished.