What is partial parameter do in SpeechRecognizer

Hi, I’m new here
what is partial parameter mean blew?
and what’s UseLegacy ?

Partial is a boolean value (true or false)

Partial is ‘false’ when SpeechRecognizer stops automatically after listening, else it is ‘true’ if SpeechRecognizer returns partial (some) results.

1 Like

The Use Legacy business was added with the Stop Listening block,
which was added to allow the Speech Recognizer to be interrupted from its listening.

Interrupting the listening might cause it to return a partial word at the end,
so the partial = true/false lets you know to beware of garbage at the end.

1 Like

btw. you always can check the documentation for questions like this...
http://ai2.appinventor.mit.edu/reference/components/media.html#SpeechRecognizer

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

I would like to clarify that the Legacy mode was the original way the speech recognizer worked, mainly that it would open a new activity and the activity would hand back the recognized string. In the new model (i.e. uncheck UseLegacy), the speech recognition is done “in the background” and you receive updates as it recognizes words. You may get many calls to AfterGettingText with partial set to false. Once sufficient time has elapsed since the last utterance, or you’ve called the StopListening block, the last string will return with partial set to true to indicate that it is the final recognized string and no more data will be provided until you start recognizing again.

To see an example of the new behavior, you can assign the result parameter to the text of a label and see it update as you speak.

1 Like

I don't see this in the reference link. Could this be added to the component reference ?

1 Like

Yes, that is certainly something that should be resolved. I've filed an issue on GitHub to track it.

1 Like