-
Notifications
You must be signed in to change notification settings - Fork 2
/
passwordcheck.py
31 lines (27 loc) · 1.2 KB
/
passwordcheck.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# file to check if the user has entered the right password or not
import os
import mouth
# python file to cheack password or wake-word by the user input both by terxt ad speech
def text_password(key):
# you can use any phrase as passowrd just the word mini needs to be present
wakewords = ['mini', 'hey mini', 'hello mini']
for phrase in wakewords:
if phrase in key:
print('\n welcome user')
# file location - mini-main/assets/textcommandfuntion.py
os.system('python assets/textcommandfuntion.py')
break
else:
print('password entered is wrong,bye')
break
def speech_password(key):
# you can say anything as wake word just word mini needs to be present
wakewords = ['mini', 'hey mini', 'hello mini', 'hello', 'hey', 'mini mini']
for phrase in wakewords:
if key in phrase:
mouth.minisay(voice='welcome buddy, what do you want me to do?')
# file location - mini-main/assets/textcommandfuntion.py
# because as of now we don't have voice funtions
os.system('python assets/textcommandfuntion.py')
else:
mouth.minisay(voice='sorry retry again')