stacklok / stacklok/mecatl

Add voice dictation to mecatui

Open
#813 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement tui ux
Dominant language
Go
Stars
152
Forks
16
Avg merge
14h 48m
Merged PRs (30d)
536

Description

Problem

Long prompts are cumbersome to type in mecatui, and the TUI has no microphone-to-text workflow. Users have to leave the terminal, dictate elsewhere, and paste the result back into the composer.

Claude Code provides useful prior art: opt-in voice dictation with hold-to-record and tap-to-record modes, visible recording state, and editable transcription inserted into the prompt.

Proposed experience

Add opt-in voice dictation to mecatui:

  • Add /voice controls to enable, disable, and choose hold or tap mode.
  • Support a configurable push-to-talk key. A single press must retain its normal typing behavior when dictation does not activate.
  • Show clear textual states such as warmup, listening, transcribing, and failure.
  • Insert finalized transcription at the current cursor position without losing existing typed text.
  • Keep the transcript editable before submission; do not auto-submit by default.
  • Gracefully explain unavailable microphones, denied permissions, unsupported/headless or remote environments, missing recorder dependencies, and transcription failures.
  • Persist the enabled mode and key binding in user settings.

Privacy and architecture

Voice mode must clearly disclose where audio is transcribed and require explicit opt-in before audio leaves the machine. Prefer reusing a daemon-side transcription capability so TUI and WebUI behavior can converge rather than coupling mecatui directly to one hosted speech service.

This overlaps with the backend transcription gap tracked in #725, but this issue covers the mecatui interaction, terminal audio capture, settings, and error states.

Acceptance criteria

  • A user can enable and disable dictation from mecatui.
  • Hold and tap recording modes work without preventing ordinary space entry.
  • Recording/transcription state is visible in text, not conveyed by animation or color alone.
  • Transcribed text is inserted at the cursor and can be edited before sending.
  • Existing composer content is preserved across recording, success, cancellation, and errors.
  • The push-to-talk binding and mode are configurable and persist across sessions.
  • Unsupported environments and permission/device/service failures produce actionable errors.
  • The UI discloses whether transcription is local or remote before first use.
  • Tests cover key handling, composer insertion, cancellation, and failure states.
  • Help and configuration documentation describe setup, privacy behavior, shortcuts, and platform limitations.

Prior art

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing mecatui interaction and settings paths, then read the related transcription gap in #725. Map how key handling, composer editing, terminal audio capture, and daemon-side transcription can meet the acceptance criteria. Done means opt-in recording works in hold and tap modes, preserves editable text, persists settings, reports failures clearly, and includes tests and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.