-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpluto_assistant.py
More file actions
75 lines (65 loc) · 1.73 KB
/
pluto_assistant.py
File metadata and controls
75 lines (65 loc) · 1.73 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import subprocess as sp
import pyttsx3
import os
import pyfiglet
from docker_module import docker
from hadoop_module import hadoop
from cloud_module import multi_cloud
from chat_module import chat
def text_menu():
os.system("clear")
sp.getoutput("pulseaudio --start")
os.system("tput setaf 2")
os.system("figlet 'Helper Program'")
greet='Hello I am Pluto,your technical helper'
os.system("espeak-ng 'Hello I am Pluto your technical assistant'")
print(greet)
print("-------------------------------------------Here is the menu-------------------------------------\nEnter the option number")
os.system("tput setaf 3")
print("""
1. Cloud Services
2. Docker Services
3. Hadoop Services
4. Chat Service
5. Exit
""")
os.system("tput setaf 6")
option=int(input())
#os.system("clear")
if option==1:
multi_cloud()
elif option==2:
docker()
elif option==3:
hadoop()
elif option==4:
chat()
elif option==5:
close()
os.system("clear")
os.system("tput setaf 4")
sp.getoutput("dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y")
sp.getoutput("yum install figlet -y")
os.system("tput bold")
os.system("figlet 'Welcome !!'")
print("Please enter the choice for communication")
print("""
1. Text
2. Voice
""")
ch=int(input())
os.system("clear")
sp.getoutput("pulseaudio --start")
if(ch==1):
while True:
text_menu();
os.system("clear")
else:
r=sr.Recognizer()
print("Please Speak!!!!!")
with sr.Microphone() as source:
a=sp.getoutput("clear")
print(a)
audio=r.listen(source)
ins=r.recognize_google(audio)
print(ins)