feat: add speech-to-text dictate command for voice diary entries - #23
Merged
Conversation
Add a new `diaryctl dictate` command that records audio from the microphone and transcribes it using locally-installed STT engines (Whisper, NVIDIA Parakeet, or custom commands), saving the result as a diary block. New packages: - internal/audio: pluggable audio recording via sox/arecord/ffmpeg - internal/transcribe: pluggable transcription with Whisper, Parakeet, and generic command backends - internal/ui/recording: Bubble Tea recording indicator with timer The command supports --file (existing audio), --transcribe-only, --edit, --date, --attr, and --engine flags. Configuration via [dictate] section in config.toml. https://claude.ai/code/session_012u6Zm4va5JeCLNG1mPM1yk
There was a problem hiding this comment.
gavel found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Security: - Fix command injection in parakeet.go by passing model name and audio path as sys.argv instead of interpolating into Python script string Bugs: - Fix race condition in recorder.go: replace exec.CommandContext with exec.Command + manual SIGINT so recording tools can flush WAV headers before exiting, preventing corrupt output files - Wire up the --engine flag in dictate.go so it actually creates a transcriber at runtime instead of being silently ignored - Fix strings.Fields path splitting in command.go by using sh -c for correct handling of paths with spaces Tests: - Add test for transcriber error propagation - Add test for --engine flag runtime resolution https://claude.ai/code/session_012u6Zm4va5JeCLNG1mPM1yk
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.
Add a new
diaryctl dictatecommand that records audio from themicrophone and transcribes it using locally-installed STT engines
(Whisper, NVIDIA Parakeet, or custom commands), saving the result
as a diary block.
New packages:
and generic command backends
The command supports --file (existing audio), --transcribe-only,
--edit, --date, --attr, and --engine flags. Configuration via
[dictate] section in config.toml.
https://claude.ai/code/session_012u6Zm4va5JeCLNG1mPM1yk