{"id":15999625,"url":"https://github.com/orthagonal/electron-voice","last_synced_at":"2026-03-08T16:36:43.431Z","repository":{"id":255414062,"uuid":"849067524","full_name":"orthagonal/electron-voice","owner":"orthagonal","description":"real-time voice-to-text in electron","archived":false,"fork":false,"pushed_at":"2024-08-29T19:24:39.000Z","size":21009,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"all_words","last_synced_at":"2024-11-15T10:33:47.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orthagonal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T23:15:29.000Z","updated_at":"2024-10-19T19:02:55.000Z","dependencies_parsed_at":"2024-08-29T21:41:53.494Z","dependency_job_id":"7572997f-d036-4dad-b31a-043d616a405b","html_url":"https://github.com/orthagonal/electron-voice","commit_stats":null,"previous_names":["orthagonal/electron-voice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orthagonal%2Felectron-voice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orthagonal%2Felectron-voice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orthagonal%2Felectron-voice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orthagonal%2Felectron-voice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orthagonal","download_url":"https://codeload.github.com/orthagonal/electron-voice/tar.gz/refs/heads/all_words","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234099479,"owners_count":18779690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T09:00:37.223Z","updated_at":"2025-09-24T17:30:34.644Z","avatar_url":"https://github.com/orthagonal.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-voice\n\n## A fast, complete speech-to-text interface for Electron \n\n- works with any [Vosk model](https://alphacephei.com/vosk/models) \n- runs the audio device in a dedicated process separate from Electron browser, so it is very fast and not subject to any browser security limitations\n- sends identified speech back to Electron using the Neon bridge\n- can do generalized speech recognition\n- can take in a custom grammar to limit the recognized words\n\n\nYou can install the project with npm. In the project directory, run:\n\n```sh\n$ npm install\n```\n\nThis fully installs the project, including installing any dependencies and running the build.\n\n## Building vosk-electron\n\nIf you have already installed the project and only want to run the build, run:\n\n```sh\n$ npm run build\n```\n\nThis command uses the [cargo-cp-artifact](https://github.com/neon-bindings/cargo-cp-artifact) utility to run the Rust build and copy the built library into `./index.node`.\n\n\n## electron_main.js Example\n\n```js\n\n// import the module just like any other node dependency\nconst voiceModule = require('index.node');  \n\n// define a handler that gets called any time new words are identified\nfunction onWordsFound(words) {\n  console.log(words);\n}\n// resets the recognizer to prevent it from getting bogged down\nconst MAX_WORDS = 25;\n\n// get list of devices\nconst devices = voiceModule.listDevices();\n// select a device from the list:\nvoiceModule.setMicName(devices[2]);\n// download models from https://alphacephei.com/vosk/models\nvoiceModule.setPathToModel('vosk-model-small-en-us-0.15');\n// you can specify a grammar to limit the recognized words and\n// improve accuracy, this step is optional\nvoiceModule.setGrammar('[\"hello\", \"world\"]');\nvoiceModule.startListener(onWordsFound, MAX_WORDS); \n// wait for the model to load, the big ones can take a few minutes:    \nlet interval;\ninterval = setInterval(() =\u003e {\n  if (voiceModule.isModelLoaded()) {\n    console.log('speech model loaded!');\n    mainWindow.webContents.send('modelReady', true);\n    clearInterval(interval);\n  }\n}, 1000);\n```\n\n\n\n### index.node\n\nThe Node addon—i.e., a binary Node module—generated by building the project. This is the main module for this package, as dictated by the `\"main\"` key in `package.json`.\n\nUnder the hood, a [Node addon](https://nodejs.org/api/addons.html) is a [dynamically-linked shared object](https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries). The `\"build\"` script produces this file by copying it from within the `target/` directory, which is where the Rust build produces the shared object.\n\n\n## Learn More\n\nTo learn more about Neon, see the [Neon documentation](https://neon-bindings.com).\n\nTo learn more about Rust, see the [Rust documentation](https://www.rust-lang.org).\n\nTo learn more about Node, see the [Node documentation](https://nodejs.org).\n\n\nfor different platforms:\n\nrustup default stable-x86_64-pc-windows-msvc   # For 64-bit\nrustup default stable-i686-pc-windows-msvc     # For 32-bit\n\nbinaries:\nhttps://github.com/alphacep/vosk-api/releases\n\nmodels:\nhttps://alphacephei.com/vosk/models\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forthagonal%2Felectron-voice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forthagonal%2Felectron-voice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forthagonal%2Felectron-voice/lists"}