A button that provides speech-to-text functionality using a speech recognizer.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadSpeechToTextButton : RadButton
Inheritance: objectRadButtonRadSpeechToTextButton
Inherited Members
Constructors
Initializes a new instance of the RadSpeechToTextButton class.
public RadSpeechToTextButton()
Fields
ErrorOccurredCommandProperty
DependencyProperty
Identifies the ErrorOccurredCommand bindable property.
public static readonly DependencyProperty ErrorOccurredCommandProperty
IsContinuousRecognitionProperty
DependencyProperty
Identifies the IsContinuousRecognition bindable property.
public static readonly DependencyProperty IsContinuousRecognitionProperty
LanguageTagProperty
DependencyProperty
Identifies the LanguageTag bindable property.
public static readonly DependencyProperty LanguageTagProperty
SpeechRecognizedCommandProperty
DependencyProperty
Identifies the SpeechRecognizedCommand bindable property.
public static readonly DependencyProperty SpeechRecognizedCommandProperty
SpeechRecognizerCreatorProperty
DependencyProperty
Identifies the SpeechRecognizerCreator bindable property.
public static readonly DependencyProperty SpeechRecognizerCreatorProperty
StateProperty
DependencyProperty
Identifies the State bindable property.
public static readonly DependencyProperty StateProperty
ToolTipStatesProperty
DependencyProperty
Identifies the ToolTipStates dependency property. Determines in which recognizer states the tooltip callout should be shown.
public static readonly DependencyProperty ToolTipStatesProperty
Properties
Gets or sets the command that is executed when an error occurs within the speech recognizer.
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.
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; }
Gets or sets the recognizer states in which the tooltip callout is enabled.
public IList<SpeechRecognizerState> ToolTipStates { get; set; }
Methods
Gets the content object used in the callout tooltip based on the current speech recognizer state.
protected virtual object GetCalloutContent()
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. .
public override void OnApplyTemplate()
Overrides:
Invoke the base OnClick and execute the associated Command.
protected override void OnClick()
Overrides:
OnCreateAutomationPeer()
AutomationPeer
Creates a RadButtonAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Overrides:
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Overrides:
Starts the auto open timer.
protected override void OnMouseEnter(MouseEventArgs e)
Overrides:
Stops the auto open timer.
protected override void OnMouseLeave(MouseEventArgs e)
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 before the callout tooltip is opened, allowing customization or cancellation.
public event EventHandler<SpeechToTextTooltipOpeningEventArgs> CalloutOpening
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