-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-common.sh
executable file
·34 lines (24 loc) · 1.02 KB
/
setup-common.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
#!/bin/bash
COMPILER_DIR="src/compiler"
COMPILER_BUILD_DIR="build"
TALKTEX_DIR="src/talktex"
TALKTEX_MODEL_DIR="deepspeech/models"
####################################################################################################
set -e # Quit on error
script_dir=$(cd -- "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")" >/dev/null && pwd)
####################################################################################################
echo "$(tput bold)TalkTeX: Starting common setup...$(tput sgr0)"
echo ""
# Install python libraries
pip3 install meson ninja deepspeech pyaudio webrtcvad halo --user
# Setup compiler
cd "$script_dir/$COMPILER_DIR"
mkdir -p "$COMPILER_BUILD_DIR"
cd "$COMPILER_BUILD_DIR"
meson
# Setup talktex
cd "$script_dir/$TALKTEX_DIR"
mkdir -p "$TALKTEX_MODEL_DIR"
wget "https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.pbmm" -O "$TALKTEX_MODEL_DIR/deepspeech-0.9.3-models.pbmm"
echo ""
echo "$(tput bold; tput setaf 2)TalkTeX: Setup succesful!$(tput sgr0)"