Repository navigation
fix(windows): share the dictation engine before the microphone primes, and report no streams in hex service - #3175
Merged
Merged
Conversation
…, and report no streams in hex service
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3173, from @Wstnn's report and analysis. #3170 links here as the blocker.
Windows app:
windows::dictation::runstarted and shared theTranscriptionEngineonly afterprime_microphonereturned. With no microphone, priming waits in the recovering input's retry loop forever (could not reopen dictation microphone; retrying).TranscriptionEngine::shared()then stayed empty andPOST /streamsanswered503 engine-unavailablewhile a streaming model was loaded. The engine is now started and shared before priming, as Linux and macOS already do.hex service(including--embedded): this process has no dictation engine, so/streamscan never run there, but/capabilitieshardcodedstreams: true.LocalApiOptionsgets awithout_streamsflag, set byrun_serviceandstart_embedded. In those processes/capabilitiesreportsstreams: falseand creating a stream answers503 engine-unavailable. The running app is unchanged.Docs: the availability section of
docs/streams.mdnow covers both cases.Testing:
local_api::streams::tests::a_service_without_the_apps_engine_reports_no_streams_and_refuses_them. It checks that the embedded service reportsstreams: falseand refuses a stream, and that an app API with an engine reportsstreams: true.python3 scripts/code-shape.py --checkpasses.scripts/check local_api::streamsand clippy need to run before merge.Fixes #3173