.NET MAUI SpeechToTextButton Configuration
The purpose of this help article is to show you the main configuration options of the control.
Getting Full Text from Speech Recognition
The SpeechToTextButton allows you to retrieve the full text recognized by the speech recognition service.
This is done through the FullText
property, which provides the complete transcription of the spoken input from the beginning of the current listening session.
To get the full text, you can subscribe to the SpeechRecognized
event, which is triggered when the speech recognition is successful.
Continuous Recognition
The SpeechToTextButton supports continuous speech recognition, allowing it to listen for speech input without stopping after each recognition.
You can disable the continuous recognition by setting the IsContinuousRecognition
property to false
. The default value is true
, meaning that the button will listen for speech input continuously, until it is explicitly stopped or the user taps the button again.
<telerik:RadSpeechToTextButton x:Name="speechContinuousButton"
IsContinuousRecognition="False" />
Language
The SpeechToTextButton allows you to set the language for speech recognition. This is important for accurate transcription of spoken words into text.
You can set the language using the LanguageTag
property, which accepts a string representing the language code (e.g., "en-US" for English, "fr-FR" for French).
<Editor x:Name="languageEditor"
AutoSize="TextChanges"
Grid.Row="1" />
<telerik:RadSpeechToTextButton x:Name="speechToTextButton"
LanguageTag="es-ES"
SpeechRecognized="OnLanguageSpeechRecognized"
Grid.Column="1"
Grid.Row="1"
VerticalOptions="Start" />
Language Support
The SpeechToTextButton supports a variety of languages for speech recognition. The available languages depend on the underlying platform and the speech recognition service used.
Check the following articles for more information on supported languages: SpeechToTextButton Language Support in .NET MAUI
For a runnable example with the SpeechToTextButton Configuration scenario, see the SDKBrowser Demo Application and go to the SpeechToTextButton > Features category.