feat(voice): dictation in the tui, desktop, and vs code - #47
Merged
Merged
Conversation
Git exports GIT_DIR and GIT_INDEX_FILE to hooks. environment_note_snapshots_git_state runs git init and git commit in a temp dir, and with those set from a worktree it committed into the real repository and set core.bare=true in the shared config.
Adds the aster-voice crate: default microphone capture through cpal on macOS and Windows, WAV encoding, and ElevenLabs Scribe and OpenAI transcription. The chat TUI toggles listening with ctrl+r and inserts the transcript into the composer.
Adds aster dictate, which records until stdin gets a line and prints NDJSON events. The desktop app and the VS Code extension run it from a new composer mic button. The desktop bundle declares microphone use.
The plain sentence becomes the notification and the provider detail goes to the Aster output channel. The dev host relays dictation so the mic button works there too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Steps 1 and 2 of #46: dictation in the TUI, the desktop app and VS Code.
What changes
aster-voicecrate. Records from the default microphone, encodes mono 16-bit WAV, and transcribes with ElevenLabs Scribe (ELEVENLABS_API_KEY) or OpenAIgpt-4o-transcribe(OPENAI_API_KEY), in that order.● listening · ctrl+r to stop, thentranscribing…. Failures appear as one plain sentence with the provider detail below it.aster dictate. A new command that records until stdin gets a line or closes, then prints NDJSON:listening,transcribing, thentranscript(text) orerror(message,detail). The desktop app and VS Code use it. Neither has a channel to the CLI before a message is sent, so this leaves the--streamand ACP contracts alone.start_dictation,stop_dictationandcancel_dictation. The bundle gains thecom.apple.security.device.audio-inputentitlement andNSMicrophoneUsageDescription, without which the hardened runtime kills the process when it opens the mic.dictationmessage pair is added toprotocol.ts, and the dev host relays it too.aster key listgains a Voice group;--jsonrows gain"group": "Voice", which is additive.docs/CONFIG.mddocuments voice input.GIT_DIR,GIT_INDEX_FILE, and related vars. Committing from a worktree letenvironment_note_snapshots_git_statecommit into the real repository and setcore.bare=true.New dependency: cpal
Microphone capture needs a native audio API.
cpalis only a target dependency on macOS and Windows, where CoreAudio and WASAPI need no system libraries. On Linux it would pull in ALSA headers and break the static musl and Android release builds, so Linux reports that voice input is not available yet.Context and limits
Nothing is added to model-visible context: a transcript lands in the composer and is sent like typed text. Recordings stop after 5 minutes (
MAX_RECORDING), and the sample buffer is capped to match.Testing
make checkandmake desktop-checkpass. VS Code typechecks, andvitestpasses (325 tests), including newsrc/dictation.test.ts.aster dictateran on macOS with the real microphone:listening, click,transcribing, then the error, with button states and labels checked at each step.Found, not fixed
desktop/src-tauri/src/lib.rs: thechatcommand takes the child's stdin into a local and never stores it, soanswer_approvalnever reaches the CLI.🤖 Generated with Claude Code