Blazor SpeechToTextButton Overview
The Blazor SpeechToTextButton component enables speech recognition in Blazor applications. It provides a button that users can select to start and stop speech recognition. The component converts spoken words into text and emits events with the recognized results.
Use the SpeechToTextButton component to add voice input capabilities to forms, search bars, chat interfaces, and other scenarios that require speech-to-text functionality.
Basic Usage
The following example demonstrates how to add the SpeechToTextButton to a Blazor page and handle the recognition result.
Example of using the SpeechToTextButton
Appearance
You can customize the appearance of the SpeechToTextButton by setting parameters such as Icon
, and Class
. For more details and examples, refer to SpeechToTextButton Appearance.
Events
The SpeechToTextButton component emits several events that you can handle. For more details, refer to SpeechToTextButton Events.
SpeechToTextButton Parameters
To review all available parameters for the SpeechToTextButton component, see the SpeechToTextButton API Reference.
SpeechToTextButton Reference and Methods
The SpeechToTextButton component exposes several public methods that you can call from your code. For a full list and details, see the SpeechToTextButton API Reference.
Example of Calling a Method by Reference
<TelerikSpeechToTextButton @ref="speechToTextButtonRef" />
@code {
private async Task StartRecognition()
{
await speechToTextButtonRef.StartAsync();
}
}
Supported Browsers
The SpeechToTextButton component relies on the Web Speech API. For a list of supported browsers, refer to the Web Speech API documentation.