diff --git a/GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py b/GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py index fda70a49..cf28f3fb 100644 --- a/GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py +++ b/GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py @@ -92,7 +92,7 @@ def cut0(inp): if not set(inp).issubset(punctuation): return inp else: - return "/n" + return "\n" # 凑四句一切 diff --git a/GPT_SoVITS/module/distrib.py b/GPT_SoVITS/module/distrib.py index cabf8f8a..e96f8e00 100644 --- a/GPT_SoVITS/module/distrib.py +++ b/GPT_SoVITS/module/distrib.py @@ -87,7 +87,7 @@ def sync_buffer(buffers, average=True): for buffer, handle in handles: handle.wait() if average: - buffer.data /= world_size + buffer.data /= world_size() def sync_grad(params): diff --git a/tools/asr/funasr_asr.py b/tools/asr/funasr_asr.py index 6a5c9989..b4ddce9e 100644 --- a/tools/asr/funasr_asr.py +++ b/tools/asr/funasr_asr.py @@ -39,6 +39,7 @@ def create_model(language="zh"): local_dir="tools/asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", ) model_revision = "v2.0.4" + vad_model_revision = punc_model_revision = "v2.0.4" elif language == "yue": path_asr = "tools/asr/models/speech_UniASR_asr_2pass-cantonese-CHS-16k-common-vocab1468-tensorflow1-online" snapshot_download( @@ -51,8 +52,6 @@ def create_model(language="zh"): else: raise ValueError(f"{language} is not supported") - vad_model_revision = punc_model_revision = "v2.0.4" - if language in funasr_models: return funasr_models[language] else: diff --git a/tools/uvr5/lib/lib_v5/spec_utils.py b/tools/uvr5/lib/lib_v5/spec_utils.py index 4d987cd8..d2d2bf34 100644 --- a/tools/uvr5/lib/lib_v5/spec_utils.py +++ b/tools/uvr5/lib/lib_v5/spec_utils.py @@ -485,6 +485,8 @@ def istft(spec, hl): wave_right = librosa.istft(spec_right, hop_length=hl) wave = np.asfortranarray([wave_left, wave_right]) + return wave + if __name__ == "__main__": import argparse