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

Bugfix/#67: App crash on file:// prefix in dynamic loading #79

Merged

Conversation

ShristiC
Copy link
Contributor

Problem Summary

Issue: #67
If a path passed in has file://, the app crashes in iOS. Alphacephai vosk returns an error that path found is not correct. When a model is not successfully loaded, there is not enough logging to let a user know that a fallback bundle path will be used.

Summary of Changes

  1. Replace file:// in incoming path with '' . A user should be able to pass in a path without doing any pre-processing
  2. Add more logging for when dynamic load fails and the main bundle path is used. For users who are only doing static loading - something like this is expected. The error is thrown by the original vosk implementation rather than this npm package. Expect to see the second log to start debugging at the main bundle path.
ERROR (VoskAPI:Model():model.cc:122) Folder <name> does not contain model files...
Model directory does not exist at path <name>. Attempt to load model from main app bundle.

@riderodd riderodd merged commit 4e756da into riderodd:main Nov 12, 2024
5 checks passed
@ShristiC ShristiC deleted the bugfix/#67-app-crash-on-dynamic-load branch November 12, 2024 17:24
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

Successfully merging this pull request may close these issues.

2 participants