Skip to content

docs(SpeechToTextButton): add SpeechToTextButton docs #3076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Tsvetomir-Hr
Copy link
Contributor

@Tsvetomir-Hr Tsvetomir-Hr commented Jul 1, 2025

Related to: https://github.com/telerik/blazor/issues/11675

Important

The documentation has live examples. To run the examples, checkout to add-sttb-examples branch in the blazor repository.

@Tsvetomir-Hr Tsvetomir-Hr self-assigned this Jul 1, 2025
@Tsvetomir-Hr Tsvetomir-Hr requested review from a team as code owners July 1, 2025 08:13
- [SpeechToTextButton Live Demo](https://demos.telerik.com/blazor-ui/speechtotextbutton/overview)
- [SpeechToTextButton API Reference](/blazor-ui/api/Telerik.Blazor.Components.TelerikSpeechToTextButton)
- [SpeechToTextButton Events](slug:speechtotextbutton-events)
- [SpeechToTextButton Appearance](slug:speechtotextbutton-appearance)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a consistent syntax throughout the article - start all list items below with an asterisk.


The following example demonstrates how to add the `SpeechToTextButton` to a Blazor page and handle the recognition result.

**Example of Using the SpeechToTextButton**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use bold as a heading or to style a caption. Use the corresponding heading or caption style.

Suggested change
**Example of Using the SpeechToTextButton**
>caption Example of using the SpeechToTextButton


The `SpeechToTextButton` component emits several events that you can handle. For more details, refer to [SpeechToTextButton Events](slug:speechtotextbutton-events).

## SpeechToTextButton Parameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at some other Overview articles reveals that they usually have a table with parameters in this section. Consider adding one here.


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](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.TelerikSpeechToTextButton#methods).

**Example of Calling a Method by Reference**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the corresponding caption or heading style, not bold.


# Blazor SpeechToTextButton Overview

The `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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Don't use the inline code style for component names.
  • This comment applies to all occurrences of SpeechToTextButton in this PR.
Suggested change
The `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.
The 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.


## Icon

Set the `Icon` parameter to display an icon. You can use a predefined Telerik icon or a custom one.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making "Telerik icon" a link leading to the corresponding article.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make all Example titles captions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make all Example titles captions.


# SpeechToTextButton Integration

Integrate the `SpeechToTextButton` component with forms, input fields, and other UI elements to provide voice input capabilities.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider describing a sample scenario as a second paragraph after the first sentence. This allows you to add some context and increase the article's length.


Use the `OnResult` event to update an input field with the recognized text.

**Example of Binding Recognized Text to an TelerikTextArea**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a caption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants