Change the link for G2PW Model

This commit is contained in:
XXXXRT666 2025-04-01 11:22:51 +01:00
parent 27ee75e47b
commit 7edfe16a17
2 changed files with 7 additions and 14 deletions

View File

@ -50,7 +50,6 @@ bert_path = os.environ.get("bert_path", None)
version = model_version = os.environ.get("version", "v2") version = model_version = os.environ.get("version", "v2")
import gradio as gr import gradio as gr
from inference_webui import DictToAttrRecursive
from TTS_infer_pack.text_segmentation_method import get_method from TTS_infer_pack.text_segmentation_method import get_method
from TTS_infer_pack.TTS import NO_PROMPT_ERROR, TTS, TTS_Config from TTS_infer_pack.TTS import NO_PROMPT_ERROR, TTS, TTS_Config
@ -256,7 +255,7 @@ def get_weights_names(GPT_weight_root, SoVITS_weight_root):
SoVITS_names, GPT_names = get_weights_names(GPT_weight_root, SoVITS_weight_root) SoVITS_names, GPT_names = get_weights_names(GPT_weight_root, SoVITS_weight_root)
from process_ckpt import get_sovits_version_from_path_fast, load_sovits_new from process_ckpt import get_sovits_version_from_path_fast
def change_sovits_weights(sovits_path, prompt_language=None, text_language=None): def change_sovits_weights(sovits_path, prompt_language=None, text_language=None):

View File

@ -7,26 +7,20 @@ warnings.filterwarnings("ignore")
import json import json
import os import os
import zipfile import zipfile
import requests from typing import Any, Dict, List, Tuple
from typing import Any
from typing import Dict
from typing import List
from typing import Tuple
import numpy as np import numpy as np
import onnxruntime import onnxruntime
import requests
onnxruntime.set_default_logger_severity(3) onnxruntime.set_default_logger_severity(3)
from opencc import OpenCC from opencc import OpenCC
from pypinyin import Style, pinyin
from transformers import AutoTokenizer from transformers import AutoTokenizer
from pypinyin import pinyin
from pypinyin import Style
from .dataset import get_char_phoneme_labels
from .dataset import get_phoneme_labels
from .dataset import prepare_onnx_input
from .utils import load_config
from ..zh_normalization.char_convert import tranditional_to_simplified from ..zh_normalization.char_convert import tranditional_to_simplified
from .dataset import get_char_phoneme_labels, get_phoneme_labels, prepare_onnx_input
from .utils import load_config
model_version = "1.1" model_version = "1.1"
@ -63,7 +57,7 @@ def download_and_decompress(model_dir: str = "G2PWModel/"):
extract_dir = os.path.join(parent_directory, "G2PWModel_1.1") extract_dir = os.path.join(parent_directory, "G2PWModel_1.1")
extract_dir_new = os.path.join(parent_directory, "G2PWModel") extract_dir_new = os.path.join(parent_directory, "G2PWModel")
print("Downloading g2pw model...") print("Downloading g2pw model...")
modelscope_url = "https://www.modelscope.cn/models/kamiorinn/g2pw/resolve/master/G2PWModel_1.1.zip"#"https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip" modelscope_url = "https://www.modelscope.cn/models/kamiorinn/g2pw/resolve/master/G2PWModel_1.1.zip" # "https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip"
with requests.get(modelscope_url, stream=True) as r: with requests.get(modelscope_url, stream=True) as r:
r.raise_for_status() r.raise_for_status()
with open(zip_dir, "wb") as f: with open(zip_dir, "wb") as f: