parent
51206ccb8e
commit
fc60f1783a
@ -1,22 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
config_path=$1
|
config_path=$1
|
||||||
train_output_path=$2
|
train_output_path=$2
|
||||||
ckpt_name=$3
|
ckpt_name=$3
|
||||||
ge2e_params_path=$4
|
ge2e_params_path=$4
|
||||||
add_blank=$5
|
add_blank=$5
|
||||||
ref_audio_dir=$6
|
ref_audio_dir=$6
|
||||||
src_audio_path=$7
|
src_audio_path=$7
|
||||||
|
|
||||||
FLAGS_allocator_strategy=naive_best_fit \
|
FLAGS_allocator_strategy=naive_best_fit \
|
||||||
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
|
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
|
||||||
python3 ${BIN_DIR}/voice_cloning.py \
|
python3 ${BIN_DIR}/voice_cloning.py \
|
||||||
--config=${config_path} \
|
--config=${config_path} \
|
||||||
--ckpt=${train_output_path}/checkpoints/${ckpt_name} \
|
--ckpt=${train_output_path}/checkpoints/${ckpt_name} \
|
||||||
--ge2e_params_path=${ge2e_params_path} \
|
--ge2e_params_path=${ge2e_params_path} \
|
||||||
--phones_dict=dump/phone_id_map.txt \
|
--phones_dict=dump/phone_id_map.txt \
|
||||||
--text="凯莫瑞安联合体的经济崩溃迫在眉睫。" \
|
--text="凯莫瑞安联合体的经济崩溃迫在眉睫。" \
|
||||||
--audio-path=${src_audio_path} \
|
--audio-path=${src_audio_path} \
|
||||||
--input-dir=${ref_audio_dir} \
|
--input-dir=${ref_audio_dir} \
|
||||||
--output-dir=${train_output_path}/vc_syn \
|
--output-dir=${train_output_path}/vc_syn \
|
||||||
--add-blank=${add_blank}
|
--add-blank=${add_blank}
|
||||||
|
@ -1,45 +1,45 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
source path.sh
|
source path.sh
|
||||||
|
|
||||||
gpus=0,1,2,3
|
gpus=0,1,2,3
|
||||||
stage=0
|
stage=0
|
||||||
stop_stage=100
|
stop_stage=100
|
||||||
|
|
||||||
conf_path=conf/default.yaml
|
conf_path=conf/default.yaml
|
||||||
train_output_path=exp/default
|
train_output_path=exp/default
|
||||||
ckpt_name=snapshot_iter_153.pdz
|
ckpt_name=snapshot_iter_153.pdz
|
||||||
add_blank=true
|
add_blank=true
|
||||||
ref_audio_dir=ref_audio
|
ref_audio_dir=ref_audio
|
||||||
src_audio_path=''
|
src_audio_path=''
|
||||||
|
|
||||||
# not include ".pdparams" here
|
# not include ".pdparams" here
|
||||||
ge2e_ckpt_path=./ge2e_ckpt_0.3/step-3000000
|
ge2e_ckpt_path=./ge2e_ckpt_0.3/step-3000000
|
||||||
|
|
||||||
# include ".pdparams" here
|
# include ".pdparams" here
|
||||||
ge2e_params_path=${ge2e_ckpt_path}.pdparams
|
ge2e_params_path=${ge2e_ckpt_path}.pdparams
|
||||||
|
|
||||||
# with the following command, you can choose the stage range you want to run
|
# with the following command, you can choose the stage range you want to run
|
||||||
# such as `./run.sh --stage 0 --stop-stage 0`
|
# such as `./run.sh --stage 0 --stop-stage 0`
|
||||||
# this can not be mixed use with `$1`, `$2` ...
|
# this can not be mixed use with `$1`, `$2` ...
|
||||||
source ${MAIN_ROOT}/utils/parse_options.sh || exit 1
|
source ${MAIN_ROOT}/utils/parse_options.sh || exit 1
|
||||||
|
|
||||||
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
|
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
|
||||||
# prepare data
|
# prepare data
|
||||||
CUDA_VISIBLE_DEVICES=${gpus} ./local/preprocess.sh ${conf_path} ${add_blank} ${ge2e_ckpt_path} || exit -1
|
CUDA_VISIBLE_DEVICES=${gpus} ./local/preprocess.sh ${conf_path} ${add_blank} ${ge2e_ckpt_path} || exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
|
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
|
||||||
# train model, all `ckpt` under `train_output_path/checkpoints/` dir
|
# train model, all `ckpt` under `train_output_path/checkpoints/` dir
|
||||||
CUDA_VISIBLE_DEVICES=${gpus} ./local/train.sh ${conf_path} ${train_output_path} || exit -1
|
CUDA_VISIBLE_DEVICES=${gpus} ./local/train.sh ${conf_path} ${train_output_path} || exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
|
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
|
||||||
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name} || exit -1
|
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name} || exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
|
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
|
||||||
CUDA_VISIBLE_DEVICES=${gpus} ./local/voice_cloning.sh ${conf_path} ${train_output_path} ${ckpt_name} \
|
CUDA_VISIBLE_DEVICES=${gpus} ./local/voice_cloning.sh ${conf_path} ${train_output_path} ${ckpt_name} \
|
||||||
${ge2e_params_path} ${add_blank} ${ref_audio_dir} ${src_audio_path} || exit -1
|
${ge2e_params_path} ${add_blank} ${ref_audio_dir} ${src_audio_path} || exit -1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in new issue