@loyslow/opencode-voice-groqGroq voice input plugin for OpenCode
0
204
166 in 7 days
32.4
Multi-signal model
1 month ago
2026-07-12
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@loyslow/opencode-voice-groq@0.1.2"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@loyslow/opencode-voice-groq@0.1.2"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @loyslow/opencode-voice-groqopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Cloud-based, ultra-fast speech-to-text for the OpenCode TUI.
English | Русский | 简体中文 | Español
This is a fork of the original opencode-voice. Instead of downloading heavy models and processing audio locally (which consumes CPU/GPU and takes time), this plugin uses Groq's LPU inference engine. Audio is recorded, aggressively compressed to m4a (AAC) on-the-fly, stripped of silence, and transcribed in milliseconds.
Installation
One command through OpenCode:
opencode plugin @loyslow/opencode-voice-groq
Restart OpenCode after installing. First launch will ask for a Groq API key to use their ultra-fast LPU inference engine. The plugin uses ffmpeg automatically.
Optional CLI installer. It runs the same OpenCode plugin install command:
npx @loyslow/opencode-voice-groq install
Do not clone the repo unless you want to develop the plugin.
[!TIP] First launch opens a setup prompt. Enter your free Groq API key, choose your preferred Whisper model, then use
ctrl+rto dictate into the prompt.
Requirements
The plugin relies on Groq's API and requires a recording engine:
- uses
ffmpegfrom your system, or downloads a managedffmpeg-staticfallback - saves compressed
m4arecordings to~/.cache/opencode-voice-groq/recordings/temporarily - uses your provided
groqApiKeyfor transcription
Get your free API key at Groq Console.
Usage
Commands:
/voice- toggle recording and append transcription/voice-submit- toggle recording, append transcription, and submit/voice-stop- cancel active recording or transcription/voice-settings- open model, hotkeys, microphone, and Groq quotas settings
Default hotkey:
ctrl+r -> start recording
ctrl+r -> stop, transcribe, and append
You can configure a cancel hotkey in /voice-settings.
Models
Available now through Groq API:
| Model | Inference Speed | Notes |
|---|---|---|
| Whisper Large v3 | Ultra-fast | highly accurate, multilingual |
| Whisper Large v3 Turbo | Insanely fast | slightly faster, great accuracy |
The plugin enforces local RPM tracking (Fail-Fast Quota Protection) to prevent you from recording if you've hit your free API limits, saving you time. Audio is compressed to m4a with silence removal to optimize bandwidth.
Platform Status
| Platform | Status |
|---|---|
| Linux | one-command install; recording uses arecord, ffmpeg, or sox |
| macOS | one-command install; recording uses ffmpeg AVFoundation |
| Windows | one-command install; recording uses DirectShow through a managed cached ffmpeg.exe, with system/bundled ffmpeg fallback |
Architecture
The package follows the public OpenCode TUI plugin shape used by community plugins.
- npm package exports
./tui - local development can point
tui.jsonat an absolute path - published install uses
opencode plugin @loyslow/opencode-voice-groq - runtime settings live in OpenCode TUI plugin storage
Files:
index.js- TUI plugin entrypoint, commands, dialogs, keymap layer, auto-updaterlib/download.js- utility for fetching the fallback recorderlib/engine.js- recorder selection, managed Windows recorder install, and Groq APIfetchimplementationbin/cli.js- install wrapper CLI
Voice input needs native audio recording. The JS plugin manages OpenCode UI, settings, engine downloads, and fast API integration.
Roadmap
- Faster streaming-style transcription via WebSockets
- Further audio compression tuning
Development
Run checks:
npm run prepack
npm pack --dry-run
This MVP has no build step.
Development install from a checkout:
git clone https://github.com/loyslow-dev/opencode-voice-groq.git opencode-voice-groq
cd opencode-voice-groq
opencode plugin "$(pwd)"
Project Status
This is an independent OpenCode plugin. It is not built by the OpenCode team and is not affiliated with OpenCode.
Credits
- OpenCode wordmark SVG adapted from the public OpenCode repository. The
voicemark was added for this plugin. - This is a fork of the original opencode-voice project created by
@ihxnnxs.