MCPcopy Index your code
hub / github.com/geekcomputers/Python / main

Function main

VoiceAssistant/Project_Basic_struct/VoiceAssistant_main.py:10–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def main():
11 start = 0
12 end = 0
13 if start == 0:
14 print('\nSay "Hello Python" to activate the Voice Assistant!')
15 start += 1
16 while True:
17 q = short_hear().lower()
18 if "close" in q:
19 greet("end")
20 exit(0)
21 if "hello python" in q:
22 greet("start")
23 print_menu()
24 while True:
25 query = hear().lower()
26 if "close" in query:
27 greet("end")
28 end += 1
29 return 0
30 elif "text to speech" in query:
31 tts()
32 time.sleep(4)
33
34 elif (
35 "search on google" in query
36 or "search google" in query
37 or "google" in query
38 ):
39 google_search()
40 time.sleep(10)
41
42 elif (
43 "search on wikipedia" in query
44 or "search wikipedia" in query
45 or "wikipedia" in query
46 ):
47 wiki_search()
48 time.sleep(10)
49
50 elif "word" in query:
51 ms_word()
52 time.sleep(5)
53
54 elif "book" in query:
55 pdf_read()
56 time.sleep(10)
57
58 elif "speech to text" in query:
59 big_text()
60 time.sleep(5)
61
62 else:
63 print("I could'nt understand what you just said!")
64 speak("I could'nt understand what you just said!")
65
66 print(
67 "\nDo you want to continue? if yes then say "

Callers 1

Calls 12

short_hearFunction · 0.85
greetFunction · 0.85
exitFunction · 0.85
print_menuFunction · 0.85
hearFunction · 0.85
ttsFunction · 0.85
google_searchFunction · 0.85
wiki_searchFunction · 0.85
ms_wordFunction · 0.85
pdf_readFunction · 0.85
big_textFunction · 0.85
speakFunction · 0.70

Tested by

no test coverage detected