Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans / potential for browser use? #57

Closed
nmstoker opened this issue Nov 12, 2024 · 6 comments
Closed

Plans / potential for browser use? #57

nmstoker opened this issue Nov 12, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@nmstoker
Copy link

I saw that there's an Onnx Runtime example - that made me wonder whether it might be feasible to run a version of the model in the browser.

https://github.com/usefulsensors/moonshine/tree/5689bdf58818d26029cb59a9f25b186f8971e4a9/moonshine/demo#demo-standalone-file-transcription-with-onnx

Are there any plans to port moonshine for browser use? And have you any comment on how challenging that might be. I guess if there are python dependencies which are hard to replace with JavaScript equivalents it might be pretty difficult, unless perhaps Pyodide might bridge the gap?

@keveman
Copy link
Contributor

keveman commented Nov 12, 2024

Yes, we have a demo of Moonshine running in the browser using onnxruntime-web. We will be releasing it soon, stay tuned.

@curiositry
Copy link

@keveman This is fantastic. My long term roadmap for the project I'm working on porting from Whisper.cpp to Moonshine involves a version that runs clientside (WASM?) in the browser.

@nmstoker
Copy link
Author

Many thanks @keveman - this is great news, really looking forward to seeing that new demo!

@evmaki evmaki added the enhancement New feature or request label Nov 12, 2024
@csukuangfj
Copy link

@nmstoker @curiositry

FYI: We have already supported running Moonshine models (and other models like Whisper, etc) with WebAssembly. You can run them either using NodeJS on the server side or directly in your browser locally on the client side.

The following huggingface space is a demo
https://huggingface.co/spaces/k2-fsa/web-assembly-vad-asr-sherpa-onnx-en-moonshine-tiny

Screenshot 2024-11-13 at 21 00 06

Please see also k2-fsa/sherpa-onnx#1535

@evmaki
Copy link
Contributor

evmaki commented Nov 13, 2024

@nmstoker @curiositry I just made our web demo public in a HuggingFace space. It uses onnxruntime-web to perform inferences in the browser. We will also be merging the source for the demo into main shortly; it includes the JavaScript port of Moonshine ONNX model inferences. This should hopefully provide a good starting point for building out your own web applications.

@nmstoker
Copy link
Author

Thank you @evmaki - that's kind of you to follow up and to include the source.

The HF demo works really well online. I'll give it a whirl integrating with my dev site this weekend - looking forward to it!

Will close this now. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants