Preserve dictation output order #44

Merged
lost-rob0t merged 1 commit from fix/zara-011-dictation-ordering into fix/zara-010-tts-contracts 2026-07-19 01:44:09 +00:00
lost-rob0t commented 2026-07-19 01:42:07 +00:00 (Migrated from github.com)

What

  • centralize the complete dictation stop-phrase table in zara.dictate and normalize case, spacing, and punctuation
  • replace the divergent 400-line script implementation with a thin launcher into the canonical module
  • assign sequence numbers at chunk submission and commit completed transcription futures strictly in capture order
  • reset per-run events, queues, and input state while cleaning PID files, threads, futures, and executors in finally
  • load configured dictation phrases when the CLI flag is absent and make queue overflow deterministically retain the newest input

Why

The two dictation implementations had diverged, later futures could type before earlier captured audio, and exceptional exits could leave process state behind for later runs.

Impact

Parallel transcription remains enabled without reordering typed speech. Default, environment, CLI, and config stop phrases share one normalization path, and repeated in-process starts are clean.

Validation

  • nix develop -c scripts/test-dictation.sh
  • nix develop -c bash -c 'pytest && for test_script in scripts/test-*.sh; do bash "$test_script"; done'
  • nix build

Closes #12

## What - centralize the complete dictation stop-phrase table in `zara.dictate` and normalize case, spacing, and punctuation - replace the divergent 400-line script implementation with a thin launcher into the canonical module - assign sequence numbers at chunk submission and commit completed transcription futures strictly in capture order - reset per-run events, queues, and input state while cleaning PID files, threads, futures, and executors in `finally` - load configured dictation phrases when the CLI flag is absent and make queue overflow deterministically retain the newest input ## Why The two dictation implementations had diverged, later futures could type before earlier captured audio, and exceptional exits could leave process state behind for later runs. ## Impact Parallel transcription remains enabled without reordering typed speech. Default, environment, CLI, and config stop phrases share one normalization path, and repeated in-process starts are clean. ## Validation - `nix develop -c scripts/test-dictation.sh` - `nix develop -c bash -c 'pytest && for test_script in scripts/test-*.sh; do bash "$test_script"; done'` - `nix build` Closes #12
Sign in to join this conversation.
No description provided.