From 0a5c8e57cb42309d8aa8668f624c9d6dbb8d8955 Mon Sep 17 00:00:00 2001 From: wataru Date: Fri, 4 Nov 2022 02:20:57 +0900 Subject: [PATCH] update --- start2.sh | 2 +- trainer/exec.sh | 22 +++++++++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/start2.sh b/start2.sh index 46c01613..34e64664 100644 --- a/start2.sh +++ b/start2.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eu -DOCKER_IMAGE=dannadori/voice-changer:20221103_235534 +DOCKER_IMAGE=dannadori/voice-changer:20221104_021706 #DOCKER_IMAGE=voice-changer diff --git a/trainer/exec.sh b/trainer/exec.sh index e0fbddb1..7d6184c3 100644 --- a/trainer/exec.sh +++ b/trainer/exec.sh @@ -2,6 +2,7 @@ # 参考:https://programwiz.org/2022/03/22/how-to-write-shell-script-for-option-parsing/ +#set -eux set -eu MODE=$1 @@ -19,23 +20,17 @@ echo "------" if [ "${MODE}" = "MMVC" ] ; then cd /voice-changer-internal/voice-change-service - ls /resources/* >/dev/null 2>&1 - - if [ $? -ne 0 ]; then - echo "デフォルトの設定を使用します。" - else - echo "指定された設定を使用します。" - cp -r /resources/* . - fi - - - - if [[ -e ./setting.json ]]; then - cp ./setting.json ../frontend/dist/assets/setting.json + if [[ -e /resources/setting.json ]]; then + echo "指定された設定(setting.json)を使用します。" + cp /resources/setting.json ../frontend/dist/assets/setting.json else + echo "デフォルトの設定(setting.json)を使用します。" cp ../frontend/dist/assets/setting_mmvc.json ../frontend/dist/assets/setting.json fi + find /resources/ -type f -name "config.json" | xargs -I{} sh -c 'echo "config.jsonをコピーします。" && cp {} ./' + find /resources/ -type f -name "*.pth" | xargs -I{} sh -c 'echo "`basename {}`をコピーします。" && cp {} ./' + if [ "${VERBOSE}" = "on" ]; then echo "MMVCを起動します(verbose)" python3 MMVCServerSIO.py $PARAMS @@ -43,6 +38,7 @@ if [ "${MODE}" = "MMVC" ] ; then echo "MMVCを起動します" 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 # date_tag=`date +%Y%m%d%H%M%S`