<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Francarlos Jose Blanco Hererra</title>
    <description>The latest articles on DEV Community by Francarlos Jose Blanco Hererra (@evious).</description>
    <link>https://dev.to/evious</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4275232%2Ffeebc93e-9752-4db6-aaa0-bea216ef1b82.png</url>
      <title>DEV Community: Francarlos Jose Blanco Hererra</title>
      <link>https://dev.to/evious</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/evious"/>
    <language>en</language>
    <item>
      <title>Local Voice Dictation &amp; Read-Aloud for OpenCode Desktop and TUI (WhisperX, whisper.cpp &amp; Windows)</title>
      <dc:creator>Francarlos Jose Blanco Hererra</dc:creator>
      <pubDate>Tue, 01 Dec 2026 00:35:22 +0000</pubDate>
      <link>https://dev.to/evious/local-voice-dictation-read-aloud-for-opencode-desktop-and-tui-whisperx-whispercpp-windows-12i0</link>
      <guid>https://dev.to/evious/local-voice-dictation-read-aloud-for-opencode-desktop-and-tui-whisperx-whispercpp-windows-12i0</guid>
      <description>&lt;p&gt;Dictating long prompts and listening to model responses without leaving your workflow is much faster when voice input and text-to-speech live directly inside &lt;strong&gt;OpenCode&lt;/strong&gt;. &lt;strong&gt;&lt;code&gt;opencode-voice-dictation&lt;/code&gt;&lt;/strong&gt; (V2) adds voice dictation and read-aloud support to both &lt;strong&gt;OpenCode Desktop&lt;/strong&gt; (&lt;code&gt;gui-experimental&lt;/code&gt;) and the &lt;strong&gt;OpenCode TUI&lt;/strong&gt; across Windows and Linux.&lt;/p&gt;

&lt;p&gt;This guide covers how the plugin works under the hood, how to install and configure it, and how to set up &lt;strong&gt;WhisperX&lt;/strong&gt; (via WSL2 + NVIDIA GPU), &lt;strong&gt;whisper.cpp&lt;/strong&gt; (Linux), and &lt;strong&gt;Windows&lt;/strong&gt; environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Installation &amp;amp; Updates
&lt;/h2&gt;

&lt;p&gt;Install the plugin from npm or directly from GitHub (the &lt;code&gt;dist/&lt;/code&gt; bundle is committed in the repository):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;opencode plugin add opencode-voice-dictation
&lt;span class="c"&gt;# Or directly from the repository:&lt;/span&gt;
&lt;span class="c"&gt;# opencode plugin add github:evious/opencode-voice-dictation&lt;/span&gt;

To update later:

&lt;span class="sb"&gt;`opencode plugin update opencode-voice-dictation`&lt;/span&gt;

Restart OpenCode Desktop or the TUI after installing. The plugin registers &lt;span class="k"&gt;in&lt;/span&gt; the global opencode.json of the environment where you run the command.

Manual / Development Build
If you are building from &lt;span class="nb"&gt;source&lt;/span&gt; or testing changes locally:


&lt;span class="sb"&gt;`npm install
npm run typecheck
npm run build
npm test`&lt;/span&gt;


npm run build outputs dist/gui-experimental.cjs.

npm run dev rebuilds on changes so OpenCode Desktop can reload the plugin.

For manual Desktop setup on Windows, copy package.json, dist/gui-experimental.cjs, and src/index.ts into a folder &lt;span class="o"&gt;(&lt;/span&gt;such as C:\Users\&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;user&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;\opencode-plugins\voice-dictation&lt;span class="o"&gt;)&lt;/span&gt; and reference it &lt;span class="k"&gt;in&lt;/span&gt; the global opencode.json &lt;span class="o"&gt;(&lt;/span&gt;C:\Users\&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;user&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;\.config\opencode\opencode.json&lt;span class="o"&gt;)&lt;/span&gt;. If you build inside WSL, copy the folder to a Windows path rather than pointing Desktop to a Linux path.


Architecture: How Dictation &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; Playback Work
The plugin splits responsibilities across the Desktop renderer &lt;span class="o"&gt;(&lt;/span&gt;Solid&lt;span class="o"&gt;)&lt;/span&gt;, the Electron main process, the server/RPC layer &lt;span class="o"&gt;(&lt;/span&gt;src/index.ts, src/rpc.ts&lt;span class="o"&gt;)&lt;/span&gt;, and the TUI &lt;span class="o"&gt;(&lt;/span&gt;./tui&lt;span class="o"&gt;)&lt;/span&gt;.

