diff --git a/GPT_SoVITS/text/g2pw/onnx_api.py b/GPT_SoVITS/text/g2pw/onnx_api.py index 32fc2c01..c40eab9d 100644 --- a/GPT_SoVITS/text/g2pw/onnx_api.py +++ b/GPT_SoVITS/text/g2pw/onnx_api.py @@ -54,10 +54,11 @@ def predict(session, onnx_input: Dict[str, Any], def download_and_decompress(model_dir: str='G2PWModel/'): if not os.path.exists(model_dir): parent_directory = os.path.dirname(model_dir) - zip_dir = os.path.join(parent_directory,"G2PWModel_1.1.zip") + zip_dir = "/workspace/GPT_SoVITS/G2PWModel_1.1.zip" extract_dir = os.path.join(parent_directory,"G2PWModel_1.1") extract_dir_new = os.path.join(parent_directory,"G2PWModel") print("Downloading g2pw model...") + """ modelscope_url = "https://paddlespeech.bj.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip" with requests.get(modelscope_url, stream=True) as r: r.raise_for_status() @@ -65,8 +66,10 @@ def download_and_decompress(model_dir: str='G2PWModel/'): for chunk in r.iter_content(chunk_size=8192): if chunk: f.write(chunk) - + """ print("Extracting g2pw model...") + + with zipfile.ZipFile(zip_dir, "r") as zip_ref: zip_ref.extractall(parent_directory)