-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.py
35 lines (25 loc) · 1.1 KB
/
install.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
"""Imports"""
import os
import inspect
import shutil
import subprocess
from tts import veronicatts
currentpath = os.path.dirname(os.path.abspath(inspect.stack()[0][1]))
print("Installing dependencies for pyaudio")
os.system("sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0")
os.system("sudo apt-get install ffmpeg")
os.system("sudo apt-get install libatlas-base-dev libmagic-dev")
print("installing sox and pyaudio")
os.system("sudo apt-get install sox python3-pyaudio")
print("Initialising Snowboy")
subprocess.call(["make"], stdout=subprocess.PIPE, cwd=currentpath+"/snowboy/swig/Python3")
shutil.copy2(os.path.join(currentpath,"snowboy/swig/Python3/_snowboydetect.so"), currentpath)
shutil.copy2(os.path.join(currentpath,"snowboy/swig/Python3/snowboydetect.py"), currentpath)
os.system("pip3 install -r requirements.txt")
print('''Veronica is now ready to be used
Before that make sure that you have obtained pmdl file from docker
and had pasted in \"models\" folder.''')
try:
veronicatts("Hello, Good to see you")
except ImportError as k:
print("There's some problem")