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

also pass playback level to PQevalAudio

parent 306455c3
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ def pqevalaudio_wrapper(
    ref_sig: np.ndarray,
    eval_sig: np.ndarray,
    fs: int,
    playback_level: float = 92.0,
) -> str:
    with tempfile.TemporaryDirectory() as tmp_dir:
        tmp_dir = Path(tmp_dir)
@@ -231,7 +232,13 @@ def pqevalaudio_wrapper(
        pyaudio3dtools.audiofile.writefile(tmp_file_ref, r48, 48000)
        pyaudio3dtools.audiofile.writefile(tmp_file_eval, t48, 48000)

        cmd = ["PQevalAudio", tmp_file_ref, tmp_file_eval]
        cmd = [
            "PQevalAudio",
            "--levelSPL",
            f"{playback_level}",
            tmp_file_ref,
            tmp_file_eval,
        ]

        result = subprocess.run(cmd, capture_output=True)
        if result.returncode != 0: