Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline SpeechToText #2089

Closed
8 tasks
VladislavAntonyuk opened this issue Aug 3, 2024 · 0 comments · Fixed by #2242
Closed
8 tasks

Offline SpeechToText #2089

VladislavAntonyuk opened this issue Aug 3, 2024 · 0 comments · Fixed by #2242
Assignees
Labels
approved This Proposal has been approved and is ready to be added to the Toolkit area/essentials Issue/Discussion/PR that has to do with Essentials feature request 📬
Milestone

Comments

@VladislavAntonyuk
Copy link
Collaborator

VladislavAntonyuk commented Aug 3, 2024

Feature name

SpeechToText

Progress tracker

  • Android Implementation
  • iOS Implementation
  • MacCatalyst Implementation
  • Windows Implementation
  • Tizen Implementation
  • Unit Tests
  • Samples
  • Documentation

Summary

Free Speech recognition functionality that is available offline.

More details with samples at https://vladislavantonyuk.azurewebsites.net/articles/Speech-recognition-with-.NET-MAUI

Motivation

Allows offline SpeechToText to allow without internet connection.

Detailed Design

https://developer.apple.com/documentation/speech
https://developer.android.com/reference/android/speech/SpeechRecognizer
https://learn.microsoft.com/en-us/uwp/api/windows.media.speechrecognition?view=winrt-22621

The same API as online Speech Recognition but with Offline suffix

Usage Syntax

var isAuthorized = await speechToText.RequestPermissions();
		if (isAuthorized)
		{
			try
			{
				RecognitionText = await speechToText.StartListeningOffline(CultureInfo.GetCultureInfo(Locale?.Language ?? "en-us"), new Progress<string>(partialText =>
					{
						RecognitionText += partialText + " ";
					}), cancellationToken);
			}
			catch (Exception ex)
			{
				await Toast.Make(ex.Message).Show(cancellationToken);
			}
		}
		else
		{
			await Toast.Make("Permission denied").Show(cancellationToken);
		}

Drawbacks

No response

Alternatives

No response

Unresolved Questions

No response

@VladislavAntonyuk VladislavAntonyuk self-assigned this Aug 3, 2024
@VladislavAntonyuk VladislavAntonyuk added this to the vNext milestone Aug 3, 2024
@VladislavAntonyuk VladislavAntonyuk added approved This Proposal has been approved and is ready to be added to the Toolkit feature request 📬 area/essentials Issue/Discussion/PR that has to do with Essentials labels Aug 3, 2024
VladislavAntonyuk added a commit that referenced this issue Dec 18, 2024
Offline Speech Recognition #2089 (#2258)

Fix build

Remove Task

Update according to comments

Fix tizen

Discard changes to samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj

Discard changes to global.json

Fix tizen

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/OfflineSpeechToTextViewModel.cs

Fix xml comment

Update sample
VladislavAntonyuk added a commit that referenced this issue Dec 18, 2024
Offline Speech Recognition #2089 (#2258)

Fix build

Remove Task

Update according to comments

Fix tizen

Discard changes to samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj

Discard changes to global.json

Fix tizen

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/OfflineSpeechToTextViewModel.cs

Fix xml comment

Update sample
VladislavAntonyuk added a commit that referenced this issue Dec 18, 2024
Offline Speech Recognition #2089 (#2258)

Fix build

Remove Task

Update according to comments

Fix tizen

Discard changes to samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj

Discard changes to global.json

Fix tizen

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/OfflineSpeechToTextViewModel.cs

Fix xml comment

Update sample
VladislavAntonyuk added a commit that referenced this issue Dec 18, 2024
Offline Speech Recognition #2089 (#2258)

Fix build

Remove Task

Update according to comments

Fix tizen

Discard changes to samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj

Discard changes to global.json

Fix tizen

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/OfflineSpeechToTextViewModel.cs

Fix xml comment

Update sample
VladislavAntonyuk added a commit that referenced this issue Dec 18, 2024
Offline Speech Recognition #2089 (#2258)

Fix build

Remove Task

Update according to comments

Fix tizen

Discard changes to samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj

Discard changes to global.json

Fix tizen

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update ISpeechToText.shared.cs

Co-authored-by: Shaun Lawrence <[email protected]>

Update samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/OfflineSpeechToTextViewModel.cs

Fix xml comment

Update sample
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved This Proposal has been approved and is ready to be added to the Toolkit area/essentials Issue/Discussion/PR that has to do with Essentials feature request 📬
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant