diff --git a/pseudolabeling/v2d_to_metadata.py b/pseudolabeling/v2d_to_metadata.py index e821a85..16764fe 100644 --- a/pseudolabeling/v2d_to_metadata.py +++ b/pseudolabeling/v2d_to_metadata.py @@ -94,6 +94,9 @@ def process_json_file(json_file_path, output_dir, dataset): def main(args): + if "filtered_raw" not in args.input_dir: + raise ValueError(f"Expected input dir to be a subdir of `filtered_raw/`, instead received {args.input_dir}.") + output_dir = ( args.output_dir if args.output_dir is not None diff --git a/pseudolabeling/v2d_to_transcript.py b/pseudolabeling/v2d_to_transcript.py index cccde55..f24d53b 100644 --- a/pseudolabeling/v2d_to_transcript.py +++ b/pseudolabeling/v2d_to_transcript.py @@ -103,6 +103,9 @@ def process_json_file(json_file_path, output_dir): def main(args): + if "filtered_raw" not in args.input_dir: + raise ValueError(f"Expected input dir to be a subdir of `filtered_raw/`, instead received {args.input_dir}.") + current_folder = os.path.join(args.input_dir, args.whisper_dir) output_dir = ( args.output_dir