-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (41 loc) · 1.91 KB
/
Copy pathsetup.py
File metadata and controls
54 lines (41 loc) · 1.91 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
import os
import time
def main():
if os.path.exists("installationRegistrary") == False:
print("This script may require sudo permissions...")
print("Downloading.....")
time.sleep(1)
print("Please be patient...")
time.sleep(1)
print("This may take a while...")
if os.path.exists("model"):
print("[*] models folder already exists...aborting installation")
else:
link="http://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip"
os.system("wget http://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip")
print("[*] Donwloaded!")
print("[*] unzipping...")
os.system("unzip vosk-model-small-en-us-0.15.zip")
os.system("mv vosk-model-small-en-us-0.15 model")
time.sleep(1)
print("[*] downloading required python modules...")
os.system("pip install webrtcvad")
os.system("pip install SpeechRecognition vosk pyaudio")
concern = input("Do you want to install speech systhesis(This will require docker to be installed) ? [yes | y | no | n] ")
if concern == "yes" or concern == "y":
print("installing speech systhesis...")
time.sleep(1)
print("pls give sudo permission")
time.sleep(2)
print("using docker...")
print("[*] Requesting sudo permission")
os.system("sudo docker run -it -p 5002:5002 rhasspy/larynx:en-us")
f= open("installationRegistrary","w+")
else:
print("Selected option no. Finishing script")
f= open("installationRegistrary","w+")
f.close()
else:
if os.path.exists("installationRegistrary") == True:
print("Hey user, a registrary has been registered. If you think there is a mistake, you can delete the installationRegistrary file")
main()