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/winui-support.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,24 @@
2
2
title: WinUI Support
3
3
page_title: .NET MAUI SpeechToTextButton Documentation - WinUI Support
4
4
description: Review what are the options and limitations using the .NET MAUI SpeechToTextButton on WinUI.
5
-
position: 1
5
+
position: 3
6
6
slug: speechtotextbutton-winui-support
7
7
---
8
8
9
9
# .NET MAUI SpeechToTextButton WinUI Support Specifics
10
10
11
11
The Telerik UI for .NET MAUI SpeechToTextButton control is designed to work seamlessly across all supported platforms, including WinUI.
12
12
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 and limitations when using the control on WinUI due to known platform issues.
13
+
The Speech Recognizer uses platform-specific speech recognition services. By default, the `RadSpeechToTextButton` control uses the `RadSpeechRecognizer` as a speech recognizer creator.
14
+
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
+
17
+
The `RadSpeechRecognizer` on WinUI implements 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.
14
18
15
19
## Limitations in Windows.Media.SpeechRecognition
16
20
17
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)
18
22
19
-
* Based on this issue, the SpeechToTextButton control is not fully supported on WinUI. When you click the control, an `InvalidOperationException` occurs.
20
-
21
23
## Solutions
22
24
23
25
To use the SpeechToTextButton on WinUI, you can use one of the following approaches:
@@ -32,9 +34,13 @@ this.speechToTextButton.SpeechRecognizerCreator = () => new RadSpeechRecognizer(
32
34
33
35
* Use an **Unpackaged** app deployment model.
34
36
35
-
## Language Support
37
+
### Configure Speech Recognition
38
+
39
+
Confirm that **Online speech recognition** (Settings -> Privacy -> Speech) is enabled.
40
+
41
+
### Language Support
36
42
37
-
When setting the `LanguageTag` to a specific value, ensure that the language is supported by the `Windows.Media.SpeechRecognition.SpeechRecognizer` on WinUI.
43
+
When setting the `RadSpeechToTextButton.LanguageTag` property to a specific value, ensure that the language is supported by the `Windows.Media.SpeechRecognition.SpeechRecognizer` on WinUI.
38
44
39
45
For more details, review the [Microsoft documentation](https://learn.microsoft.com/en-us/windows/apps/design/input/speech-recognition#predefined-grammars).
0 commit comments