ROOT_DIR="/tmp/ljs-tts-dur"

# Update package list
sudo apt update

# Install Python 3.8
sudo apt install python3-pip python3.10 python3.10-dev python3.10-distutils python3.10-venv -y

# Empty "ROOT_DIR"
rm -rf "$ROOT_DIR"
mkdir -p "$ROOT_DIR"

# Create virtual environment
# All tools will be installed there and can only be run if the venv is activated
python3.10 -m venv "$ROOT_DIR/.venv"

# activate environment
source "$ROOT_DIR/.venv/bin/activate"

# Install/update tools for installing software
python3.10 -m pip install \
  wheel==0.38.4 \
  setuptools==65.6.3

# Install tools
python3.10 -m pip install \
  numpy==1.22.3 \
  tacotron-cli==0.0.3 \
  waveglow-cli==0.0.1 \
  dict-from-dict==0.0.3 \
  textgrid-tools==0.0.6
