-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speech Recognition v2 - StartListening/StopListening (#1382)
* Speech Recognition v2 * Fix tizen * Fix tizen * Fix PR comments * Add tests * Fix tests * Rename `ISpeechToText.State` -> `ISpeechToText.CurrentState` * Update Layout * Add `ISpeechToText.StateChanged` * Add Missing CancellationToken * Update Sample App * Update SpeechToTextPage.xaml * `dotnet format` * Add tests, update CurrentState * Add Missing XML * `dotnet format` * Update Formatting * Add Missing Cancellation Usage, Update `SpeechToTextImplementation.getRecognitionTaskCompletionSource` on macios * Add `ResetSpeechRecognitionTaskCompletionSource()` * Update SpeechToTextImplementation.tizen.cs * `dotnet format` * Dispose of `CancellationTokenRegistration` * Add StateChanged impl on Tizen --------- Co-authored-by: Brandon Minnick <[email protected]> Co-authored-by: Jay Cho <[email protected]>
- Loading branch information
1 parent
322547e
commit 429b205
Showing
22 changed files
with
840 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...nityToolkit.Maui.Sample/ViewModels/Converters/ByteArrayToImageSourceConverterViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ui.Core/Essentials/SpeechToText/Events/SpeechToTextRecognitionResultCompletedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace CommunityToolkit.Maui.Media; | ||
|
||
/// <summary> | ||
/// <see cref="EventArgs"/> for <see cref="ISpeechToText.RecognitionResultCompleted"/> | ||
/// </summary> | ||
public class SpeechToTextRecognitionResultCompletedEventArgs : EventArgs | ||
{ | ||
/// <summary> | ||
/// Initialize a new instance of <see cref="SpeechToTextRecognitionResultCompletedEventArgs"/> | ||
/// </summary> | ||
public SpeechToTextRecognitionResultCompletedEventArgs(string recognitionResult) | ||
{ | ||
RecognitionResult = recognitionResult; | ||
} | ||
|
||
/// <summary> | ||
/// Speech recognition result | ||
/// </summary> | ||
public string RecognitionResult { get; } | ||
} |
20 changes: 20 additions & 0 deletions
20
...Maui.Core/Essentials/SpeechToText/Events/SpeechToTextRecognitionResultUpdatedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace CommunityToolkit.Maui.Media; | ||
|
||
/// <summary> | ||
/// <see cref="EventArgs"/> for <see cref="ISpeechToText.RecognitionResultUpdated"/> | ||
/// </summary> | ||
public class SpeechToTextRecognitionResultUpdatedEventArgs : EventArgs | ||
{ | ||
/// <summary> | ||
/// Initialize a new instance of <see cref="SpeechToTextRecognitionResultUpdatedEventArgs"/> | ||
/// </summary> | ||
public SpeechToTextRecognitionResultUpdatedEventArgs(string recognitionResult) | ||
{ | ||
RecognitionResult = recognitionResult; | ||
} | ||
|
||
/// <summary> | ||
/// Speech recognition result | ||
/// </summary> | ||
public string RecognitionResult { get; } | ||
} |
20 changes: 20 additions & 0 deletions
20
...nityToolkit.Maui.Core/Essentials/SpeechToText/Events/SpeechToTextStateChangedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace CommunityToolkit.Maui.Media; | ||
|
||
/// <summary> | ||
/// <see cref="EventArgs"/> for <see cref="ISpeechToText.StateChanged"/> | ||
/// </summary> | ||
public class SpeechToTextStateChangedEventArgs : EventArgs | ||
{ | ||
/// <summary> | ||
/// Initialize a new instance of <see cref="SpeechToTextStateChangedEventArgs"/> | ||
/// </summary> | ||
public SpeechToTextStateChangedEventArgs(SpeechToTextState state) | ||
{ | ||
State = state; | ||
} | ||
|
||
/// <summary> | ||
/// Speech To Text State | ||
/// </summary> | ||
public SpeechToTextState State { get; } | ||
} |
Oops, something went wrong.