[SpeechRecognition] How to get the value?

Forge Component
(0)
Published on 2019-02-08 by JitendraYadav
0 votes
Published on 2019-02-08 by JitendraYadav

Hi Jitendra,

I tried it and it works nice. I want to make a PoC with this, and from the text that has been recognized, I need to get it into a input field so i can save it in the database. How would i do that?

Thanks ahead,

Wilko

Solution

wilko odijk wrote:

Hi Jitendra,

I tried it and it works nice. I want to make a PoC with this, and from the text that has been recognized, I need to get it into a input field so i can save it in the database. How would i do that?

Thanks ahead,

Wilko


Hi Wilko,

I change the javascript to set the value to inputBox in Outsystems, so you have the value available.

See the OML uploaded.

Solution

Fabio thanks a lot,

I added a little extra with display set to none to the expression that holds the html-insert, like this:


    <div class='text-box' contenteditable='true' style='display: none;'></div> <!--text box which will contain spoken text -->

Otherwise you would see the recognized text in the expression as well as the input, and now I see it only in the input.

In the included indexnew.js I saw that you can have the js do actions based on the text that has been recognized. I might have a use case in a medical application where the listener would run in a background (alexa) kind of modus when if certain words are spoken, the system would react to it. Would that be feasable with this component, you think?

Regards,

Wilko