New to Telerik UI for .NET MAUIStart a free 30-day trial

A button that provides speech-to-text functionality using a speech recognizer.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class RadSpeechToTextButton : RadTemplatedButton, INotifyPropertyChanged

Inheritance: objectRadButtonBaseRadTemplatedButtonRadSpeechToTextButton

Implements: INotifyPropertyChanged

Inherited Members RadTemplatedButton.ContentPropertyRadTemplatedButton.ContentTemplatePropertyRadTemplatedButton.TextColorPropertyRadTemplatedButton.FontFamilyPropertyRadTemplatedButton.FontSizePropertyRadTemplatedButton.FontAttributesPropertyRadTemplatedButton.TextDecorationsPropertyRadTemplatedButton.HorizontalTextAlignmentPropertyRadTemplatedButton.VerticalTextAlignmentPropertyRadTemplatedButton.ActualContentPropertyRadTemplatedButton.ContentRadTemplatedButton.ContentTemplateRadTemplatedButton.TextColorRadTemplatedButton.FontFamilyRadTemplatedButton.FontSizeRadTemplatedButton.FontAttributesRadTemplatedButton.TextDecorationsRadTemplatedButton.HorizontalTextAlignmentRadTemplatedButton.VerticalTextAlignmentRadTemplatedButton.ActualContentRadButtonBase.IsPressedPropertyRadButtonBase.IsKeyboardFocusedPropertyRadButtonBase.CommandPropertyRadButtonBase.CommandParameterPropertyRadButtonBase.StylePropertyRadButtonBase.ControlTemplatePropertyRadButtonBase.BackgroundColorPropertyRadButtonBase.BackgroundPropertyRadButtonBase.PaddingPropertyRadButtonBase.BorderColorPropertyRadButtonBase.BorderBrushPropertyRadButtonBase.BorderThicknessPropertyRadButtonBase.CornerRadiusPropertyRadButtonBase.OnApplyTemplate()RadButtonBase.OnPropertyChanged(string)RadButtonBase.OnHandlerChanging(HandlerChangingEventArgs)RadButtonBase.OnHandlerChanged()RadButtonBase.IsPressedRadButtonBase.IsKeyboardFocusedRadButtonBase.CommandRadButtonBase.CommandParameterRadButtonBase.StyleRadButtonBase.ControlTemplateRadButtonBase.BackgroundColorRadButtonBase.BackgroundRadButtonBase.PaddingRadButtonBase.BorderColorRadButtonBase.BorderBrushRadButtonBase.BorderThicknessRadButtonBase.CornerRadiusRadButtonBase.IsEnabledCoreRadButtonBase.ClickedRadButtonBase.PressedRadButtonBase.Released...

Constructors

Initializes a new instance of the RadSpeechToTextButton class.

C#
public RadSpeechToTextButton()

Fields

Identifies the ErrorOccurredCommand bindable property.

C#
public static readonly BindableProperty ErrorOccurredCommandProperty

Identifies the IsContinuousRecognition bindable property.

C#
public static readonly BindableProperty IsContinuousRecognitionProperty

LanguageTagProperty

BindableProperty

Identifies the LanguageTag bindable property.

C#
public static readonly BindableProperty LanguageTagProperty

Identifies the SpeechRecognizedCommand bindable property.

C#
public static readonly BindableProperty SpeechRecognizedCommandProperty

Identifies the SpeechRecognizerCreator bindable property.

C#
public static readonly BindableProperty SpeechRecognizerCreatorProperty

StateProperty

BindableProperty

Identifies the State bindable property.

C#
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.

C#
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.

C#
public bool IsContinuousRecognition { get; set; }

Gets or sets the IETF BCP 47 language tag for the speech recognizer. For example "en-US", "de-DE".

C#
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.

C#
public ICommand SpeechRecognizedCommand { get; set; }

Gets or sets the custom factory that creates a IRadSpeechRecognizer instance.

C#
public Func<IRadSpeechRecognizer> SpeechRecognizerCreator { get; set; }

Gets the current state of the speech recognizer.

C#
public SpeechRecognizerState State { get; }

Methods

C#
protected override void ChangeVisualState()

Overrides: RadButtonBase.ChangeVisualState()

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.

C#
public Task StopListening()
Returns:

Task

Events

Occurs when an error is encountered by the speech recognizer.

C#
public event EventHandler<SpeechRecognizerErrorOccurredEventArgs> ErrorOccurred

Occurs when speech is successfully recognized.

C#
public event EventHandler<SpeechRecognizerSpeechRecognizedEventArgs> SpeechRecognized

Occurs when the state of the speech recognizer changes.

C#
public event EventHandler StateChanged