Created
January 9, 2019 06:21
-
-
Save deviceplususer/bae9f53d11febc4db9be237d5d2fe9a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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