Skip to content

Commit 6fd87ab

Browse files
committed
fix winui article
1 parent 618f616 commit 6fd87ab

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

controls/speechtotextbutton/winui-support.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
title: WinUI Support
33
page_title: .NET MAUI SpeechToTextButton Documentation - WinUI Support
44
description: Review what are the options and limitations using the .NET MAUI SpeechToTextButton on WinUI.
5-
position: 1
5+
position: 3
66
slug: speechtotextbutton-winui-support
77
---
88

99
# .NET MAUI SpeechToTextButton WinUI Support Specifics
1010

1111
The Telerik UI for .NET MAUI SpeechToTextButton control is designed to work seamlessly across all supported platforms, including WinUI.
1212

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.
1418

1519
## Limitations in Windows.Media.SpeechRecognition
1620

1721
* 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)
1822

19-
* Based on this issue, the SpeechToTextButton control is not fully supported on WinUI. When you click the control, an `InvalidOperationException` occurs.
20-
2123
## Solutions
2224

2325
To use the SpeechToTextButton on WinUI, you can use one of the following approaches:
@@ -32,9 +34,13 @@ this.speechToTextButton.SpeechRecognizerCreator = () => new RadSpeechRecognizer(
3234

3335
* Use an **Unpackaged** app deployment model.
3436

35-
## Language Support
37+
### Configure Speech Recognition
38+
39+
Confirm that **Online speech recognition** (Settings -> Privacy -> Speech) is enabled.
40+
41+
### Language Support
3642

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.
3844

3945
For more details, review the [Microsoft documentation](https://learn.microsoft.com/en-us/windows/apps/design/input/speech-recognition#predefined-grammars).
4046

0 commit comments

Comments
 (0)