{
  "id": 22461913,
  "title": "How I Run a Speech Model in the Browser",
  "url": "https://urgent.news/2026/11/28/how-i-run-a-speech-model-in-the-browser",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-28T22:40:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/cleora/how-i-run-a-speech-model-in-the-browser-ald"
  },
  "original_language": null,
  "account": "Building All to Audiobook for a mother with limited mobility involved developing a speech model that could run in a web browser without relying on a powerful GPU. The app uses Kokoro, an 82-million-parameter speech model, through Kokoro.js and Transformers.js. The model runs in a web worker separate from the main thread of the browser page. The worker processes one passage at a time and sends back progress updates, selected engine, and audio samples. The choice between GPU and CPU execution paths is determined by checking for a GPU adapter in the browser. If none is found or the request fails, the CPU path is used instead. The GPU path loads a larger model file (325.5 MB) compared to the CPU path (92.4 MB). The worker is configured to use up to four threads for the GPU path and one thread for the CPU path. Both paths have checks in place to ensure the audio samples are valid before accepting them. If the GPU path fails or the audio is invalid, the worker switches to the CPU path for that specific request. Saved passages allow for resuming the process later, and the app can function even after the browser tab is closed.",
  "summary": "Part 4 of Building All to Audiobook How do you run a speech model in a browser when the reader's computer might not have a usable GPU? In All to Audiobook, I try WebGPU first and keep a WebAssembly CPU path available. Building All to Audiobook I ran into these problems while building All to Audiobook for my mom. After neck surgery, holding a book became difficult for her, and many of the ebooks…",
  "summary_source": "publisher",
  "key_points": [],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}