Improve recording startup responsiveness and language feedback#20
Draft
aladin7 wants to merge 1 commit into
Draft
Improve recording startup responsiveness and language feedback#20aladin7 wants to merge 1 commit into
aladin7 wants to merge 1 commit into
Conversation
Owner
|
Impressive work again ,the prepared-stream approach and the ordered callback dispatch address real latency issues, and the language feedback in the overlay is a nice touch. Two things before we can merge: (1) the branch is based on a pre-#18 main and conflicts with the shutdown redesign that was just merged ,could you rebase onto current main and reconcile the two shutdown paths? (2) Keeping the mic stream open while idle: have you checked the impact on Bluetooth headsets (HFP low-quality profile staying engaged) and on the Windows 11 mic privacy indicator? If either misbehaves, we may want to close the stream after N seconds of inactivity. Happy to merge once rebased. |
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.
What changed
Why
Opening the microphone from scratch for every recording made the listening indicator and first audio inconsistent on Windows. Slow startup also blocked pynput's event callback, which could delay or lose the corresponding key release. Tk operations were scheduled from background threads, allowing the recording-to-transcription handoff or shutdown to stall.
Automatic language recognition was also opaque: users could not see whether detection was active, what Whisper detected, or choose the detected language without navigating Settings.
Impact
Recording feedback now appears immediately, actual Listening state begins with the first audio frame, and release events are processed reliably. The microphone remains stopped while idle, avoiding a persistent Windows microphone indicator on the tested system. Short taps leave no residual overlay, and quitting releases the process cleanly.
Users in Auto mode can see the detected language and choose whether to fix recognition to it. Once fixed, subsequent transcriptions skip automatic detection.
Validation
python -m unittest discover -q(69 tests)python -m compileall -q .git diff --check