From fe0a3f6a1f1476d7b0a3c0e7b627ab0a84be6d0b Mon Sep 17 00:00:00 2001 From: Kedreamix Date: Sun, 4 Aug 2024 05:54:41 +0800 Subject: [PATCH] update dependences for coxyvoice --- requirements_webui.txt | 3 ++- scripts/download_models.sh | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/requirements_webui.txt b/requirements_webui.txt index 4b421a80..24095a7d 100644 --- a/requirements_webui.txt +++ b/requirements_webui.txt @@ -102,4 +102,5 @@ LangSegment # CosyVoice related libraries conformer==0.3.2 lightning==2.2.4 -wget==3.2 \ No newline at end of file +wget==3.2 +HyperPyYAML==1.2.2 \ No newline at end of file diff --git a/scripts/download_models.sh b/scripts/download_models.sh index 682a5ebb..bd4c7eb7 100644 --- a/scripts/download_models.sh +++ b/scripts/download_models.sh @@ -168,7 +168,39 @@ else exit 1 fi -echo "All models have been successfully moved and +# 9. CosyVoice模型 +# CosyVoice model +# Check if the CosyVoice checkpoints directory exists +if [ -d "checkpoints/CosyVoice_ckpt" ]; then + # Create the CosyVoice/pretrained_models directory if it doesn't exist + mkdir -p CosyVoice/pretrained_models + + # Move the CosyVoice-ttsfrd directory to the CosyVoice/pretrained_models directory + mv checkpoints/CosyVoice_ckpt/CosyVoice-ttsfrd CosyVoice/pretrained_models + + # Check if the move operation was successful + if [ $? -ne 0 ]; then + echo "Failed to move CosyVoice-ttsfrd directory." + echo "移动 CosyVoice-ttsfrd 目录失败。" + exit 1 + fi + + # Unzip the resource.zip file inside the CosyVoice-ttsfrd directory + unzip CosyVoice/pretrained_models/CosyVoice-ttsfrd/resource.zip -d CosyVoice/pretrained_models/CosyVoice-ttsfrd + pip install CosyVoice/pretrained_models/CosyVoice-ttsfrd/ttsfrd-0.3.6-cp38-cp38-linux_x86_64.whl + + # Check if the unzip operation was successful + if [ $? -ne 0 ]; then + echo "Failed to unzip resource.zip." + echo "解压 resource.zip 失败。" + exit 1 + + fi +else + echo "Directory Kedreamix/Linly-Talker/checkpoints/CosyVoice_ckpt does not exist, cannot move CosyVoice model." + echo "目录 Kedreamix/Linly-Talker/checkpoints/CosyVoice_ckpt 不存在,无法移动 CosyVoice 模型。" + exit 1 +fi - are ready." +echo "All models have been successfully moved and are ready." echo "所有模型已成功移动并准备就绪。"