diff --git a/codes/scripts/audio/preparation/filter_clips_with_no_hifreq_data.py b/codes/scripts/audio/preparation/filter_clips_with_no_hifreq_data.py index 413be9d8..98ce01e7 100644 --- a/codes/scripts/audio/preparation/filter_clips_with_no_hifreq_data.py +++ b/codes/scripts/audio/preparation/filter_clips_with_no_hifreq_data.py @@ -17,7 +17,8 @@ def filter_no_hifreq_data(path, output_path): return stft = get_spec_mags(clip) if stft.mean() < .08: - print(f"Ignore {path}") + with open(output_path, 'a') as o: + o.write(f'{path}\n') if __name__ == '__main__': do_to_files(filter_no_hifreq_data) \ No newline at end of file diff --git a/codes/scripts/do_to_files.py b/codes/scripts/do_to_files.py index 0edda8bb..4af623ed 100644 --- a/codes/scripts/do_to_files.py +++ b/codes/scripts/do_to_files.py @@ -30,7 +30,6 @@ def do_to_files(process_file_fn): resume = args.resume num_workers = int(args.num_workers) - os.makedirs(out, exist_ok=True) path = pathlib.Path(src) files = path.rglob(glob) files = [str(f) for f in files]