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

modern-vanilla example: Failed to construct 'URL': Invalid base URL #82

Open
the-7reporter opened this issue Sep 13, 2024 · 2 comments
Open

Comments

@the-7reporter
Copy link

I am trying to get the modern-vanilla example (https://github.com/ccoreilly/vosk-browser/tree/master/examples/modern-vanilla) up and running. when i click the "Start recognition" button, i get the following error:

blob:null/7376b705-c3a4-4d7b-b65c-ecb5551d07ec:121 TypeError: Failed to construct 'URL': Invalid base URL
    at blob:null/7376b705-c3a4-4d7b-b65c-ecb5551d07ec:240:42

this happens right at:
const model = await Vosk.createModel('model.tar.gz');

the model is in the same folder, i also tried to load it from the web, but got the same error:
const model = await Vosk.createModel("https://ccoreilly.github.io/vosk-browser/models/vosk-model-small-en-us-0.15.tar.gz");

what is missing?

@erikh2000
Copy link

Check your HTTP requests in the browser (Network tab in Developer Tools on Chrome). I'm guessing you've got a 404 on one of the model requests.

If that's the case, then just continue troubleshooting with the expectation that the URL that is 404ing either needs to change, or a model needs to be served from the location of the URL. It sounds like you were already thinking along those lines.

Pointing out I'm not an official maintainer. Don't blame the project if my advice is bad.

@the-7reporter
Copy link
Author

Thanks for your reply! I am not getting any 404 in the network tab (tried with the web model and a local one). any other advices?

image

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

No branches or pull requests

2 participants