&lt;span class="sb"&gt;`[Desktop Window (Solid)]
  ├─ ComposerPill (🎤 Dictate / Read) ──▶ ctx.main(Dictation).start ──▶ Electron main IPC
  │        ▲                                                                 │
  │        └──── "final" event ──▶ composer.insert(text)                     ▼
  │                                                      powershell.exe -File dictation-&amp;lt;hash&amp;gt;.ps1
  └─ getUserMedia + MediaRecorder ──▶ RPC ──▶ Server (src/whisper / src/whispercpp / src/edge.ts)`&lt;/span&gt;

Key design details across platforms:

Windows Voice Typing &lt;span class="o"&gt;(&lt;/span&gt;Win+H&lt;span class="o"&gt;)&lt;/span&gt;: The default dictation path on Windows. The pill focuses the composer, the main process sends Win+H via keybd_event, and Windows types directly into the focused input without the plugin modifying text.

Offline System.Speech &lt;span class="o"&gt;(&lt;/span&gt;Windows&lt;span class="o"&gt;)&lt;/span&gt;: Runs via a PowerShell script &lt;span class="o"&gt;(&lt;/span&gt;dictation-&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;.ps1&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; %TEMP%\opencode-voice-dictation, emitting one JSON line per recognized phrase. Does not require internet, though it lacks automatic punctuation/capitalization and has lower accuracy than Whisper or Windows 11 dictation.

WhisperX &lt;span class="o"&gt;(&lt;/span&gt;Windows + WSL2 + NVIDIA GPU&lt;span class="o"&gt;)&lt;/span&gt;: Audio is written to %TEMP%\opencode-voice-dictation, passed to WSL, and processed by a persistent Python worker &lt;span class="o"&gt;(&lt;/span&gt;src/whisper/worker.py&lt;span class="o"&gt;)&lt;/span&gt; using CUDA/GPU. Audio stays on your machine.

whisper.cpp &lt;span class="o"&gt;(&lt;/span&gt;Linux&lt;span class="o"&gt;)&lt;/span&gt;: The renderer records with getUserMedia + MediaRecorder and sends audio over RPC to the server &lt;span class="o"&gt;(&lt;/span&gt;src/whispercpp/server.ts&lt;span class="o"&gt;)&lt;/span&gt;, which converts it with ffmpeg &lt;span class="o"&gt;(&lt;/span&gt;16 kHz WAV&lt;span class="o"&gt;)&lt;/span&gt; and queries a &lt;span class="kd"&gt;local&lt;/span&gt; whisper-server keeping the model &lt;span class="k"&gt;in&lt;/span&gt; memory. On first use on Linux, it can download the binary &lt;span class="o"&gt;(&lt;/span&gt;~10 MB&lt;span class="o"&gt;)&lt;/span&gt; and model &lt;span class="o"&gt;(&lt;/span&gt;base-q5_1, 57 MB, or small-q5_1, 180 MB&lt;span class="o"&gt;)&lt;/span&gt; into ~/.local/share/opencode-voice-dictation.

Text-to-Speech &lt;span class="o"&gt;(&lt;/span&gt;Read Aloud&lt;span class="o"&gt;)&lt;/span&gt;: Cleans Markdown &lt;span class="o"&gt;(&lt;/span&gt;src/speech-text.ts&lt;span class="o"&gt;)&lt;/span&gt;—stripping code fences, backticks, bolding, headings, and bullet markers &lt;span class="k"&gt;while&lt;/span&gt; keeping link text—splits text into sentences, and speaks using Edge neural voices online &lt;span class="o"&gt;(&lt;/span&gt;with automatic fallback to system/SAPI voices&lt;span class="o"&gt;)&lt;/span&gt;.

Setting Up WhisperX &lt;span class="o"&gt;(&lt;/span&gt;WSL + NVIDIA GPU&lt;span class="o"&gt;)&lt;/span&gt;
For higher-accuracy &lt;span class="kd"&gt;local&lt;/span&gt; transcription when you have an NVIDIA GPU and WSL2 ready:

Ensure WSL2, Python, CUDA, and a NVIDIA GPU are configured on your machine.

Authenticate with Hugging Face &lt;span class="o"&gt;(&lt;/span&gt;huggingface-cli login&lt;span class="o"&gt;)&lt;/span&gt; and accept the terms &lt;span class="k"&gt;for&lt;/span&gt; the pyannote VAD model &lt;span class="k"&gt;if&lt;/span&gt; prompted by WhisperX.

Open Settings → Voice Dictation &lt;span class="k"&gt;in&lt;/span&gt; OpenCode Desktop and &lt;span class="k"&gt;select&lt;/span&gt; WhisperX &lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;WSL&lt;span class="o"&gt;)&lt;/span&gt; as the dictation engine.

