You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import openwakeword
from pyaudio import PyAudio, paInt16
from openwakeword.model import Model
import wave
CHUNK_SIZE=2048
# BUG1: download_models() is not available in utils.
#openwakeword.utils.download_models()
# Instantiate the model(s)
# BUG2: CUDAExecutionProvider is used instead of CPU.
model = Model(
# wakeword_models=["path/to/model.tflite"], # can also leave this argument empty to load all of the included pre-trained models
)
with wave.open("models/computer-en.wav", "r") as wf:
# Get audio data containing 16-bit 16khz PCM audio data from a file, microphone, network stream, etc.
# For the best efficiency and latency, audio frames should be multiples of 80 ms, with longer frames
# increasing overall efficiency at the cost of detection latency
frame = wf.readframes(CHUNK_SIZE)
# Get predictions for the frame
prediction = model.predict(frame)
And result is:
/home/vdybala/.local/lib/python3.12/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
How to specify CPUExecutionProvider?
The text was updated successfully, but these errors were encountered:
By some reasons pip installed version 0.4.0. When I try install most modern version 0.6.0 I got an error:
pip install openwakeword==0.6.0 --break-system-packages
Defaulting to user installation because normal site-packages is not writeable
Collecting openwakeword==0.6.0
Using cached openwakeword-0.6.0-py3-none-any.whl.metadata (29 kB)
Requirement already satisfied: onnxruntime<2,>=1.10.0 in /home/vdybala/.local/lib/python3.12/site-packages (from openwakeword==0.6.0) (1.19.2)
Requirement already satisfied: tqdm<5.0,>=4.0 in /home/vdybala/.local/lib/python3.12/site-packages (from openwakeword==0.6.0) (4.66.5)
Requirement already satisfied: scipy<2,>=1.3 in /usr/lib/python3/dist-packages (from openwakeword==0.6.0) (1.11.4)
Requirement already satisfied: scikit-learn<2,>=1 in /home/vdybala/.local/lib/python3.12/site-packages (from openwakeword==0.6.0) (1.5.2)
Requirement already satisfied: requests<3,>=2.0 in /usr/lib/python3/dist-packages (from openwakeword==0.6.0) (2.31.0)
INFO: pip is looking at multiple versions of openwakeword to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement tflite-runtime<3,>=2.8.0; platform_system == "Linux" (from openwakeword) (from versions: none)
ERROR: No matching distribution found for tflite-runtime<3,>=2.8.0; platform_system == "Linux"
Trying to install oww and launch basic example:
pip install openwakeword --break-system-packages
Example script:
And result is:
How to specify CPUExecutionProvider?
The text was updated successfully, but these errors were encountered: