跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    loyslow-dev

    Voice Groq

    v0.1.2模型接入
    @loyslow/opencode-voice-groq

    Groq voice input plugin for OpenCode

    GitHub 星标

    0

    月装机量

    204

    近 7 天 166

    综合评分SCORE

    32.4

    生态多维模型

    最近提交

    1 个月前

    2026-07-12

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@loyslow/opencode-voice-groq@0.1.2"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    opencode voice groq logo

    Cloud-based, ultra-fast speech-to-text for the OpenCode TUI.

    status npm version npm downloads license opencode stt

    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+r to dictate into the prompt.

    Requirements

    The plugin relies on Groq's API and requires a recording engine:

    • uses ffmpeg from your system, or downloads a managed ffmpeg-static fallback
    • saves compressed m4a recordings to ~/.cache/opencode-voice-groq/recordings/ temporarily
    • uses your provided groqApiKey for 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.json at 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-updater
    • lib/download.js - utility for fetching the fallback recorder
    • lib/engine.js - recorder selection, managed Windows recorder install, and Groq API fetch implementation
    • bin/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 voice mark was added for this plugin.
    • This is a fork of the original opencode-voice project created by @ihxnnxs.

    OpenCode Website | Docs | Discord