Configure:

Python environment path: Path to the Python executable inside your WhisperX venv.

WhisperX model: Defaults to large-v3-turbo &lt;span class="o"&gt;(&lt;/span&gt;or large-v3 / medium as needed&lt;span class="o"&gt;)&lt;/span&gt;.

Language: Automatic detection, or explicit es, en, pt.

Click Check WhisperX to start the worker and verify GPU and model availability.

Note: Expect the first WhisperX dictation to take ~10–30 seconds &lt;span class="k"&gt;while&lt;/span&gt; loading the model onto the GPU&lt;span class="o"&gt;;&lt;/span&gt; subsequent dictations are much faster.

Windows-Specific Notes
Speech recognition language pack: For System.Speech, install the speech recognition pack under Settings → Time &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; language → Language &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; region → &lt;span class="o"&gt;(&lt;/span&gt;Language&lt;span class="o"&gt;)&lt;/span&gt; → Options → Speech recognition &lt;span class="o"&gt;(&lt;/span&gt;a display pack alone is not enough&lt;span class="o"&gt;)&lt;/span&gt;. You can verify installed recognizers &lt;span class="k"&gt;in&lt;/span&gt; PowerShell:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Add-Type -AssemblyName System.Speech&lt;br&gt;
[System.Speech.Recognition.SpeechRecognitionEngine]::InstalledRecognizers() |&lt;br&gt;
  ForEach-Object { $_.Culture.Name }&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Microphone &amp;amp; permissions: Confirm your default input device in Settings → System → Sound → Input. Because the plugin spawns PowerShell scripts in %TEMP%\opencode-voice-dictation and sends Win+H via keybd_event, Windows or security tools like Kaspersky may prompt for permission on first run or block synthetic keystrokes—if Win+H is blocked, switch to System.Speech or WhisperX.Session safety: If you switch sessions while dictating, text is discarded with a warning so it is not inserted into the wrong session. Starting dictation in another window stops any active dictation elsewhere.Using the TUI (./tui)The TUI provides commands, shortcuts, and a clickable row above the composer (🎤 Dictar │ 🔊 Leer │ ⏸ Pausar):CommandShortcutBehavior/dictado&amp;lt;leader&amp;gt;d (Ctrl+X, then d)Windows: opens Win+H. Linux: records and transcribes with whisper.cpp./leer&amp;lt;leader&amp;gt;v (Ctrl+X, then v)Reads the last response aloud; stops if already reading./pausar (or /pausa)&amp;lt;leader&amp;gt;p (Ctrl+X, then p)Pauses or resumes playback (works with Edge; SAPI fallback has no real pause)./ajustes-voz—Opens TUI voice settings (model, language, insertion mode, voice, rate, etc.).


Linux TUI Dependencies &amp;amp; WSL
On Linux, ensure the OpenCode server runs on Linux so whisper.cpp is available, and install system tools:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;sudo apt install -y ffmpeg xdotool xclip&lt;/p&gt;
&lt;h1&gt;
  
  
  Optional fallback TTS engines:
&lt;/h1&gt;

&lt;p&gt;sudo apt install -y speech-dispatcher espeak-ng&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

Use xdotool + xclip on X11, or wtype + wl-clipboard on Wayland.

Under WSL, audio capture/playback works via WSLg/PulseAudio, while prompt insertion uses the Windows clipboard + SendKeys rather than xdotool.

TUI Configuration (opencode.jsonc &amp;amp; cli.json)
Configure initial TUI voice options in opencode.jsonc:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;{&lt;br&gt;
  "plugins": [&lt;br&gt;
    {&lt;br&gt;
      "package": "opencode-voice-dictation",&lt;br&gt;
      "options": {&lt;br&gt;
        "model": "base-q5_1",&lt;br&gt;
        "language": "auto",&lt;br&gt;
        "maxSeconds": 60,&lt;br&gt;
        "insert": "auto",&lt;br&gt;
        "engine": "edge"&lt;br&gt;
      }&lt;br&gt;
    }&lt;br&gt;
  ]&lt;br&gt;
}&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

