dscripka / openWakeWord

An open-source audio wake word (or phrase) detection framework with a focus on performance and simplicity.
Apache License 2.0
761 stars 75 forks source link

Provided example from readme seems not to work #197

Open jojasadventure opened 2 months ago

jojasadventure commented 2 months ago

I was attempting to try this out using the provided example, first cloning the repo and installing packages. I needed to manually add the tflite_runtime on my system.

pip install tflite_runtime

Did I miss something in the instructions? All packages installed successfully with pip. I read the models were taken out in a recent release, so I tried to re-add the folder from the previous release, but it is still giving below error when I try to run the example for detecting from microphone. Thank you!

python3 detect_from_microphone.py 
Traceback (most recent call last):
  File "detect_from_microphone.py", line 59, in <module>
    owwModel = Model(inference_framework=args.inference_framework)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openwakeword/utils.py", line 686, in wrapped
    return func(*args, **new_kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openwakeword/model.py", line 165, in __init__
    self.models[mdl_name] = tflite.Interpreter(model_path=mdl_path, num_threads=1)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tflite_runtime/interpreter.py", line 205, in __init__
    _interpreter_wrapper.CreateWrapperFromFile(
ValueError: Could not open '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/openwakeword/resources/models/alexa_v0.1.tflite'.
jojasadventure commented 2 months ago

Hang on I just found this issue, should apply to me as well, right? Sorry.

hajkeoadf commented 2 weeks ago
import openwakeword
from openwakeword.model import Model

# One-time download of all pre-trained models (or only select models)
openwakeword.utils.download_models()