|
#!/bin/bash |
|
|
|
set -euo pipefail |
|
|
|
if ! command -v -- ffmpeg > /dev/null 2>&1; then |
|
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz |
|
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5 |
|
md5sum -c ffmpeg-git-amd64-static.tar.xz.md5 |
|
tar xf ffmpeg-git-amd64-static.tar.xz |
|
[ -z VIRTUAL_ENV ] \ |
|
&& sudo mv ffmpeg-git-*-static/ffprobe ffmpeg-git-*-static/ffmpeg /usr/local/bin/ \ |
|
|| mv ffmpeg-git-*-static/ffprobe ffmpeg-git-*-static/ffmpeg "$VIRTUAL_ENV/bin" |
|
rm -rf ffmpeg-git-* |
|
fi |
|
|
|
(command -v -- rustup > /dev/null 2>&1) || (wget -qO - https://sh.rustup.rs | sh -s -- -y) |
|
export PATH="$HOME/.cargo/bin:$PATH" |
|
|
|
git clone https://github.com/metavoiceio/metavoice-src.git |
|
cd metavoice-src |
|
pip install torch |
|
pip install -r requirements.txt |
|
pip install --upgrade torch torchaudio |
|
pip install . |
|
cd - |
|
rm -rf metavoice-src |
|
|
|
python -c 'from audiocraft.models import MultiBandDiffusion; MultiBandDiffusion.get_mbd_24khz(bw=6)' |