-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
run.sh
executable file
·53 lines (47 loc) · 1.25 KB
/
run.sh
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
#!/usr/bin/env bash
# Set bash to 'debug' mode, it will exit on :
# -e 'error', -u 'undefined variable', -o ... 'error in pipeline', -x 'print commands',
set -e
set -u
set -o pipefail
fs=24000
n_fft=2048
n_shift=300
win_length=1200
opts=
if [ "${fs}" -eq 24000 ]; then
# To suppress recreation, specify wav format
opts="--audio_format wav "
else
opts="--audio_format flac "
fi
train_set=train-960
valid_set=dev-clean
test_sets="dev-clean test-clean"
train_config=conf/train.yaml
inference_config=conf/decode.yaml
cleaner=tacotron
g2p=g2p_en_no_space # or g2p_en
local_data_opts="--trim_all_silence true" # trim all silence in the audio
./tts.sh \
--ngpu 8 \
--lang en \
--feats_type raw \
--local_data_opts "${local_data_opts}" \
--fs "${fs}" \
--n_fft "${n_fft}" \
--n_shift "${n_shift}" \
--win_length "${win_length}" \
--use_spk_embed true \
--spk_embed_tool kaldi \
--spk_embed_tag xvector \
--token_type phn \
--cleaner "${cleaner}" \
--g2p "${g2p}" \
--train_config "${train_config}" \
--inference_config "${inference_config}" \
--train_set "${train_set}" \
--valid_set "${valid_set}" \
--test_sets "${test_sets}" \
--srctexts "data/${train_set}/text" \
${opts} "$@"