Merge pull request #82 from w-okada/dev

update
This commit is contained in:
w-okada 2022-11-03 23:42:30 +09:00 committed by GitHub
commit 51f9918b16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 130 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -eu
DOCKER_IMAGE=dannadori/voice-changer:20221103_232710
DOCKER_IMAGE=dannadori/voice-changer:20221103_234102
#DOCKER_IMAGE=voice-changer

View File

@ -4,7 +4,6 @@
set -eu
MODE=$1
PARAMS=${@:2:($#-1)}
@ -20,7 +19,12 @@ echo "------"
if [ "${MODE}" = "MMVC" ] ; then
cd /voice-changer-internal/voice-change-service
cp -r /resources/* .
if [ -d /resources ]; then
cp -r /resources/* .
fi
if [[ -e ./setting.json ]]; then
cp ./setting.json ../frontend/dist/assets/setting.json
else
@ -32,7 +36,7 @@ if [ "${MODE}" = "MMVC" ] ; then
python3 MMVCServerSIO.py $PARAMS
else
echo "MMVCを起動します"
python3 MMVCServerSIO.py $PARAMS $PARAMS 2>stderr.txt
python3 MMVCServerSIO.py $PARAMS 2>stderr.txt
fi
elif [ "${MODE}" = "MMVC_TRAIN" ] ; then
python3 create_dataset_jtalk.py -f train_config -s 24000 -m dataset/multi_speaker_correspondence.txt
@ -52,129 +56,3 @@ elif [ "${MODE}" = "MMVC_TRAIN" ] ; then
fi
# usage() {
# echo "
# usage:
# For training
# $0 [-t] [-b batch_size] [-r]
# -t: flag for training mode
# -b: batch_size.
# -r: flag for resuming training.
# For changing voice
# $0 [-v] [-c config] [-m model]
# -v: flag for voice change mode
# -c: config
# -m: model name
# For help
# $0 [-h]
# -h: show this help
# " >&2
# }
# warn () {
# echo "! ! ! $1 ! ! !"
# exit 1
# }
# training_flag=false
# batch_size=10
# resume_flag=false
# voice_change_flag=false
# config=
# model=
# escape_flag=false
# # オプション解析
# while getopts tb:rvc:m:hx OPT; do
# case $OPT in
# t)
# training_flag=true
# ;;
# b)
# batch_size="$OPTARG"
# ;;
# r)
# resume_flag=true
# ;;
# v)
# voice_change_flag=true
# ;;
# c)
# config="$OPTARG"
# ;;
# m)
# model="$OPTARG"
# ;;
# h | \?)
# usage && exit 1
# ;;
# x)
# escape_flag=true
# esac
# done
# # ## コマンドライン引数から、オプション引数分を削除
# # # shift $((OPTIND - 1))
# # # モード解析
# # if $training_flag && $voice_change_flag; then
# # warn "-tトレーニングモード と -vボイチェンモードは同時に指定できません。"
# # exit 1
# # elif $training_flag; then
# # echo "■■■ ト レ ー ニ ン グ モ ー ド ■■■"
# # elif $voice_change_flag; then
# # echo "■■■ ボ イ チ ェ ン モ ー ド ■■■"
# # elif $escape_flag; then
# # /bin/bash
# # else
# # warn "-tトレーニングモード と -vボイチェンモードのいずれかを指定してください。"
# # exit 1
# # fi
# if $training_flag; then
# python3 create_dataset_jtalk.py -f train_config -s 24000 -m dataset/multi_speaker_correspondence.txt
# # date_tag=`date +%Y%m%d%H%M%S`
# sed -ie 's/80000/8000/' train_ms.py
# sed -ie "s/\"batch_size\": 10/\"batch_size\": $batch_size/" configs/train_config.json
# sed -ie "s/torch.cuda.device_count()/1/" train_ms.py
# python3 -m tensorboard.main --logdir logs --port 6006 --host 0.0.0.0 &
# if ${resume_flag}; then
# echo "トレーニング再開。バッチサイズ: ${batch_size}。"
# python3 train_ms.py -c configs/train_config.json -m vc
# else
# echo "トレーニング開始。バッチサイズ: ${batch_size}。"
# python3 train_ms.py -c configs/train_config.json -m vc -fg fine_model/G_180000.pth -fd fine_model/D_180000.pth
# fi
# fi
# if $voice_change_flag; then
# if [[ -z "$config" ]]; then
# warn "コンフィグファイル(-c)を指定してください"
# fi
# if [[ -z "$model" ]]; then
# warn "モデルファイル(-m)を指定してください"
# fi
# cd /voice-changer-internal/voice-change-service
# cp -r /resources/* .
# if [[ -e ./setting.json ]]; then
# cp ./setting.json ../frontend/dist/assets/setting.json
# fi
# echo "-----------!!"
# echo $config $model
# echo $model
# python3 serverSIO.py -p 8080 -c $config -m $model --https True --httpsSelfSigned True
# fi