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

Error on Windows when using Onnx and custom model #144

Closed
DillonMercz opened this issue Mar 27, 2024 · 1 comment
Closed

Error on Windows when using Onnx and custom model #144

DillonMercz opened this issue Mar 27, 2024 · 1 comment

Comments

@DillonMercz
Copy link

Hello,

I am using OpenWakeWord on windows, Tflite-runtime is not available for windows anymore, so am trying to use Onnx, and I receive the following error:

Command used:
python3 detect.py --model main.onnx --inference_framework onnx

Error:
Traceback (most recent call last):
File "C:\Users\dylan\downloads\gringis\speech\detect.py", line 44, in
owwModel = Model(wakeword_models=[args.model_path], inference_framework=args.inference_framework)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openwakeword\utils.py", line 686, in wrapped
return func(*args, **new_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openwakeword\model.py", line 213, in init
self.preprocessor = AudioFeatures(inference_framework=inference_framework, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openwakeword\utils.py", line 84, in init
self.melspec_model = ort.InferenceSession(melspec_model_path, sess_options=sessionOptions,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 472, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: [ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openwakeword\resources\models\melspectrogram.onnx failed:Load model C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openwakeword\resources\models\melspectrogram.onnx failed. File doesn't exist

@DillonMercz
Copy link
Author

Wait, finally resolved with:

import openwakeword

openwakeword.utils.download_models()

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

1 participant