update musan symlinks

This commit is contained in:
Bailey Hirota 2025-07-11 11:00:09 +09:00
parent 6e70cdc658
commit ea88c55794

View File

@ -80,17 +80,23 @@ if __name__ == "__main__":
musan_manifest_path = multi_recipe_manifests_root / "musan" / "musan_cuts.jsonl.gz" musan_manifest_path = multi_recipe_manifests_root / "musan" / "musan_cuts.jsonl.gz"
if musan_manifest_path.exists(): if musan_manifest_path.exists():
logger.info(f"Processing musan manifest: {musan_manifest_path}") logger.info(f"Processing musan manifest: {musan_manifest_path}")
try: try:
musan_cuts = load_manifest(musan_manifest_path) musan_cuts = load_manifest(musan_manifest_path)
updated_musan_cuts = update_paths( updated_musan_cuts = update_paths(
musan_cuts, musan_cuts,
"musan", "musan",
old_feature_prefix=original_feature_base_path old_feature_prefix=original_feature_base_path
) )
# Make sure we're overwriting the correct path even if it's a symlink
if musan_manifest_path.is_symlink() or musan_manifest_path.exists():
logger.info(f"Overwriting existing musan manifest at: {musan_manifest_path}")
os.unlink(musan_manifest_path)
updated_musan_cuts.to_file(musan_manifest_path) updated_musan_cuts.to_file(musan_manifest_path)
logger.info(f"Updated musan cuts saved to: {musan_manifest_path}") logger.info(f"Updated musan cuts written to: {musan_manifest_path}")
except Exception as e:
except Exception as e:
logger.error(f"Error processing musan manifest {musan_manifest_path}: {e}", exc_info=True) logger.error(f"Error processing musan manifest {musan_manifest_path}: {e}", exc_info=True)
else: else:
logger.warning(f"Musan manifest not found at {musan_manifest_path}, skipping.") logger.warning(f"Musan manifest not found at {musan_manifest_path}, skipping.")