blob: cef738daf55201f8e105a63886b489c399db96b3 (
plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
# workon samplernn
function generate () {
exp_name=${1%.*}
n_samples=$2
sample_rate=$3
duration=$4
let sample_length=$3*$4
sleep 0.1
echo ""
echo "###################################################"
echo "###################################################"
echo "###################################################"
echo ""
echo ">> generating $exp_name"
echo ""
echo "###################################################"
echo "###################################################"
echo "###################################################"
echo ""
python generate.py \
--exp $exp_name --dataset $exp_name \
--frame_sizes 8 2 \
--n_rnn 2 --dim 1024 --q_levels 256 \
--seq_len 1024 --batch_size 128 \
--val_frac 0.1 --test_frac 0.1 \
--sample_rate $sample_rate \
--sample_length $sample_length \
--keep_old_checkpoints False \
--n_samples $n_samples \
--epoch_limit 1 \
--resume True
}
function gen_len () {
exp_name=${1%.*}
n_samples=$2
sample_rate=$3
sample_length=$4
sleep 0.1
echo ""
echo "###################################################"
echo "###################################################"
echo "###################################################"
echo ""
echo ">> generating $exp_name"
echo ""
echo "###################################################"
echo "###################################################"
echo "###################################################"
echo ""
python generate.py \
--exp $exp_name --dataset $exp_name \
--frame_sizes 8 2 \
--n_rnn 2 --dim 1024 --q_levels 256 \
--seq_len 1024 --batch_size 128 \
--val_frac 0.1 --test_frac 0.1 \
--sample_rate $sample_rate \
--sample_length $sample_length \
--keep_old_checkpoints False \
--n_samples $n_samples \
--epoch_limit 1 \
--resume True
}
function run () {
exp_name=${1%.*}
epoch_limit=$2
n_samples=$3
sample_rate=$4
duration=$5
let sample_length=$4*$5
sleep 0.1
echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""
echo ">> running $exp_name"
echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""
python train.py \
--exp $exp_name --dataset $exp_name \
--frame_sizes 8 2 \
--n_rnn 2 --dim 1024 --q_levels 256 \
--seq_len 1024 --batch_size 128 \
--val_frac 0.1 --test_frac 0.1 \
--sample_rate $sample_rate \
--sample_length $sample_length \
--n_samples $n_samples \
--keep_old_checkpoints False \
--epoch_limit $epoch_limit \
--resume True
}
function standard () {
dataset=$1
run $1 6 6 44100 5
./latest.pl -l $1
}
function quick () {
dataset=$1
run $1 4 6 44100 5
./latest.pl -l $1
}
function half () {
dataset=$1
run $1 2 6 44100 5
./latest.pl -l $1
}
function fast () {
dataset=$1
run $1 1 6 44100 10
./latest.pl -l $1
}
function emph () {
dataset=$1
run $1 1 6 44100 10
run $1 3 6 44100 5
./latest.pl -l $1
}
function start () {
dataset=$1
cd datasets/
perl dataset.pl "${dataset}.wav"
cd ..
quick $dataset
}
function start_standard () {
dataset=$1
cd datasets/
perl dataset.pl "${dataset}.wav"
cd ..
standard $dataset
}
|