New to Telerik UI for WPFStart a free 30-day trial

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

Definition

Constructors

Initializes a new instance of the RadSpeechToTextButton class.

C#
public RadSpeechToTextButton()

Fields

Identifies the ErrorOccurredCommand bindable property.

C#
public static readonly DependencyProperty ErrorOccurredCommandProperty

Identifies the IsContinuousRecognition bindable property.

C#
public static readonly DependencyProperty IsContinuousRecognitionProperty

LanguageTagProperty

DependencyProperty

Identifies the LanguageTag bindable property.

C#
public static readonly DependencyProperty LanguageTagProperty

Identifies the SpeechRecognizedCommand bindable property.

C#
public static readonly DependencyProperty SpeechRecognizedCommandProperty

Identifies the SpeechRecognizerCreator bindable property.

C#
public static readonly DependencyProperty SpeechRecognizerCreatorProperty

StateProperty

DependencyProperty

Identifies the State bindable property.

C#
public static readonly DependencyProperty StateProperty

ToolTipStatesProperty

DependencyProperty

Identifies the ToolTipStates dependency property. Determines in which recognizer states the tooltip callout should be shown.

C#
public static readonly DependencyProperty ToolTipStatesProperty

Properties

Gets or sets the command that is executed when an error occurs within the speech recognizer.

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.

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; }

Gets or sets the recognizer states in which the tooltip callout is enabled.

C#
public IList<SpeechRecognizerState> ToolTipStates { get; set; }

Methods

Gets the content object used in the callout tooltip based on the current speech recognizer state.

C#
protected virtual object GetCalloutContent()
Returns:

object

A localized string describing the action for the current state, or null when no tooltip should be shown.

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .

C#
public override void OnApplyTemplate()

Overrides: RadButton.OnApplyTemplate()

Invoke the base OnClick and execute the associated Command.

C#
protected override void OnClick()

Overrides: RadButton.OnClick()

Creates a RadButtonAutomationPeer.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Overrides: RadButton.OnCreateAutomationPeer()

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Overrides: RadButton.OnInitialized(EventArgs)

Starts the auto open timer.

C#
protected override void OnMouseEnter(MouseEventArgs e)
Parameters:eMouseEventArgs

Overrides: RadButton.OnMouseEnter(MouseEventArgs)

Stops the auto open timer.

C#
protected override void OnMouseLeave(MouseEventArgs e)
Parameters:eMouseEventArgs

Overrides: RadButton.OnMouseLeave(MouseEventArgs)

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 before the callout tooltip is opened, allowing customization or cancellation.

C#
public event EventHandler<SpeechToTextTooltipOpeningEventArgs> CalloutOpening

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