A button that provides speech-to-text functionality using a speech recognizer.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadSpeechToTextButton : RadTemplatedButton, INotifyPropertyChanged
Inheritance: objectRadButtonBaseRadTemplatedButtonRadSpeechToTextButton
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadSpeechToTextButton class.
public RadSpeechToTextButton()
Fields
ErrorOccurredCommandProperty
BindableProperty
Identifies the ErrorOccurredCommand bindable property.
public static readonly BindableProperty ErrorOccurredCommandProperty
IsContinuousRecognitionProperty
BindableProperty
Identifies the IsContinuousRecognition bindable property.
public static readonly BindableProperty IsContinuousRecognitionProperty
LanguageTagProperty
BindableProperty
Identifies the LanguageTag bindable property.
public static readonly BindableProperty LanguageTagProperty
SpeechRecognizedCommandProperty
BindableProperty
Identifies the SpeechRecognizedCommand bindable property.
public static readonly BindableProperty SpeechRecognizedCommandProperty
SpeechRecognizerCreatorProperty
BindableProperty
Identifies the SpeechRecognizerCreator bindable property.
public static readonly BindableProperty SpeechRecognizerCreatorProperty
StateProperty
BindableProperty
Identifies the State bindable property.
public static readonly BindableProperty StateProperty
Properties
Gets or sets the command that is executed when an error occurs within the speech recognizer. The parameter of this command is of type SpeechToTextButtonErrorOccurredCommandContext.
public ICommand ErrorOccurredCommand { get; set; }
Gets or sets a value indicating whether the speech recognizer operates in continuous recognition mode.
When set to true, the recognizer will continuously listen and recognize speech until stopped.
When set to false, recognizer will stop automatically after a single utterance or pause.
public bool IsContinuousRecognition { get; set; }
Gets or sets the IETF BCP 47 language tag for the speech recognizer. For example "en-US", "de-DE".
public string LanguageTag { get; set; }
Gets or sets the command that is executed when speech is recognized. The parameter of this command is of type SpeechToTextButtonSpeechRecognizedCommandContext.
public ICommand SpeechRecognizedCommand { get; set; }
Gets or sets the custom factory that creates a IRadSpeechRecognizer instance.
public Func<IRadSpeechRecognizer> SpeechRecognizerCreator { get; set; }
Gets the current state of the speech recognizer.
public SpeechRecognizerState State { get; }
Methods
protected override void ChangeVisualState()
Overrides:
Stops the speech to text button from listening.
If the speech recognizer is currently in the StartingListening or Listening state, this method will stop the recognition process. If the recognizer is not listening, this method has no effect.
Events
Occurs when an error is encountered by the speech recognizer.
public event EventHandler<SpeechRecognizerErrorOccurredEventArgs> ErrorOccurred
Occurs when speech is successfully recognized.
public event EventHandler<SpeechRecognizerSpeechRecognizedEventArgs> SpeechRecognized
Occurs when the state of the speech recognizer changes.
public event EventHandler StateChanged