diff --git a/preprocess_text.py b/preprocess_text.py index 3aebbfe..1167277 100644 --- a/preprocess_text.py +++ b/preprocess_text.py @@ -69,6 +69,7 @@ def preprocess( ) ) except Exception as e: + print(line) print(f"生成训练集和验证集时发生错误!, 详细信息:\n{e}") transcription_path = cleaned_path @@ -124,12 +125,12 @@ def preprocess( json_config["data"]["spk2id"] = spk_id_map # 新增写入:写入训练版本、数据集路径 json_config["version"] = latest_version - json_config["data"]["training_files"] = os.path.normpath( - preprocess_text_config.train_path - ).replace("\\", "/") - json_config["data"]["validation_files"] = os.path.normpath( - preprocess_text_config.val_path - ).replace("\\", "/") + json_config["data"]["training_files"] = os.path.normpath(train_path).replace( + "\\", "/" + ) + json_config["data"]["validation_files"] = os.path.normpath(val_path).replace( + "\\", "/" + ) with open(config_path, "w", encoding="utf-8") as f: json.dump(json_config, f, indent=2, ensure_ascii=False) print("训练集和验证集生成完成!")