Skip to content

Commit 618f616

Browse files
committed
update winui support
1 parent c7aedf1 commit 618f616

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

controls/speechtotextbutton/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The .NET MAUI SpeechToTextButton exposes the following events:
2626
* `Exception` (`System.Exception`) property that contains the exception associated with the speech recognizer error, if any.
2727
* `Handled` (`bool`) property that determines whether the error has been handled. Set this to `true` to prevent the default error handling behavior.
2828

29-
* `StateChanged`—Raaised when the state of the speech recognizer changes. The `StateChanged` event handler receives two parameters:
29+
* `StateChanged`—Raised when the state of the speech recognizer changes. The `StateChanged` event handler receives two parameters:
3030
* The `sender` argument which is of type `object` but can be cast to `RadSpeechToTextButton`.
3131
* An `System.EventArgs`.
3232

controls/speechtotextbutton/styling.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ The following example demonstrates how to style the SpeechToTextButton with cust
5151
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
5252
```
5353

54+
**4.** The `SpeechRecognized` event handler:
55+
56+
<snippet id='bottomsheet-content-style-resource' />
57+
58+
**5.** The `ErrorOccurred` event handler:
59+
60+
<snippet id='bottomsheet-content-style-resource' />
61+
5462
This is the result on Android and iOS:
5563

5664
![.NET MAUI SpeechToTextButton Visual States](images/speechtotextbutton-styling.gif "SpeechToTextButton for .NET MAUI")

controls/speechtotextbutton/winui-support.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
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: 3
5+
position: 1
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 when using the control on WinUI due to platform limitations.
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.
1414

1515
## Limitations in Windows.Media.SpeechRecognition
1616

1717
* 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)
1818

19-
* Based on this issue, the SpeechToTextButton control is not fully supported on WinUI. When you click the control, an `InvalidOperationException` is thrown.
19+
* Based on this issue, the SpeechToTextButton control is not fully supported on WinUI. When you click the control, an `InvalidOperationException` occurs.
2020

21-
## Solution
21+
## Solutions
2222

2323
To use the SpeechToTextButton on WinUI, you can use one of the following approaches:
2424

@@ -32,13 +32,9 @@ this.speechToTextButton.SpeechRecognizerCreator = () => new RadSpeechRecognizer(
3232

3333
* Use an **Unpackaged** app deployment model.
3434

35-
## Configure Speech Recognition
36-
37-
Confirm that **Online speech recognition** (Settings -> Privacy -> Speech) is enabled.
38-
3935
## Language Support
4036

41-
When setting the `RadSpeechToTextButton.LanguageTag` property to a specific value, ensure that the language is supported by the `Windows.Media.SpeechRecognition.SpeechRecognizer` on WinUI.
37+
When setting the `LanguageTag` to a specific value, ensure that the language is supported by the `Windows.Media.SpeechRecognition.SpeechRecognizer` on WinUI.
4238

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

0 commit comments

Comments
 (0)