You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/speechtotextbutton/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,11 @@ When the user taps the button, the control uses a speech recognition service, li
17
17
18
18
## Key Features of the Telerik .NET MAUI SpeechToTextButton
19
19
20
-
*[Visual States]({%slug speechtotextbutton-visual-states%})—The SpeechToTextButton supports different visual states such as Normal, Listening, Error, and more, providing visual feedback to users during speech recognition.
21
20
*[Language Configuration]({%slug speechtotextbutton-configuration%}#language)—The SpeechToTextButton allows you to set the language for speech recognition, ensuring accurate transcription of spoken words into text.
22
21
*[Events]({%slug speechtotextbutton-events%})—The SpeechToTextButton emits a set of events that allow you to configure the component's behavior in response to speech recognition, including `SpeechRecognized` and `ErrorOccurred` events.
23
22
*[Commands]({%slug speechtotextbutton-commands%})—The SpeechToTextButton supports command execution, allowing you to bind commands to the button's actions in an MVVM-friendly way.
24
23
*[Custom Speech Recognizer]({%slug speechtotextbutton-custom-recognizer%})—Implement your own speech recognition logic by creating a custom recognizer that implements the `IRadSpeechRecognizer` interface.
24
+
*[Visual States]({%slug speechtotextbutton-visual-states%})—The SpeechToTextButton supports different visual states such as Normal, Listening, Error, and more, providing visual feedback to users during speech recognition.
25
25
*[Styling API]({%slug speechtotextbutton-styling%})—You can customize the appearance of the SpeechToTextButton using the styling API, which allows you to set properties like background color, border color, corner radius, and more.
Copy file name to clipboardExpand all lines: controls/speechtotextbutton/states.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,15 @@ tags: .net maui, telerik speech to text button for .net maui, ui for .net maui
7
7
slug: speechtotextbutton-states
8
8
---
9
9
10
-
# .NET MAUI SpeechToTextButton States
10
+
# .NET MAUI SpeechToTextButton Architecture and States
11
11
12
+
The SpeechTextButton control provides visual feedback and handle user interactions. The button uses a speech recognition service. The service provides per platform implementation or an AI agent conenction. Almost all operations are asynconous.
12
13
14
+
The SpeechToTextButton control in .NET MAUI has several states that reflect its current operation and user interaction.
15
+
16
+
The image below explains how the control works and how the states are managed:
The Telerik UI for .NET MAUI SpeechToTextButton control is designed to work seamlessly across all supported platforms, including WinUI.
12
12
13
-
However, there are some platform-specific considerations and limitations to be aware of when using the control on WinUI.
13
+
The Speech Recognizer uses platform-specific speech recognition services. On WinUI, it relies on the [`Windows.Media.SpeechRecognition`](https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition?view=winrt-26100). However, there are specific considerations when using the control on WinUI due to platform limitations.
14
14
15
+
## Limitations in Windows.Media.SpeechRecognition
16
+
17
+
* The app crashes when trying to close the application via the "X" button and the app is **Packaged**. There is an open bug report: [Application crashes after using SpeechRecognizer in a Packaged App](https://github.com/microsoft/microsoft-ui-xaml/issues/10697)
18
+
19
+
* Based on this issue, the SpeechToTextButton control is not fully supported on WinUI. When you click the control, an `InvalidOperationException` is thrown.
20
+
21
+
## Solutions
22
+
23
+
To use the SpeechToTextButton on WinUI, you can use one of the following approaches:
24
+
25
+
* Set the `SpeechRecognizerCreator` property of the `RadSpeechToTextButton` to `RadSpeechRecognizer` for **Unpackaged** apps:
* Create a [custom recognizer]({%slug speechtotextbutton-custom-recognizer%}) for **Packaged** and **Unpackaged** apps.
32
+
33
+
* Use an **Unpackaged** app deployment model.
34
+
35
+
## Language Support
36
+
37
+
When setting the `LanguageTag` to a specific value, ensure that the language is supported by the `Windows.Media.SpeechRecognition.SpeechRecognizer` on WinUI.
38
+
39
+
For more details, review the [Microsoft documentation](https://learn.microsoft.com/en-us/windows/apps/design/input/speech-recognition#predefined-grammars).
40
+
41
+
## See Also
42
+
43
+
-[Visual States in the SpeechToTextButton]({%slug speechtotextbutton-visual-states%})
44
+
-[Configure the SpeechToTextButton]({%slug speechtotextbutton-configuration%})
0 commit comments