whisper.cpp
whisper.cpp copied to clipboard
wasm : update and fix examples
The Emscripten build for the WASM examples hasn't been maintained for a very long time. There are likely regressions that have been introduced that would need to be fixed.
Last working examples: https://whisper.ggerganov.com
- Fix WASM builds
- Update instructions
- Add CI workflows
- Host the WASM examples on a new domain and update regularly
I might be interested in this, have done some web dev before in other projects, what do you think if I were to try revamping the current website using JS and WASM?
@ggerganov I think your suggestion to use github pages for serving the wasm examples will work. I've tried this out on a separate repo and this is the generated github pages, which are generated for each push to main. I'll try this out on whisper.cpp tomorrow and see if we can get it working there as well.
Awesome!
@ggerganov Could you enable github pages to be deployed via github actions (I can't do as the settings tab does not show up for me, might be a permission issue):
In Settings -> Pages -> Build and Deployment select the GitHub Actions.
Done
The examples are now published here for each push to master: https://ggerganov.github.io/whisper.cpp/
I think this issue can be closed, correct?
I think this issue can be closed, correct?
Yep, I think this is completed now 👍
There seems to be a problem with the WASM example - when I transcribe longer audio using the tiny model, the processing often stops without any error or notification:
@danbev Can you reproduce on your end?
I am usually able to reproduce by running gb0.wav or gb1.wav from the samples, using 8 threads in a Chrome browser.
@danbev Can you reproduce on your end?
I'll take a look 👍 I've only been testing with the sample jfk.wav which is pretty short.
@ggerganov I've tried with various files like gb0.ogg, gb1.ogg, mm1.wav but they all complete. Could you share the file you are using so I can try the exact same one?
This the output from gb1.ogg:
Try using the tiny.en (75 MB) model. Here are the samples:
(remove the .txt extension)
I am able to reproduce this only in Chrome by transcribing the 2 samples one after the other. Eventually it hangs. I also reproduce it with the old WASM examples at: https://whisper.ggerganov.com, so it is not a new issue.
The strange thing is that it does not happen neither in Safari, nor in Firefox.
Btw, I just noticed the "unknown language" error when using non-en models. This looks like a separate issue.
Thanks, I've tried these but I've not been able to reproduce yet. I'll continue transcribing and see when I run into it.
Eventually it hangs. I also reproduce it with the old WASM examples at: https://whisper.ggerganov.com/, so it is not a new issue.
Ah good to know that, as it might not be cause by the changes to the WebAssembly memory setting in emscripten we made.
Btw, I just noticed the "unknown language" error when using non-en models. This looks like a separate issue.
I noticed this as well for the none .en models. I'll take a look at that too.
Thanks, I've tried these but I've not been able to reproduce yet. I'll continue transcribing and see when I run into it.
Ok thanks. It seems very likely that the issue is on my end - will try later today on a different PC to make sure.