Loading scripts/get_loudness_data.py +11 −2 Original line number Diff line number Diff line Loading @@ -240,6 +240,9 @@ def main(args): input_audio_cache = {} tasks = [] print(f"Collecting inputs and measuring reference loudness for {cfg_formats}:") completed = 0 progressbar_update(completed, len(cfg_formats), width=50) # we need to loop over both format names so we can get a proper regex for cfg_fmt, proc_fmt in zip(cfg_formats, proc_formats): infile = FORMAT_2_FILE[proc_fmt] Loading Loading @@ -272,7 +275,11 @@ def main(args): input_audio = fromfile( proc_fmt, resampled_file, fs=int(fs) * 1000, in_meta=metadata ) try: input_loudness, _, input_loudness_format = get_loudness(input_audio) except ValueError: print(f"Error measuring input loudness for {resampled_file}") continue input_audio_cache[cache_key] = (input_loudness, input_loudness_format) # Find all output files for this format Loading Loading @@ -309,9 +316,11 @@ def main(args): pattern, ) ) completed += 1 progressbar_update(completed, len(cfg_formats), width=50) print( f"Found {len(tasks)} files to process across {len(valid_formats)} format(s)\n" f"\nFound {len(tasks)} files to process across {len(valid_formats)} format(s)\n" ) if not len(tasks): print("Nothing to do, exiting...") Loading Loading
scripts/get_loudness_data.py +11 −2 Original line number Diff line number Diff line Loading @@ -240,6 +240,9 @@ def main(args): input_audio_cache = {} tasks = [] print(f"Collecting inputs and measuring reference loudness for {cfg_formats}:") completed = 0 progressbar_update(completed, len(cfg_formats), width=50) # we need to loop over both format names so we can get a proper regex for cfg_fmt, proc_fmt in zip(cfg_formats, proc_formats): infile = FORMAT_2_FILE[proc_fmt] Loading Loading @@ -272,7 +275,11 @@ def main(args): input_audio = fromfile( proc_fmt, resampled_file, fs=int(fs) * 1000, in_meta=metadata ) try: input_loudness, _, input_loudness_format = get_loudness(input_audio) except ValueError: print(f"Error measuring input loudness for {resampled_file}") continue input_audio_cache[cache_key] = (input_loudness, input_loudness_format) # Find all output files for this format Loading Loading @@ -309,9 +316,11 @@ def main(args): pattern, ) ) completed += 1 progressbar_update(completed, len(cfg_formats), width=50) print( f"Found {len(tasks)} files to process across {len(valid_formats)} format(s)\n" f"\nFound {len(tasks)} files to process across {len(valid_formats)} format(s)\n" ) if not len(tasks): print("Nothing to do, exiting...") Loading