Commit f79cb7fa authored by Jan Kiene's avatar Jan Kiene
Browse files

format script

parent e6aca3ab
Loading
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -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.")
@@ -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
@@ -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":
@@ -248,7 +247,6 @@ class OutFileManager:


if __name__ == "__main__":

    parser = argparse.ArgumentParser(
        description="Compare .wav files in two folders using CompAudio"
    )
@@ -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()