fix: iMac mic quiet - arecord raw + 12x software gain, strip WAV RIFF header, wakeword api 0.4.0, STT base.en tests, voiceID Adolfo 0.97 enrolled
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Test wakeword detection without full pipeline"""
|
||||
from jarvis.audio.capture import AudioCapture
|
||||
from jarvis.audio.wakeword import WakeWordDetector
|
||||
from jarvis.audio.vad import create_vad
|
||||
from jarvis.config import load_config
|
||||
import time
|
||||
|
||||
cfg = load_config(None)
|
||||
vad = create_vad(cfg)
|
||||
ww = WakeWordDetector(models=cfg.get('wakeword',{}).get('models',['hey_jarvis']), threshold=0.45)
|
||||
|
||||
cap = AudioCapture()
|
||||
cap.start()
|
||||
print("Say 'Hey Jarvis'...")
|
||||
try:
|
||||
while True:
|
||||
chunk = cap.read(timeout=0.1)
|
||||
if chunk is None:
|
||||
continue
|
||||
# Optional VAD gate
|
||||
if not vad.is_speech(chunk):
|
||||
continue
|
||||
det = ww.detect(chunk)
|
||||
if det:
|
||||
print(f"Wake detected: {det}")
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
finally:
|
||||
cap.stop()
|
||||
Reference in New Issue
Block a user