Skip to content

feat(macos): add Handy and custom command transcription adapters - #76

Open
lmn451 wants to merge 14 commits into
humanitas-labs:masterfrom
lmn451:feat/handy-transcription-engine
Open

lmn451 wants to merge 14 commits into
humanitas-labs:masterfrom
lmn451:feat/handy-transcription-engine

Conversation

@lmn451

@lmn451 lmn451 commented Oct 6, 2026 •

Copy link
Copy Markdown

Quill currently runs Parakeet regardless of the configured engine. This adds a shared provider facade and local command adapter host, so users can reuse Handy's installed models or connect other local engines without editing Quill.

Closes #75.

Behavior and design

  • Keep native Parakeet as the default. The coordinator and doctor select providers through TranscriptionProvider, over the existing TranscriptionEngine protocol.
  • Add a Handy adapter for its headless --transcribe-file / --json CLI. Validate CLI capabilities and the configured model's download status before transcription; support an explicit executable path.
  • Add engine: "command" with an executable, literal argument templates ({audio}, {model}), provenance, chunk size, and timeout settings. Other local engines can use a wrapper implementing the documented text-or-timed-segments JSON contract.
  • Share streaming conversion to 16 kHz mono PCM16 WAV chunks, frame-derived offsets, timestamp validation, and temporary-file cleanup.
  • Run commands without shell expansion in isolated process groups. Drain stdout and stderr concurrently through bounded pipes, enforce output limits and deadlines, retain error diagnostics, and clean up wrapper children on success, failure, or timeout.
  • Reject malformed or unreadable provider configuration, unknown engines, and NUL bytes in arguments. Provider, missing-input, source I/O, conversion, and temporary-file failures leave sessions pending for retry; known malformed or empty source recordings remain skippable.
  • Document configuration, the JSON contract, adapter extension points, validation commands, and operational limits; update the changelog.

This ports the local Handy prototype to the current macos/ layout and makes the command host reusable. Native WhisperKit, language routing, translation, and cloud adapters remain outside this change; #69 covers the separate WhisperKit work.

Validation

  • Full Swift suite with installed-Handy tests enabled: 60 tests passed, with no skips or failures, at 0ffcee14a24e1598a36e0f4388da5d8f366cfcf2.
  • Real Handy transcription through both the Handy adapter and a generic command adapter, using synthetic speech generated with macOS say and the already-installed model.
  • Behavioral coverage includes recorded AAC-in-CAF conversion, resampling/downmixing, chunk boundaries and silence offsets, literal arguments, output limits, wrapper-child cleanup, timeouts, malformed JSON/timestamps, model readiness, malformed configuration files, NUL rejection, and pending-session persistence/retry after provider failure or a missing input. The timeout fixture also passed five repeated runs after allowing for process startup on a busy host.
  • Live quill doctor and isolated quill run smoke scenarios checked provider selection, configured-command transcription, failure/retry persistence, literal arguments, and timeout behavior. No personal recordings or model downloads were used.
  • Release build, strict formatting for changed Swift files, and git diff --check passed. Review findings were addressed through no-mistakes.
  • CI verification was explicitly skipped: this PR has no registered build/test checks, and upstream only lists a dynamic Copilot review workflow. This is not a claim of green CI.

Limits

Handy's current file API returns text without word timestamps, so it produces one segment per nonempty chunk (at most five minutes). Each chunk reloads the model and can lose linguistic context at its boundary. Custom commands must perform local inference to preserve Quill's local-only behavior; doctor checks their executable, while model/output compatibility requires a test recording.

The final documentation-only update leaves the tested source unchanged.

@lmn451 lmn451 changed the title feat(macos): add Handy and custom command transcription adapters feat(macos): add Handy and configurable transcription providers Oct 7, 2026
@lmn451 lmn451 changed the title feat(macos): add Handy and configurable transcription providers feat(macos): add Handy and local command transcription providers Oct 7, 2026
@lmn451 lmn451 changed the title feat(macos): add Handy and local command transcription providers feat(macos): add Handy and custom command transcription adapters Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support local transcription provider adapters, including Handy and custom commands

1 participant