Delay dictation overlay until audio capture is ready - #701
Conversation
|
The PR Policy check is blocking this PR because required template information is missing. Please update the PR description with:
Visual files detected:
Screenshots or video are required for UI, UX, settings, onboarding, overlay, menu bar, or visual behavior changes. If this PR has no visual changes, check the no-visual-change box in the template. If this remains incomplete for 48 hours after opening, the PR may be closed. |
|
This unfortunately goes against the UX I am planning toward - I am still A/B Testing to see which one makes sense and how to animate etc but adding 500ms will ruin the experience. Even the audio only takes ~150ms to start listening. Thanks for this but I won't be able to merge this as it would break the UX in a v bad way! For next time, please discuss about this before raising a PR to make sure we can align beforehand. |
|
The original problem was that audio capture and the UI were not synchronized. This description may sound simplistic, but the fix corrects the entire startup flow rather than merely adding a static delay. Previous flowHotkey → start sound → audio backend starts → isRunning = true → overlay appears → first PCM buffer arrives Problems:
As a result, the overlay and start sound told the user it was safe to speak before AudioCapturePipeline had received a single PCM buffer. If the user started speaking immediately, the beginning of the phrase could be lost. Correct flowHotkey → backend starts → first PCM buffer arrives → 500 ms of active recording → start sound + overlay |
|
Thanks for explanation. I understand the PR and the purpose ofc. This is more like a patch instead of solving the root problem which is time to capture first audio. |
Description
Starts audio capture before presenting the dictation UI so the beginning of a spoken phrase is retained.
This PR:
Type of Change
Related Issue or Discussion
Related to #477, #236, and #592.
Testing
swiftlint --strict --config .swiftlint.yml Sourcesswiftformat --config .swiftformat SourcesAdditional validation:
com.FluidApp.local.Screenshots / Video
The existing overlay appearance and layout are unchanged. This PR only changes when the existing overlay and start sound are presented relative to active audio capture.
Notes