Skip to content

Commit

Permalink
Spilock - Fourth Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj0898 committed Apr 29, 2023
1 parent 393d6e5 commit b263775
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/authentication/voice_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from src.sensor.listen import listen
from utils import i2c_lcd_driver
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
from time import sleep

from utils.microphone import microphone
Expand All @@ -14,11 +13,6 @@
# Include the relay pin
relay = 26

# Enter your tag ID
my_microphone = microphone()
my_microphone = listen()
mic_answer = my_microphone.get_response()

door = True

GPIO.setmode(GPIO.BCM)
Expand All @@ -42,6 +36,9 @@ def voice_auth():
print(question)
lcd.lcd_display_string(question, 1, 1)

my_microphone = listen()
mic_answer = my_microphone.get_response()

valid_answer = query_answer(question)

if mic_answer == valid_answer:
Expand Down

0 comments on commit b263775

Please sign in to comment.