Read vertically
msqr1 / vosklet Goto Github PK
View Code? Open in Web Editor NEWA speech recognizer that can run on the browser, inspired by vosk-browser
License: Apache License 2.0
A speech recognizer that can run on the browser, inspired by vosk-browser
License: Apache License 2.0
[Error] Unhandled Promise Rejection: ReferenceError: Can't find variable: SharedArrayBuffer
(anonymous function) (Vosklet.js:9:9494)
(anonymous function) (index.html:21)
Safari Version 17.3.1 (19617.2.4.11.12)
Happens after clicking start and speaking via the example
Thanks for the lib, still failing to get browser offline speech recognition working with any example from any offering ๐
I tried to run on IDE devserver, different services but get error about SharedBufferArray
I created a simple Flask with necessary CORS headers, but now it fails at
let model = await module.createModel("en-model.tgz","model","ID")
with
Uncaught (in promise) TypeError: Failed to fetch
Getting this using en-model.tgz served from my webserver with the latest
Line 14 in ef01094
I have a dataset of syllables on which I perform the evaluation.
Each wav = 1 syllable (0.2 sec). Just read one by one, recognize, check with ground true.
Vosk on the host gives ~80% accuracy.
Vosklet give ~65%, Possible it's because async nature of the js wrapper.
I use a timeout 2 sec to divide different wav recognition, but 11% of records have nothing as recognized result, and 8% contains 2 syllables.
Other things all the same between hosted Vosk and browser Vosklet.
Maybe running in main thread synchronously will help?
The error
UncaughtReferenceError: SharedArrayBuffer is not defined at Vosklet.js:9:9648
On the step of model's creation (malloc) JS throw error without text but with 1 number, it looks like number of bytes tried to allocate.
Have you built model with fixed memory size? doesn't it allow memory_grow?
I've installed the library via NPM and load with import loadVosklet from 'vosklet';
Get the following error running the demo code from the readme
vosklet_demo.js:23 worker sent an error! http://localhost:4000/assets/app.js:2855: Uncaught ReferenceError: window is not define
worker.onerror @ Vosklet.js:9
error (async)
(anonymous) @ Vosklet.js:9
loadWasmModuleToWorker @ Vosklet.js:9
loadWasmModuleToAllWorkers @ Vosklet.js:9
(anonymous) @ Vosklet.js:9
callRuntimeCallbacks @ Vosklet.js:9
preRun @ Vosklet.js:9
run @ Vosklet.js:9
runCaller @ Vosklet.js:9
removeRunDependency @ Vosklet.js:9
receiveInstance @ Vosklet.js:9
receiveInstantiationResult @ Vosklet.js:9
Promise.then (async)
instantiateArrayBuffer @ Vosklet.js:9
instantiateAsync @ Vosklet.js:9
createWasm @ Vosklet.js:9
(anonymous) @ Vosklet.js:9
startRecognition @ vosklet_demo.js:23
await in startRecognition (async)
(anonymous) @ vosklet_demo.js:7
Show less
Sometimes, VoskletTransferer
will throw a TypeError: cannot convert undefined to object
exception immediately after initialization. It won't always happen right away, but usually will after a few reloads. It seems there is a race condition between the connection of the source and processor nodes and the execution of VoskletTransferer
's process
method.
The error is being thrown here:
Line 11 in 76aedbd
Adding a falsiness check here should fix it:
const data = inputs[0][0]
if (!data) return true
this.buffer.set(data, this.count * 128)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.