-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_scvoice.sh
executable file
·45 lines (38 loc) · 1.26 KB
/
install_scvoice.sh
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
#!/bin/bash
# Echo the welcome message
echo "Welcome to SCvoice installer"
# Check if ffmpeg is installed
if ! dpkg -s ffmpeg &> /dev/null; then
echo "ffmpeg is not installed. Attempting to install..."
sudo apt install ffmpeg
else
echo "ffmpeg is already installed"
fi
# Check if espeak-ng is installed
if ! dpkg -s espeak-ng &> /dev/null; then
echo "espeak-ng is not installed. Attempting to install..."
sudo apt install espeak-ng
else
echo "espeak-ng is already installed"
fi
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Virtual environment not found. Creating virtual Python environment..."
python3 -m venv venv
else
echo "Virtual environment already exists"
fi
# List of required Python libraries
required_libraries=("speechrecognition" "espeakng" "pynput" "pyaudio" "vosk" "multiprocess" "pyttsx4" "comtypes" "pydub")
# Iterate through the list and check/install each library
for library in "${required_libraries[@]}"; do
if ! venv/bin/pip3 show "$library" &> /dev/null; then
echo "Installing $library..."
venv/bin/pip3 install "$library"
else
echo "$library is already installed"
fi
done
# Echo the process of starting SCvoice
echo "Trying to start SCvoice"
venv/bin/python3 scvoice.py