Skip to content

Commit

Permalink
Validate that inputdir is a filtered raw subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
kdu4108 committed Aug 5, 2024
1 parent 7c98e82 commit 6421dd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pseudolabeling/v2d_to_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pseudolabeling/v2d_to_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6421dd5

Please sign in to comment.