Voice input plugin for ZCode: a dictation panel and a /voice command. Speak → get text → send it straight to the chat.
- Source code and updates: https://github.com/machine202502/zcode-voice
- Need dictation outside ZCode? Voice Button — a standalone offline dictation app for Windows (tray button, clipboard, MIT).
Recognition is fully local and offline via sherpa-onnx on CPU. No GPU, no internet, no cloud APIs.
Works with several ONNX model families and languages — Russian, English, Chinese and more:
| Model | Languages | Size | Note |
|---|---|---|---|
| GigaAM v3 | ru | ~214 MB | best Russian accuracy (default) |
| SenseVoice Small | zh, en, ja, ko, yue | ~226 MB | fastest for Chinese, auto language |
| Whisper tiny / base / small | 99 languages (en, ru, zh, …) | ~99 / 153 / 358 MB | multilingual, auto-detect |
| Paraformer zh | zh, en | ~232 MB | Chinese with punctuation |
| FunASR-nano (Qwen3) | zh, en, ja, ko, yue | ~1 GB | Qwen3-0.6B based, most accurate, slower |
Any other ONNX model supported by sherpa-onnx-offline can be pointed to as a local folder (NeMo CTC, SenseVoice, Whisper, Paraformer, Transducer, TeleSpeech, FunASR-nano).
- 🎙 Voice panel (New tab → App plugins → Voice):
● Record→ live mic waveform + timer → colored progress (🔴 mic start / 🟡 recording / 🟢 transcription) → editable text →⧉ Copy/⤴ To chat/✕ Clear - ⤴ To chat — sends the recognized text as your chat message in one click (the host asks for confirmation — by design)
- 💬
/voicecommand — hands-free dictation right in the chat: records, auto-stops after a pause, and the recognized text becomes your message - 🤫 End of phrase detection: adaptive silence threshold (background calibration), auto-stop after 1.5 s of silence, 8 s no-speech timeout
- 🌍 UI in English, Russian and Chinese — picked from the host locale, switchable in Settings
- 🔒 Private: audio never leaves your machine
- 🪟 Windows (server-side recording via ffmpeg dshow)
- Clone or download:
git clone https://github.com/machine202502/zcode-voice.git - In ZCode: Plugin Marketplace → Add → Add Plugin Marketplace → point to the cloned folder (the one with
marketplace.jsonat its root) - Personal → zcode-voice → Install
- The first recording auto-downloads the engine + model (~224 MB, one time) into the user data directory. No Node/Python required — everything ships inside the plugin.
Everything is configured in the panel itself: Voice panel → ⚙ Settings. There are three components — engine, model, ffmpeg — and each one can be:
| Source | What happens |
|---|---|
| Auto | the plugin downloads its built-in pinned build (verified by SHA-256) |
| Local build | you point to your own files; nothing is downloaded, the plugin only checks they work |
| Specific version | pick a version from the list → Install; the plugin resolves the asset and its SHA-256 from GitHub and downloads it |
| Component | Local path to give | Picker |
|---|---|---|
Engine (sherpa-onnx) |
sherpa-onnx-offline.exe or its folder |
✔ every release with win-x64-shared-MD-Release |
| Model (ASR) | a folder with the model files (+ language and family) | ✔ the built-in model list above |
ffmpeg |
ffmpeg.exe (must support dshow) |
✔ every BtbN win64-gpl build |
For a local model, pick its type if the file names do not make it obvious: nemo-ctc, sense-voice, whisper, paraformer, transducer, telespeech, funasr-nano. whisper and transducer are detected automatically from encoder/decoder/joiner in the file names.
Installs run in the background: the panel shows phase and MB / MB (%). Every download is hashed while streaming and rejected on mismatch — a version is never "close enough". The list of versions is cached for 6 hours; ↻ refreshes it.
The panel itself is localized: English, Russian, Chinese. The language comes from the ZCode locale and can be switched at the bottom of the Settings tab; the choice is stored in settings.json and is also used for the plugin's own messages.
Settings live in <data dir>/settings.json (Windows: %LOCALAPPDATA%\zcode-voice). The panel has priority; the Advanced fields below are the fallback for headless setups.
Settings → Plugin Management → Installed → zcode-voice → Advanced (env vars for the plugin server):
| Field | Env |
|---|---|
engine_path |
ZCODE_VOICE_ENGINE_PATH |
model_path |
ZCODE_VOICE_MODEL_PATH |
ffmpeg_path |
ZCODE_VOICE_FFMPEG_PATH |
If you already have ffmpeg with dshow (e.g. winget install Gyan.FFmpeg), set ffmpeg_path or PATH — the plugin uses it and downloads nothing.
| What | How |
|---|---|
| Dictate (panel) | Voice panel → ● Record → speak → pause → edit → ⤴ To chat or ⧉ Copy |
| Dictate (chat) | Type /voice → speak → pause → the text is inserted as your message |
| Transcribe a WAV | Ask the agent (tool voice_transcribe) |
| Diagnostics | Ask the agent (tool voice_status) |
- Recording: Windows — ffmpeg dshow (16 kHz mono WAV, streamed to disk per packet so short takes are never lost)
- End of phrase: adaptive threshold — the background level is calibrated during the first 1.5 s; speech must exceed it, then 1.5 s of silence finishes the take
- Recognition:
sherpa-onnx-offlinewith the selected ONNX model (int8), CPU only - Punctuation: a capital letter and a period for Latin/Cyrillic,
。for CJK (raw models emit bare text)
Audio stays on your machine (recordings/ inside the plugin data directory). Recognition is offline; only the recognized text goes to the model.
- Reference architecture: machine202502/dsh-voice-ext (GigaAM v3 CTC + sherpa-onnx, MIT)
- Engine: k2-fsa/sherpa-onnx (Apache-2.0)
- Models (ONNX conversions by csukuangfj): GigaAM v3 · SenseVoice · Whisper · Paraformer · FunASR-nano
MIT © 2026 machine202502.
Third-party components are downloaded at first run and keep their own licenses: sherpa-onnx (Apache-2.0); the ASR models — GigaAM (MIT), Whisper (MIT), SenseVoice, Paraformer and FunASR-nano (Apache-2.0); and the ffmpeg build — GPL-licensed binaries from BtbN/FFmpeg-Builds, fetched from a pinned release tag and verified against a SHA-256 hash. If you already have ffmpeg with dshow support on PATH, the plugin uses yours and downloads nothing.
Голосовой ввод для ZCode: панель диктовки и команда /voice. Говоришь → получаешь текст → отправляешь прямо в чат.
- Исходный код и обновления: https://github.com/machine202502/zcode-voice
- Нужна диктовка вне ZCode? Voice Button — отдельное приложение диктовки для Windows: кнопка в трее, текст в буфер обмена, MIT.
Распознавание полностью локальное и офлайн через sherpa-onnx на CPU. Без GPU, без интернета, без облачных API.
Поддерживаются несколько семейств ONNX-моделей и языков — русский, английский, китайский и другие:
| Модель | Языки | Размер | Особенность |
|---|---|---|---|
| GigaAM v3 | ru | ~214 МБ | лучшая точность для русского (по умолчанию) |
| SenseVoice Small | zh, en, ja, ko, yue | ~226 МБ | самая быстрая для китайского, язык auto |
| Whisper tiny / base / small | 99 языков (en, ru, zh, …) | ~99 / 153 / 358 МБ | многоязычная, определяет язык сама |
| Paraformer zh | zh, en | ~232 МБ | китайский с пунктуацией |
| FunASR-nano (Qwen3) | zh, en, ja, ko, yue | ~1 ГБ | на базе Qwen3-0.6B, точнее всех, медленнее |
Любую другую ONNX-модель, которую понимает sherpa-onnx-offline, можно подключить как локальную папку (NeMo CTC, SenseVoice, Whisper, Paraformer, Transducer, TeleSpeech, FunASR-nano).
Возможности: панель Voice с живой индикацией уровня и цветным прогрессом; кнопка «To chat» отправляет текст сообщением в чат; команда /voice — диктовка без рук прямо в чат с автостановкой по тишине; адаптивный порог шума; аудио не покидает машину; интерфейс на русском, английском и китайском (язык берётся из ZCode, переключается в настройках).
Установка:
git clone https://github.com/machine202502/zcode-voice.git- ZCode → Plugin Marketplace → Add → Add Plugin Marketplace → указать каталог клона (где лежит
marketplace.json) - Personal → zcode-voice → Install
- Первая запись автоматически скачает движок и модель (~224 МБ, один раз)
Как пользоваться: панель — «Record» → говорите → пауза → правьте → «To chat» или «Copy»; либо /voice → говорите → пауза → текст сам встанет вашим сообщением; расшифровать WAV или продиагностировать — просто попросите агента (инструменты voice_transcribe и voice_status).
Настройки — прямо в панели: вкладка ⚙ Settings. Для каждого компонента (движок sherpa-onnx, модель распознавания, ffmpeg) можно выбрать:
- Auto — плагин скачивает выбранную модель/сборку с проверкой SHA-256 (у модели можно выбрать язык распознавания);
- Локальная сборка — путь к своим файлам (
sherpa-onnx-offline.exeили папке, папке с моделью,ffmpeg.exe); ничего не скачивается, плагин только проверяет работоспособность. Для локальной модели при неочевидных именах файлов укажите тип: nemo-ctc / sense-voice / whisper / paraformer / transducer / telespeech / funasr-nano (whisper и transducer определяются сами); - Конкретная версия — список версий с GitHub, кнопка Install: плагин сам находит нужный ассет и его SHA-256 и качает с прогрессом. Подмена хеша отменяет установку.
Язык интерфейса панели — русский / английский / китайский: подхватывается из локали ZCode и переключается внизу вкладки «Настройки»; выбор хранится в settings.json и используется также для сообщений плагина.
Настройки хранятся в <каталог данных>\settings.json (Windows: %LOCALAPPDATA%\zcode-voice) и имеют приоритет над полями в Advanced (engine_path, model_path, ffmpeg_path) — те оставлены для headless-сценариев.