ClassRadSpeechToTextButton
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
RadSpeechToTextButton()
Initializes a new instance of the RadSpeechToTextButton class.
Declaration
public RadSpeechToTextButton()
Fields
ErrorOccurredCommandProperty
Identifies the ErrorOccurredCommand bindable property.
Declaration
public static readonly DependencyProperty ErrorOccurredCommandProperty
Field Value
DependencyProperty
IsContinuousRecognitionProperty
Identifies the IsContinuousRecognition bindable property.
Declaration
public static readonly DependencyProperty IsContinuousRecognitionProperty
Field Value
DependencyProperty
LanguageTagProperty
Identifies the LanguageTag bindable property.
Declaration
public static readonly DependencyProperty LanguageTagProperty
Field Value
DependencyProperty
SpeechRecognizedCommandProperty
Identifies the SpeechRecognizedCommand bindable property.
Declaration
public static readonly DependencyProperty SpeechRecognizedCommandProperty
Field Value
DependencyProperty
SpeechRecognizerCreatorProperty
Identifies the SpeechRecognizerCreator bindable property.
Declaration
public static readonly DependencyProperty SpeechRecognizerCreatorProperty
Field Value
DependencyProperty
StateProperty
Identifies the State bindable property.
Declaration
public static readonly DependencyProperty StateProperty
Field Value
DependencyProperty
ToolTipStatesProperty
Identifies the ToolTipStates dependency property. Determines in which recognizer states the tooltip callout should be shown.
Declaration
public static readonly DependencyProperty ToolTipStatesProperty
Field Value
DependencyProperty
Properties
ErrorOccurredCommand
Gets or sets the command that is executed when an error occurs within the speech recognizer.
Declaration
public ICommand ErrorOccurredCommand { get; set; }
Property Value
IsContinuousRecognition
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.
LanguageTag
Gets or sets the IETF BCP 47 language tag for the speech recognizer. For example "en-US", "de-DE".
SpeechRecognizedCommand
Gets or sets the command that is executed when speech is recognized.
Declaration
public ICommand SpeechRecognizedCommand { get; set; }
Property Value
SpeechRecognizerCreator
Gets or sets the custom factory that creates a IRadSpeechRecognizer instance.
Declaration
public Func<IRadSpeechRecognizer> SpeechRecognizerCreator { get; set; }
Property Value
State
Gets the current state of the speech recognizer.
Declaration
public SpeechRecognizerState State { get; }
Property Value
ToolTipStates
Gets or sets the recognizer states in which the tooltip callout is enabled.
Declaration
public IList<SpeechRecognizerState> ToolTipStates { get; }
Property Value
Methods
GetCalloutContent()
Gets the content object used in the callout tooltip based on the current speech recognizer state.
Declaration
protected virtual object GetCalloutContent()
Returns
A localized string describing the action for the current state, or null when no tooltip should be shown.
OnApplyTemplate()
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .
Declaration
public override void OnApplyTemplate()
Overrides
OnClick()
Invoke the base OnClick and execute the associated Command.
Declaration
protected override void OnClick()
Overrides
OnCreateAutomationPeer()
Creates a RadButtonAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
Overrides
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
Overrides
OnMouseEnter(MouseEventArgs)
Starts the auto open timer.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
e
MouseEventArgs
Overrides
OnMouseLeave(MouseEventArgs)
Stops the auto open timer.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
e
MouseEventArgs
Overrides
StopListening()
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
CalloutOpening
Occurs before the callout tooltip is opened, allowing customization or cancellation.
Declaration
public event EventHandler<SpeechToTextTooltipOpeningEventArgs> CalloutOpening
Event Value
ErrorOccurred
Occurs when an error is encountered by the speech recognizer.
Declaration
public event EventHandler<SpeechRecognizerErrorOccurredEventArgs> ErrorOccurred
Event Value
SpeechRecognized
Occurs when speech is successfully recognized.
Declaration
public event EventHandler<SpeechRecognizerSpeechRecognizedEventArgs> SpeechRecognized
Event Value
StateChanged
Occurs when the state of the speech recognizer changes.