dscripka / openWakeWord

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

TypeError: AudioFeatures.__init__() got an unexpected keyword argument 'wakeword_models' #195

Closed jbflow closed 2 months ago

jbflow commented 2 months ago

This looks like a great package and a good way of making hot word detection cheaper to implement so thank you to everyone putting time and effort into this project.

I'm attempting to utilize it to facilitate wake word detection for a music related AI assistant - Landing page here that explains everything if anyone is interested.

I'm running the repository inside a UTM virtual machine Ubuntu 24.0.4 on an 2020 M1 macbook pro. However I am seeing the following error.

Full terminal output

(.venv) jbflow@tlkbck:~/clones/openWakeWord/examples$ python3 detect_from_microphone.py --model_path hey_jarvis_v0.1.tflite
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Traceback (most recent call last):
  File "/home/jbflow/clones/openWakeWord/examples/detect_from_microphone.py", line 57, in <module>
    owwModel = Model(wakeword_models=[args.model_path], inference_framework=args.inference_framework)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jbflow/projects/tbww/.venv/lib/python3.12/site-packages/openwakeword/model.py", line 139, in __init__
    self.preprocessor = AudioFeatures(**kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AudioFeatures.__init__() got an unexpected keyword argument 'wakeword_models'

Any help resolving this issue would be appreciated, please let me know if any further information is required.

jbflow commented 2 months ago

It seems the issue was simply I was somehow running an older version of the example script. Making a fresh clone of the repo and running the script from the main branch worked fine so closing this issue