{"id":24293725,"url":"https://github.com/msqr1/vosklet","last_synced_at":"2025-09-25T19:31:28.222Z","repository":{"id":217236185,"uuid":"743332726","full_name":"msqr1/Vosklet","owner":"msqr1","description":"A speech recognizer that can run on the browser, inspired by vosk-browser","archived":false,"fork":false,"pushed_at":"2024-05-15T23:30:09.000Z","size":250834,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-19T01:25:15.919Z","etag":null,"topics":["api","javascript","speech-recognizer","vosk","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msqr1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-15T01:55:30.000Z","updated_at":"2024-05-30T08:16:22.461Z","dependencies_parsed_at":"2024-05-30T08:16:21.027Z","dependency_job_id":"ff13fbc3-99b0-49d1-933a-679aac1095a3","html_url":"https://github.com/msqr1/Vosklet","commit_stats":null,"previous_names":["msqr1/browser-recognizer"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msqr1%2FVosklet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msqr1%2FVosklet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msqr1%2FVosklet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msqr1%2FVosklet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msqr1","download_url":"https://codeload.github.com/msqr1/Vosklet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234235789,"owners_count":18800690,"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":["api","javascript","speech-recognizer","vosk","webassembly"],"created_at":"2025-01-16T16:56:16.588Z","updated_at":"2025-09-25T19:31:28.209Z","avatar_url":"https://github.com/msqr1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n- A fast, lightweight, actively maintained speech recognizer in the browser with total brotlied (used by JSDelivr) size of **under a megabyte** (614 KB)\n- Live Demo (ASR in 20 languages): https://msqr1-github-io.pages.dev/Vosklet\n- Inspired by vosk-browser by [ccoreilly](https://github.com/ccoreilly)\n\n# Documentation\n- See [Documentation.md](Documentation.md)\n\n# Vosklet ...\n- Is regularly maintained\n- Support multiple models\n- Include model cache path management\n- Include model cache ID management (for updates)\n- Wraps all Vosk's functionaly\n- Faster and lighter than vosk-browser\n\n# Basic usage (microphone recognition in English)\n- Using JsDelivr CDN\n- Result are logged to the console\n- Copied from [Examples/fromMic.html](Examples/fromMic.html)\n- **IMPORTANT:** Please see [Examples/README.md](Examples/README.md)\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/gh/msqr1/Vosklet@1.2.1/Examples/Vosklet.js\" async defer\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      async function start() {\n        // All data is collected and transfered to the main thread so the AudioContext won't output anything. Set sinkId type to none to save power\n        let ctx = new AudioContext({sinkId: {type: \"none\"}});\n\n        // Setup microphone   \n        let micNode = ctx.createMediaStreamSource(await navigator.mediaDevices.getUserMedia({\n          video: false,\n          audio: {\n            echoCancellation: true,\n            noiseSuppression: true,\n            channelCount: 1\n          },\n        }));\n\n        // Load Vosklet module, model and recognizer\n        let module = await loadVosklet();\n        let model = await module.createModel(\"https://ccoreilly.github.io/vosk-browser/models/vosk-model-small-en-us-0.15.tar.gz\",\"English\",\"vosk-model-small-en-us-0.15\");\n        let recognizer = await module.createRecognizer(model, ctx.sampleRate);\n\n        // Listen for result and partial result\n        recognizer.addEventListener(\"result\", ev =\u003e console.log(\"Result: \", ev.detail));\n        recognizer.addEventListener(\"partialResult\", ev =\u003e console.log(\"Partial result: \", ev.detail));\n\n        // Create a transferer node to get audio data on the main thread\n        let transferer = await module.createTransferer(ctx, 128 * 150);\n\n        // Recognize data on arrival\n        transferer.port.onmessage = ev =\u003e recognizer.acceptWaveform(ev.data);\n\n        // Connect transferer to microphone\n        micNode.connect(transferer);\n      }\n    \u003c/script\u003e\n    \u003c!-- Start and create audio context only as a result of user's action --\u003e\n    \u003cbutton onclick=\"start()\"\u003eStart\u003c/button\u003e\n  \u003c/head\u003e\n\u003c/html\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsqr1%2Fvosklet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsqr1%2Fvosklet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsqr1%2Fvosklet/lists"}