Skip to content

Commit 429b964

Browse files
authored
Merge pull request #5 from mostlypanda/mostlypanda-patch-5
final commit
2 parents c4038a9 + 4d5e5da commit 429b964

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

pandavoice_assistant.py

+6-26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#coden for direct play of any music on youtube search anything on youtube and also for date time and email too
2+
#code for direct play of any music on youtube search anything on youtube and also for date time and email too
33

44
import pyttsx3 #pip install pyttsx3
55
import speech_recognition as sr #pip install speechRecognition
@@ -117,21 +117,7 @@ def sendEmail(to, content):
117117
# webbrowser.open(url, new = 1)
118118
webbrowser.open_new(url)
119119

120-
121-
#query1 = takeCommand().lower()
122-
#search=browser.find_element_by_id('search')
123-
#search.send_keys(query1)
124-
#sbutton=browser.find_element_by_id('search-icon-legacy')
125-
# browser.find_elements_by_xpath()
126-
#sbutton.click()
127-
#video=browser.find_elements_by_partial_link_text('')
128-
#print(video)
129-
#speak('which number you want to listen')
130-
#print(video.__len__())
131-
#query2 = takeCommand().lower()
132-
#video[19].click()
133-
#if(query2=='1'):
134-
# video[0].click()
120+
135121
elif 'open google' in query:
136122
webbrowser.open("google.com")
137123

@@ -149,23 +135,17 @@ def sendEmail(to, content):
149135
strTime = datetime.datetime.now().strftime("%H:%M:%S")
150136
speak(f"Sir, the time is {strTime}")
151137

152-
elif 'open code' in query:
153-
codePath = "C:\\Users\\Haris\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
154-
os.startfile(codePath)
155-
156-
elif 'email to mohinesh' in query:
138+
elif 'email to my friend' in query:
157139
try:
158140
speak("What should I say?")
159141
content = takeCommand()
160-
142+
speak("to whom I have to sent the email")
143+
to=takeCommand()
161144
sendEmail(to, content)
162145
speak("Email has been sent!")
163146
except Exception as e:
164147
print(e)
165-
speak("Sorry my friend harry bhai. I am not able to send this email")
166-
167-
elif 'make me happy' in query:
168-
speak(" sarthak aayu, you are so beautiful")
148+
speak("Sorry my friend. I am not able to send this email")
169149

170150

171151
elif 'play some music' in query:

0 commit comments

Comments
 (0)