-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
54 lines (44 loc) · 1.36 KB
/
main.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import message
import Record
import os
import gtts
from playsound import playsound
def main():
print("\nTell me the website after the beep")
qSound = "Tell me the website after the beep"
AutoSearch = message.AutoSearch()
AutoSearch.webSound(qSound)
#browser = input("what website do you want to see(ebay or amazon)?")
data = Record.recordAudio()
# Find website from sound file
if data.lower() == "amazon":
AutoSearch.amazon()
if data.lower() == "ebay":
AutoSearch.ebay()
if data.lower() == "target":
AutoSearch.target()
else:
AutoSearch.error()
main()
def start():
# Install pyaudio wheel
#os.system("pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl")
#print("Please press space to start")
#start = gtts.gTTS("Please press space to start")
# start.save("Audio/start.mp3")
# playsound("Audio/start.mp3")
# os.remove("Audio/start.mp3")
'''
if keyboard.read_key() == 'space':
time.sleep(2)
main()
else:
pass
'''
print('If you want to speak, please press any key for speaking.')
speak = gtts.gTTS(
'If you want to speak, please press any key for speaking')
speak.save("Audio/speak.mp3")
playsound("Audio/speak.mp3")
os.remove("Audio/speak.mp3")
main()