mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Three fixes for the push-to-talk dictation experience: 1. **Streaming partial transcripts**: The STT engine now flushes a partial transcript every ~2 seconds of continuous speech (DICTATION_PARTIAL_FLUSH_SAMPLES). Previously, text only appeared after a silence gap or when the user released the key. Now text streams into the composer while you're still speaking. 2. **Final flush on shutdown**: When the STT worker exits (key released or stop_dictation called), it flushes any remaining speech buffer before shutting down. Previously, speech accumulated since the last silence gap was silently discarded. 3. **Suppress macOS accent picker**: Holding ⌘D triggered the macOS press-and-hold accent character popup (showing ð, đ, etc.). Fixed by setting ApplePressAndHoldEnabled=false for the app's bundle ID at startup. Also fixes the event ordering: the 'dictation-state: stopped' event is now emitted by the forwarder task after all pending transcripts have been delivered, ensuring the frontend receives the final text before the stopped signal.