xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
532 stars 85 forks source link

WASM support? #18

Closed Pita closed 3 years ago

Pita commented 3 years ago

Hello,

This is a really amazing project. Is there some way to make it run directly on a website? Without going to the server? Via wasm or similar

Peter

xinjli commented 3 years ago

Hi,

Thanks for your question! Currently, there are no supports of frontend browser-side implementation as the code/model is in python. It is possible to port the entire model to C++, then serve from wasm. but unfortunately, I do not have time to work on that.

If you want to run it in your local browser, the easiest way I guess would be to prepare a flask server and instantiate the model there (using python API in README) I think It should be easy enough and would require only around 50 lines of code.