File size: 974 Bytes
e9541e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/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)'