Skip to content

feat: add speech-to-text dictate command for voice diary entries - #23

Merged
chris-regnier merged 2 commits into
mainfrom
claude/add-speech-to-text-PbZcH
Apr 12, 2026
Merged

feat: add speech-to-text dictate command for voice diary entries#23
chris-regnier merged 2 commits into
mainfrom
claude/add-speech-to-text-PbZcH

Conversation

@chris-regnier

Copy link
Copy Markdown
Owner

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

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

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@chris-regnier
chris-regnier merged commit 4b60cfd into main Apr 12, 2026
2 of 4 checks passed
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.

3 participants