Fixes to filter_clips_hifreq

This commit is contained in:
James Betker 2021-11-07 18:42:22 -07:00
parent a367ea3fda
commit 9b693b0a54
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,8 @@ def filter_no_hifreq_data(path, output_path):
return return
stft = get_spec_mags(clip) stft = get_spec_mags(clip)
if stft.mean() < .08: if stft.mean() < .08:
print(f"Ignore {path}") with open(output_path, 'a') as o:
o.write(f'{path}\n')
if __name__ == '__main__': if __name__ == '__main__':
do_to_files(filter_no_hifreq_data) do_to_files(filter_no_hifreq_data)

View File

@ -30,7 +30,6 @@ def do_to_files(process_file_fn):
resume = args.resume resume = args.resume
num_workers = int(args.num_workers) num_workers = int(args.num_workers)
os.makedirs(out, exist_ok=True)
path = pathlib.Path(src) path = pathlib.Path(src)
files = path.rglob(glob) files = path.rglob(glob)
files = [str(f) for f in files] files = [str(f) for f in files]