Loading scripts/batch_comp_audio.py +9 −8 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ DIFF_STR = { "mld": "{label} MLD diff for file {f}: {diff}", } def main(args): def main(args): tool = args.tool if shutil.which(tool) is None: print(f"{tool} not in PATH - abort.") Loading Loading @@ -83,7 +83,7 @@ def main(args): repeat(fol1), repeat(fol2), repeat(outputs), repeat(tool) repeat(tool), ) else: # if only one thread is passed, do everything in the main thread Loading @@ -104,7 +104,6 @@ def main(args): out_file.write("filename,mld\n") for f, tool_output in out.items(): if tool == "CompAudio": diff, snr, gain, seg_snr = tool_output elif tool == "mld": Loading Loading @@ -248,7 +247,6 @@ class OutFileManager: if __name__ == "__main__": parser = argparse.ArgumentParser( description="Compare .wav files in two folders using CompAudio" ) Loading Loading @@ -285,7 +283,10 @@ if __name__ == "__main__": "-t", "--num_threads", type=int, default=1, help="Number of threads to use" ) parser.add_argument( "--tool", choices=["mld", "CompAudio"], default="CompAudio", help="Compare tool to run" "--tool", choices=["mld", "CompAudio"], default="CompAudio", help="Compare tool to run", ) args = parser.parse_args() Loading Loading
scripts/batch_comp_audio.py +9 −8 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ DIFF_STR = { "mld": "{label} MLD diff for file {f}: {diff}", } def main(args): def main(args): tool = args.tool if shutil.which(tool) is None: print(f"{tool} not in PATH - abort.") Loading Loading @@ -83,7 +83,7 @@ def main(args): repeat(fol1), repeat(fol2), repeat(outputs), repeat(tool) repeat(tool), ) else: # if only one thread is passed, do everything in the main thread Loading @@ -104,7 +104,6 @@ def main(args): out_file.write("filename,mld\n") for f, tool_output in out.items(): if tool == "CompAudio": diff, snr, gain, seg_snr = tool_output elif tool == "mld": Loading Loading @@ -248,7 +247,6 @@ class OutFileManager: if __name__ == "__main__": parser = argparse.ArgumentParser( description="Compare .wav files in two folders using CompAudio" ) Loading Loading @@ -285,7 +283,10 @@ if __name__ == "__main__": "-t", "--num_threads", type=int, default=1, help="Number of threads to use" ) parser.add_argument( "--tool", choices=["mld", "CompAudio"], default="CompAudio", help="Compare tool to run" "--tool", choices=["mld", "CompAudio"], default="CompAudio", help="Compare tool to run", ) args = parser.parse_args() Loading