Skip to content

Instantly share code, notes, and snippets.

@deviceplususer
Created January 9, 2019 06:21
Show Gist options
  • Save deviceplususer/bae9f53d11febc4db9be237d5d2fe9a0 to your computer and use it in GitHub Desktop.
Save deviceplususer/bae9f53d11febc4db9be237d5d2fe9a0 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
from light import Light
interrupted = False
LED=17
GPIO.setwarnings(False)
import snowboydecoder
…..
sensitivity = [0.5]*len(models)
detector = snowboydecoder.HotwordDetector(models, sensitivity=sensitivity)
led = Light(LED)
callbacks = [lambda: snowboydecoder.play_audio_file(snowboydecoder.DETECT_DING),
lambda: led.blink()] #snowboydecoder.play_audio_file(snowboydecoder.DETECT_DONG)]
print("ウェイクワードを発話して下さい。Ctrl+Cで終了します。")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment