SpeechRecognizer
Definition
Use a SpeechRecognizer
component to listen to the user speaking and convert the spoken sound into text using the device’s speech recognition feature.
Properties
- Language
- Suggests the language to use for recognizing speech. An empty string (the default) will use the system’s default language.Language is specified using a language tag with an optional region suffix, such as en or es-MX. The set of supported languages will vary by device.
- Result
- Returns the last text produced by the recognizer.
- UseLegacy
- If true, a separate dialog is used to recognize speech (the default). If false, speech is recognized in the background and updates are received as it recognizes words.
AfterGettingText
may get several calls withpartial
set totrue
. Once sufficient time has elapsed since the last utterance, orStopListening
is called, the last string will be returned withpartial
set tofalse
to indicate that it is the final recognized string and no more data will be provided until recognition is again started. SeeAfterGettingText
for more details on partial speech recognition.