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/states.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,7 @@ slug: speechtotextbutton-states
9
9
10
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.
13
-
14
-
The SpeechToTextButton control in .NET MAUI has several states that reflect its current operation and user interaction.
12
+
The SpeechTextButton control handles user interactions and provides visual feedback about its current state, for example, when it's listening or ready. The button uses a speech recognition service that varies by platform and also provides an AI agent connection. Almost all operations are asynchronous.
15
13
16
14
The image below explains how the control works and how the states are managed:
The SpeechToTextButton control provides visual states that allow you to customize its appearance based on different interaction and operational states. Visual states enable you to create responsive UI that provides clear feedback to users about the control's current status.
12
+
The SpeechToTextButton control provides visual states that allow you to customize its appearance based on user interactions and operational states. Visual states enable you to create responsive UI that provides clear feedback to users about the control's current status.
13
13
14
14
You can use visual states to change the visual appearance of the control depending on its current state—whether it's disabled, pressed, listening for speech, or encountering an error.
15
15
@@ -32,11 +32,11 @@ The SpeechToTextButton provides the following `CommonStates` visual states:
32
32
33
33
The SpeechToTextButton automatically transitions between visual states based on user interaction and speech recognition status:
34
34
35
-
-`Normal` → `Pressed`—When user starts pressing the button
Copy file name to clipboardExpand all lines: controls/speechtotextbutton/winui-support.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,26 +14,25 @@ The Speech Recognizer uses platform-specific speech recognition services. By def
14
14
15
15
On WinUI, the `RadSpeechRecognizer` is not set to the `RadSpeechToTextButton`. When you click the control, an `InvalidOperationException` is thrown. The reason behind this is a limitation in the WinUI platform speech recognition service—[`Windows.Media.SpeechRecognition`](https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition?view=winrt-26100).
16
16
17
-
The `RadSpeechRecognizer` on WinUI utilizes the [`Windows.Media.SpeechRecognition`](https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition?view=winrt-26100). There are specific considerations when using the control on WinUI due to limitations in the `Windows.Media.SpeechRecognition` API.
17
+
The `RadSpeechRecognizer` on WinUI utilizes the [`Windows.Media.SpeechRecognition`](https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition?view=winrt-26100). There are specific considerations when using the control on WinUI due to limitations in the `Windows.Media.SpeechRecognition` API. The app crashes when trying to close the application via the "X" button and the app is **Packaged**.
18
18
19
-
## Limitations in Windows.Media.SpeechRecognition
20
-
21
-
* 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)
19
+
> See the following bug report for more details: [Application crashes after using SpeechRecognizer in a Packaged App](https://github.com/microsoft/microsoft-ui-xaml/issues/10697).
22
20
23
21
## Solutions
24
22
25
-
To use the SpeechToTextButton on WinUI, you can use one of the following approaches:
23
+
To use the SpeechToTextButton on WinUI, you can use one of the following approaches described in the table below:
24
+
25
+
| Packaged Apps | Unpackaged Apps |
26
+
| ------------- | --------------- |
27
+
| Create a [custom recognizer]({%slug speechtotextbutton-custom-recognizer%}) | Create a [custom recognizer]({%slug speechtotextbutton-custom-recognizer%}) |
28
+
|| Use the `RadSpeechRecognizer`|
26
29
27
-
* Set the `SpeechRecognizerCreator` property of the `RadSpeechToTextButton` to `RadSpeechRecognizer` for **Unpackaged** apps:
30
+
If you want to use the `RadSpeechRecognizer` on WinUI, set the `SpeechRecognizerCreator` property of the `RadSpeechToTextButton` to `RadSpeechRecognizer`:
0 commit comments