mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-08-30 02:30:23 +08:00
fix the some issue
This commit is contained in:
parent
ec15e48e6e
commit
ba2b3aa7b2
@ -54,10 +54,11 @@ def predict(session, onnx_input: Dict[str, Any],
|
|||||||
def download_and_decompress(model_dir: str='G2PWModel/'):
|
def download_and_decompress(model_dir: str='G2PWModel/'):
|
||||||
if not os.path.exists(model_dir):
|
if not os.path.exists(model_dir):
|
||||||
parent_directory = os.path.dirname(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 = 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://paddlespeech.bj.bcebos.com/Parakeet/released_models/g2p/G2PWModel_1.1.zip"
|
modelscope_url = "https://paddlespeech.bj.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()
|
||||||
@ -65,8 +66,10 @@ def download_and_decompress(model_dir: str='G2PWModel/'):
|
|||||||
for chunk in r.iter_content(chunk_size=8192):
|
for chunk in r.iter_content(chunk_size=8192):
|
||||||
if chunk:
|
if chunk:
|
||||||
f.write(chunk)
|
f.write(chunk)
|
||||||
|
"""
|
||||||
print("Extracting g2pw model...")
|
print("Extracting g2pw model...")
|
||||||
|
|
||||||
|
|
||||||
with zipfile.ZipFile(zip_dir, "r") as zip_ref:
|
with zipfile.ZipFile(zip_dir, "r") as zip_ref:
|
||||||
zip_ref.extractall(parent_directory)
|
zip_ref.extractall(parent_directory)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user