fix: use onnxruntime for Apple Silicon, venv python path, ignore .venv

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boksbc 2026-05-11 22:20:20 +02:00
parent 1568cc9eeb
commit 1189f6000c
3 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ dist/
.env
.idea/
.DS_Store
python/.venv/

View File

@ -13,8 +13,9 @@ function startWakeword({ onWake }, retries = 0) {
running = true;
const scriptPath = path.join(__dirname, '../python/wakeword.py');
const pythonPath = path.join(__dirname, '../python/.venv/bin/python3');
const proc = spawn('python3', [scriptPath], {
const proc = spawn(pythonPath, [scriptPath], {
stdio: ['pipe', 'pipe', 'pipe'],
});
wakewordProcess = proc;

View File

@ -9,7 +9,12 @@ RATE = 16000
THRESHOLD = 0.5
def main():
model = Model(wakeword_models=["hey_jarvis"])
import openwakeword
openwakeword.utils.download_models(["hey_jarvis"])
model = Model(
wakeword_models=["hey_jarvis"],
inference_framework="onnx"
)
pa = pyaudio.PyAudio()
stream = pa.open(