dscripka / openWakeWord

An open-source audio wake word (or phrase) detection framework with a focus on performance and simplicity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on Windows when using Onnx and custom model

DillonMercz opened this issue · comments

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

Wait, finally resolved with:

import openwakeword

openwakeword.utils.download_models()