Use Cases › Fully Local Voice Coding with OpenCode
🔒
Fully Local Voice Coding with OpenCode
The Problem
Cloud AI services require internet, send code to third parties, and have latency. Some projects require air-gapped development.
The Solution
Combine OpenCode interrupt with Ollama for a 100% local voice coding pipeline. Everything runs on your machine — LLM inference, transcription, and TTS.
Workflow
- Install Ollama and pull a model (
ollama pull codellama or similar). Configure OpenCode to use the local Ollama endpoint.
- Add the interrupt plugin. Install whisper.cpp with the small or medium model for local transcription.
- Install sox for mic access. Edge-tts caches voice data after first use for offline TTS.
- Start OpenCode. Type /ptt to speak, hear responses via TTS, interrupt with voice. All processing is local.
- No data ever leaves your machine. No API keys needed. Works fully offline after initial setup.
Tips
• Use the medium whisper model for best local transcription accuracy. It's 1.5GB but provides results close to OpenAI API.
• Ollama models vary in quality. Mistral and CodeLlama are good for coding. Llama 3 provides the best overall responses.
• Edge-tts needs internet only for the first request per voice. After that, voice data is cached locally.