Class RadzenSpeechToTextButton
RadzenSpeechToTextButton component. Enables speech to text functionality.
This is only supported on select browsers. See https://caniuse.com/?search=SpeechRecognition
<RadzenSpeechToTextButton Change=@(args => Console.WriteLine($"Value: {args}")) />
public class RadzenSpeechToTextButton : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
- Inheritance
-
RadzenSpeechToTextButton
- Implements
- Inherited Members
Constructors
RadzenSpeechToTextButton()
public RadzenSpeechToTextButton()
Properties
ButtonStyle
Gets or sets the button style.
[Parameter]
public ButtonStyle ButtonStyle { get; set; }
Property Value
- ButtonStyle
The button style.
Change
Callback which provides results from the speech recognition API.
[Parameter]
public EventCallback<string> Change { get; set; }
Property Value
Icon
Gets or sets the icon displayed while not recording.
[Parameter]
public string Icon { get; set; }
Property Value
- string
The icon.
IconColor
Gets or sets the icon color.
[Parameter]
public string IconColor { get; set; }
Property Value
- string
The icon color.
Language
Gets or sets the icon displayed while recording.
[Parameter]
public string Language { get; set; }
Property Value
- string
The icon.
StopIcon
Gets or sets the icon displayed while recording.
[Parameter]
public string StopIcon { get; set; }
Property Value
- string
The icon.
StopTitle
Gets or sets the message displayed when user hovers the button and it is recording.
[Parameter]
public string StopTitle { get; set; }
Property Value
- string
The message.
Title
Gets or sets the message displayed when user hovers the button and it is not recording.
[Parameter]
public string Title { get; set; }
Property Value
- string
The message.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
GetComponentCssClass()
protected override string GetComponentCssClass()
Returns
OnAfterRender(bool)
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
bool
OnResult(string)
Provides interface for javascript to pass speech results back to this component.
[JSInvokable]
public void OnResult(string result)
Parameters
result
string
StopRecording()
Provides interface for javascript to stop speech to text recording on this component if another component starts recording.
[JSInvokable]
public void StopRecording()