19 if len(sys.argv) != 3:
20 print(
"Error: need to specify 2 model names")
21 print(
"Usage: python demo.py 1st.model 2nd.model")
27 signal.signal(signal.SIGINT, signal_handler)
29 sensitivity = [0.5]*len(models)
31 callbacks = [
lambda: snowboydecoder.play_audio_file(snowboydecoder.DETECT_DING),
32 lambda: snowboydecoder.play_audio_file(snowboydecoder.DETECT_DONG)]
33 print(
'Listening... Press Ctrl+C to exit')
37 detector.start(detected_callback=callbacks,
38 interrupt_check=interrupt_callback,
def signal_handler(signal, frame)