insert options: auto (appendPrompt → xdotool/clipboard), type, clipboard, or append.

engine options: edge or system.

Changes made in /ajustes-voz persist in the TUI's durable store (opencode.jsonc seeds initial values; Reset reapplies opencode.jsonc).

To prevent the TUI from compacting long dictations into [Pasted ~N lines], add the following to ~/.config/opencode/cli.json on Linux (or C:\Users\&amp;lt;user&amp;gt;\.config\opencode\cli.json on Windows), which reloads live:

`{
  "prompt": {
    "paste": "full"
  }
}`

Troubleshooting &amp;amp; Limitations
No speech recognizer / language pack found: Install the Windows speech recognition language pack (not just the display pack) or lower System.Speech minimum confidence (e.g., 0.2) and check mic input levels.

WhisperX stuck on "Transcribing…": Check the toast/logs for Python path, CUDA, or Hugging Face token/VAD model access issues.

whisper.cpp reports not installed or fails to start: Download the engine from settings, verify ffmpeg -version is in PATH, and check glibc compatibility (tested on Ubuntu 22.04+ / 24.04).

RPC 400 / Edge voices not loading: Reload the plugin under Settings → Extensions → Plugins → Reload or restart the service.

Experimental API &amp;amp; Cloud Roadmap: The Desktop GUI plugin API (gui-experimental) is experimental and may shift across OpenCode versions. Cloud providers (Google Cloud Speech-to-Text, OpenAI gpt-4o-transcribe / whisper-1, Deepgram, AssemblyAI) are listed on the roadmap—when adding new engines (src/rpc.ts, src/index.ts, src/gui/settings.tsx, src/gui/window.tsx), keep API keys on the server/store or environment variables rather than exposing them to the renderer.

Have you tried opencode-voice-dictation on Windows, Linux, or WSL? Share your setup, WhisperX/whisper.cpp model choices, or any environment tips in the comments.


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/evious" rel="noopener noreferrer"&gt;
        evious
      &lt;/a&gt; / &lt;a href="https://github.com/evious/opencode-voice-dictation" rel="noopener noreferrer"&gt;
        opencode-voice-dictation
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Offline voice dictation and read-aloud for OpenCode Desktop (Windows)
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Dictado por voz para OpenCode Desktop y TUI&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Plugin de &lt;a href="https://opencode.ai" rel="nofollow noopener noreferrer"&gt;OpenCode&lt;/a&gt; V2 que añade voz a la app de
escritorio y a la TUI:&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;

&lt;strong&gt;Dictado&lt;/strong&gt;: pulsas la píldora y se abre el dictado de Windows 11 (Win+H)
que escribe en el prompt con su motor neuronal. También puedes usar el motor
offline &lt;code&gt;System.Speech&lt;/code&gt; desde Ajustes.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Lectura&lt;/strong&gt;: pulsa «Leer» y reproduce en voz alta la última respuesta.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;TUI&lt;/strong&gt;: &lt;code&gt;/dictado&lt;/code&gt;, &lt;code&gt;/leer&lt;/code&gt; y &lt;code&gt;/pausar&lt;/code&gt; en la terminal. En Windows usa
Win+H; en Linux graba y transcribe con whisper.cpp. También &lt;code&gt;&amp;lt;leader&amp;gt;d&lt;/code&gt;
&lt;code&gt;&amp;lt;leader&amp;gt;v&lt;/code&gt; y &lt;code&gt;&amp;lt;leader&amp;gt;p&lt;/code&gt;.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Dictado preciso&lt;/strong&gt;: por defecto delega en Windows Voice Typing (Win+H).&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Modo offline&lt;/strong&gt;: &lt;code&gt;System.Speech&lt;/code&gt; sigue disponible como alternativa sin
conexión y sin depender del dictado de Windows.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Linux nativo&lt;/strong&gt;: en Ubuntu, &lt;code&gt;whisper.cpp&lt;/code&gt; transcribe en la CPU sin WSL ni
Python. Ver &lt;a href="https://github.com/evious/opencode-voice-dictation/blob/main/docs/whispercpp.md" rel="noopener noreferrer"&gt;la guía&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Sin portapapeles en Desktop&lt;/strong&gt;: la lectura usa…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/evious/opencode-voice-dictation" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tools</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
