File size: 1,686 Bytes
319e348
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash

echo working dir is $(pwd)
echo downloading requirement aria2 check.

if command -v aria2c &> /dev/null
then
    echo "aria2c command found"
else
    echo failed. please install aria2
    sleep 5
    exit 1
fi

rmvpe="rmvpe.pt"
dlrmvpe="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt"

hb="hubert_base.pt"
dlhb="https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt"

echo dir check finished.

echo required files check start.

echo checking $rmvpe
if [ -f "./assets/rmvpe/$rmvpe" ]; then
    echo $rmvpe in ./assets/rmvpe checked.
else
    echo failed. starting download from huggingface.
    if command -v aria2c &> /dev/null; then
        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlrmvpe -d ./assets/rmvpe -o $rmvpe
        if [ -f "./assets/rmvpe/$rmvpe" ]; then
            echo download successful.
        else
            echo please try again!
            exit 1
        fi
    else
        echo aria2c command not found. Please install aria2c and try again.
        exit 1
    fi
fi

echo checking $hb
if [ -f "./assets/hubert/$hb" ]; then
    echo $hb in ./assets/hubert/pretrained checked.
else
    echo failed. starting download from huggingface.
    if command -v aria2c &> /dev/null; then
        aria2c --console-log-level=error -c -x 16 -s 16 -k 1M $dlhb -d ./assets/hubert/ -o $hb
        if [ -f "./assets/hubert/$hb" ]; then
            echo download successful.
        else
            echo please try again!
            exit 1
        fi
    else
        echo aria2c command not found. Please install aria2c and try again.
        exit 1
    fi
fi

echo required files check finished.