1import pyttsx3
2import subprocess
3import os
4import time
5
6
7pyttsx3.speak("Hi user")
8time.sleep(2)
9pyttsx3.speak("you can open any apps in this coming list")
10time.sleep(3)
11print("You can open any app from this list:- ")
12print("NOTEPAD \t GOOGLE\nVirtual Box \t unity \nEXIT ")
13
14while True:
15 # take input
16
17 print("Chat with me which app to open : ", end='')
18 p = input().upper()
19 print(p)
20
21 if ("NOTE" in p) or ("NOTES" in p) or ("NOTEPAD" in p) :
22 pyttsx3.speak("Opening , Notepad")
23 os.system("notepad.exe")
24
25
26
27 elif ("GOOGLE" in p or "CHROME" in p):
28 pyttsx3.speak("opening chrome please wait")
29 time.sleep(3)
30 subprocess.call(['C:/Program Files (x86)/Google/Chrome/Application/chrome'])
31
32 elif "VIRTUAL BOX" in p:
33 pyttsx3.speak("opening virtual box")
34 subprocess.call(["F:\Vm\oricle\VirtualBox.exe"])
35 #time.sleep(3)
36
37
38 elif "UNITY" in p:
39 pyttsx3.speak("Opening unity")
40 subprocess.call(['D:/unity/2020.1.17f1/Editor/Unity.exe'])
41
42
43 elif ("EXIT" in p) or ("QUIT" in p) or ("CLOSE" in p):
44 print("thanks")
45 time.sleep(1)
46 pyttsx3.speak("Exiting this app thanks for using this app")
47 break
48
49 else:
50 print("Is Invalid,Please Try Again")
51 pyttsx3.speak("its Invalid,Please try again ")