Skip to content

Instantly share code, notes, and snippets.

@SolomidHero
Last active September 30, 2021 12:19
Show Gist options
  • Save SolomidHero/84ec6850bbebebca37d837a05bcd1ad9 to your computer and use it in GitHub Desktop.
Save SolomidHero/84ec6850bbebebca37d837a05bcd1ad9 to your computer and use it in GitHub Desktop.
Server start script (for FastSpeech2 repo, MFA, etc).
#! /bin/bash
# common utils
apt update && apt-get install -y sudo git vim wget unzip rubberband-cli sox
sudo apt-get install -y libsndfile1-dev libopenblas-base
pip install gdown librosa
# conda environment for Montreal-Forced-Aligner
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p ~/miniconda
# MFA
source ~/miniconda/bin/activate
conda install -y -c conda-forge openblas openfst pynini ngram baumwelch
pip install montreal-forced-aligner
mfa thirdparty download
mfa download acoustic english
mfa download g2p english_g2p
conda deactivate
# Datasets
mkdir ~/data
cd ~/data
# vctk (txt/ and wav48_silence_trimmed/{spk}/{utt})
wget --no-check-certificate https://datashare.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip
unzip -qo VCTK-Corpus-0.92.zip
rm -r txt/{p280,p315,s5} wav48_silence_trimmed/{p280,p315,s5}
cd txt; for i in $(find . -name "*.txt"); do
cp $i ../wav48_silence_trimmed/${i/.txt/_mic1.txt};
cp $i ../wav48_silence_trimmed/${i/.txt/_mic2.txt};
done
# Fastspeech2
cd ~/
git clone git@github.com:SpeechTools-ai/FastSpeech.git FastSpeech2
pip3 install -r FastSpeech2/requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment