opencode
opencode copied to clipboard
Add voice-to-text transcription feature
Summary
Added voice-to-text transcription to OpenCode CLI. Click "Notate", speak, click "Stop" - transcribed text appears in input.
Changes
-
New:
src/util/whisper.ts- Whisper API integration -
New:
src/util/audio.ts- Audio recording (sox/arecord) -
Modified:
src/config/config.ts- Optional whisper config -
Modified:
src/cli/cmd/tui/component/prompt/index.tsx- Notate/Stop buttons
Requirements
brew install sox # macOS
opencode auth login # Uses existing OpenAI key
Usage
bun install && cd packages/opencode && bun dev
Click "Notate" → speak → click "Stop" → text appears ✨
This will be cool, if local whisper could be used, so no need in API keys and API usage. What do you think? Looks like this PR is abandoned, isn't it?