Google STT extention using VOSK
I am building a Google extension to convert speech to text (STT). According to the research I have done, I should have the web assembly file (WASM). But I couldn't find it anywhere. Is the path I am taking correct or is this file not needed and am I taking the wrong path?
Are you trying to build from source or just importing the package?
Yes, you'll need WASM. But if you are importing it should already be included. I can't remember if it is inlined into the bundle or a separate file, but there was no extra step for me besides just importing vosk-web and calling its APIs.
If you are building from source, then that's a little different.
If you're hitting a problem, maybe useful to elaborate on what isn't working.
Hi Erik, I want to create a Speech-to-text extension that includes the Vosk model and works completely offline. As I understand it, I need manifest.json and vosk.js files, the Vosk model, the Vosk.wasm file, and a JavaScript file. This extension is not going to connect to a server using an API and receive services, and I want everything to be inside itself and work completely offline. I would appreciate if you have any experience and could help me.
Are you trying to build from source or just importing the package?
Yes, you'll need WASM. But if you are importing it should already be included. I can't remember if it is inlined into the bundle or a separate file, but there was no extra step for me besides just importing vosk-web and calling its APIs.
If you are building from source, then that's a little different.
If you're hitting a problem, maybe useful to elaborate on what isn't working.
It should be possible, but what is the obstacle you are stuck on?
It should be possible, but what is the obstacle you are stuck on?
As I said, I need the web assembly (WASM) file, which I can't find anywhere. I also want to use the vosk-wasm-builder (https://github.com/users/ccoreilly/packages/container/vosk-wasm-builder/72625911?tag=0.0.7), but it still won't create the file.
I probably can't help you with the WASM file, due to time constraints, business travel, being away from computer
But are you sure you need the WASM file? What happens if you just import "vosk-web" in your project source and call the APIs?
That is all I do. Although the code does need to be able to fetch models from a web-served location as well.
Calling out that I'm not a maintainer to avoid misunderstanding.
Also, I can't confirm myself now, but often the WASM file is in-lined into the JS file by the bundler. If you find the "vosk-web" folder under node_modules, check the entrypoint in package.json (index.js or something), then open the entrypoint source and search for WASM code, you can learn if the WASM is inlined.
If it is inlined, you'd likely need to modify the build process to get a separate WASM file.
Also, I can't confirm myself now, but often the WASM file is in-lined into the JS file by the bundler. If you find the "vosk-web" folder under node_modules, check the entrypoint in package.json (index.js or something), then open the entrypoint source and search for WASM code, you can learn if the WASM is inlined.
If it is inlined, you'd likely need to modify the build process to get a separate WASM file.
this package is all thing that i have plus a model.tar.gz file that is vosk small model. You have given me a lot of guidance so far and I told Chat GPT about your guidance regarding the web assembly file and he checked that this operation is done inside the package.json file. So far I have reached this package and I have this error in Chrome.
Ah, I'm ignorant here - no experience developing extensions. It looks maybe like a permissions issue with the browser in executing WASM. But I have little insight.
Ah, I'm ignorant here - no experience developing extensions. It looks maybe like a permissions issue with the browser in executing WASM. But I have little insight.
Thank you for your kindness Erik