-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
41 lines (31 loc) · 979 Bytes
/
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
import pyttsx3
import time
import speech_recognition as sr
import pyjokes
import wish
import voice
import websites
import wiki
import song
import application
import weather
import news
import misc
if __name__ == '__main__':
voice.speak(wish.wish())
while True:
query = voice.takeCommand()
if 'open' in query.lower():
websites.open_website(query)
elif 'wikipedia' in query.lower():
wiki.search(query)
elif 'play' in query.lower() and 'music' in query.lower():
song.play()
elif 'start' in query.lower():
application.start(query)
elif 'weather' in query.lower():
weather.fetch_weather()
elif 'news' in query.lower():
news.get_news()
elif 'None' not in query:
misc.misc(query)