ccoreilly / vosk-browser

A speech recognition library running in the browser thanks to a WebAssembly build of Vosk
Apache License 2.0
364 stars 60 forks source link

How does it work #26

Closed wizVR-zhangjun closed 2 years ago

wizVR-zhangjun commented 2 years ago

examples Demo how does is work, Please give me some advice ,thank you

ccoreilly commented 2 years ago

Please be more specific. You can check the code of the demo in the examples folder of the repository.

wizVR-zhangjun commented 2 years ago

请更具体。您可以在存储库的示例文件夹中查看演示的代码。

The demo code did not run successfully

wizVR-zhangjun commented 2 years ago

请更具体。您可以在存储库的示例文件夹中查看演示的代码。

image Running this example directly reports an error. Thank you for your advice on how to run it.

ccoreilly commented 2 years ago

@wizVR-zhangjun you need to serve those files from a local http server, it will not work if you simply open index.html by double-clicking. Check this page, hopefully it helps.

wizVR-zhangjun commented 2 years ago

@wizVR-zhangjun you need to serve those files from a local http server, it will not work if you simply open index.html by double-clicking. Check this page, hopefully it helps.

@ccoreilly I built an HTTPS service using Tomcat image Teacher, what's the problem

wizVR-zhangjun commented 2 years ago

@wizVR-zhangjun you need to serve those files from a local http server, it will not work if you simply open index.html by double-clicking. Check this page, hopefully it helps.

image

I don't know what caused this error, Please advise

ccoreilly commented 2 years ago

It is hard to know with the information you provided but the example expects to be at the root of the server. Select the modern-vanilla folder as the one that should be served by tomcat.

ccoreilly commented 2 years ago

And you need a vosk model named model.tar.gz at the same path (next to index.html). You can get them from the official vosk models page.

wizVR-zhangjun commented 2 years ago

And you need a vosk model named model.tar.gz at the same path (next to index.html). You can get them from the official vosk models page.

Thank you for your help. According to your suggestion, I can successfully run the example here. Thank you again for your enthusiastic help