-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyprogram.txt
More file actions
46 lines (30 loc) · 1.15 KB
/
Copy pathmyprogram.txt
File metadata and controls
46 lines (30 loc) · 1.15 KB
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
import os
import pyttsx3
print("Welcome to my menu function How may I help you")
pyttsx3.speak("Welcome to my menu function How may I help you ?")
q = input()
if (("how" in q) or ("what" in q ) or ("which" in q)):
pyttsx3.speak(" we have following options for you ")
#print(p)
print('''browser
editor
media player
''')
print("Tell us your requirement: ", end="")
pyttsx3.speak("Tell us your requirement")
p = input()
if (("run" in p) or ("open" in p) or ("launch" in p) and ("chrome" in p) or ("browser" in p)):
pyttsx3.speak("opening browser for you")
os.system("chrome")
elif (("run" in p) or ("open" in p) or ("launch" in p) and ("notepad" in p) or ("editor" in p)):
pyttsx3.speak("opening editor for you")
os.system("notepad")
elif (("run" in p) or ("open" in p) or ("launch" in p) and ("media player" in p) or ("player" in p)):
pyttsx3.speak("opening media player for you")
os.system("wmplayer")
elif (("exit" in p) or ("close" in p) or ("off" in p) or ("shutdown" in p)):
pyttsx3.speak("poweroff assistant Thankyou for using me")
exit()
else:
pyttsx3.speak("the command you type is not availble")
print("the command you type is not availble")