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

SpeechRecognition fixes #2562

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

VladislavAntonyuk
Copy link
Collaborator

Description of Change

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pulls

Additional information

Untitled.video.2.mp4

@Copilot Copilot bot review requested due to automatic review settings March 2, 2025 20:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR fixes issues related to speech recognition support across multiple platforms by updating API usages and converting several void methods to asynchronous Tasks. Key changes include updating Android platform version requirements and adding asynchronous support with task-based patterns, as well as corresponding updates in macOS, iOS, .NET, Windows, and Tizen implementations.

Reviewed Changes

File Description
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.android.cs Converted InternalStartListening to async Task, updated Android version requirements, and added task-based callbacks for on-device language model download.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/SpeechToTextImplementation.android.cs Updated language configuration and switched to async Task for InternalStartListening.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.macos.cs Changed InternalStartListening to asynchronous, returning Task.CompletedTask.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.ios.cs Converted InternalStartListening to async Task and returned Task.CompletedTask.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.net.cs Updated InternalStartListening signature to Task and preserved unsupported behavior.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.windows.cs Changed InternalStartListening to async Task with Task.CompletedTask return.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.tizen.cs Updated InternalStartListening to async Task with Task.CompletedTask return.
src/CommunityToolkit.Maui.Core/Essentials/SpeechToText/OfflineSpeechToTextImplementation.shared.cs Updated the StartListenAsync method to await the asynchronous InternalStartListening implementation.

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

@VladislavAntonyuk VladislavAntonyuk self-assigned this Mar 2, 2025
@VladislavAntonyuk VladislavAntonyuk requested a review from a team March 2, 2025 20:38
@VladislavAntonyuk VladislavAntonyuk enabled auto-merge (squash) March 2, 2025 22:27
@VladislavAntonyuk VladislavAntonyuk added the needs discussion Discuss it on the next Monthly standup label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Discuss it on the next Monthly standup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Polish Language Speech Recognition Not Working
1 participant