opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Add voice-to-text transcription feature

Open LakshmanTurlapati opened this issue 2 months ago • 1 comments

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 ✨

LakshmanTurlapati avatar Nov 03 '25 16:11 LakshmanTurlapati

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?

dzianisv avatar Dec 09 '25 06:12 dzianisv