Commit 1fd83227 authored by norvell's avatar norvell
Browse files

Make PEAQ run on 1-2 channel input

parent e05675af
Loading
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ def cmp_pcm(
    abs_tol=0,
    get_ssnr=False,
    get_odg=False,
    peaq_binaural=False,
    ref_jbm_tf: Optional[Path] = None,
    cut_jbm_tf: Optional[Path] = None,
) -> (int, str):
@@ -129,6 +130,15 @@ def cmp_pcm(
            reason += msg + " - "

    if get_odg:
        if peaq_binaural:
                pqeval_output = pqevalaudio_wrapper(s1, s2, fs)

                match_odg = re.search(ODG_PATTERN_PQEVALAUDIO, pqeval_output)
                odg = float(match_odg.groups()[0])
                msg = f"ODG: {odg}"
                reason += " - " + msg
                print(msg)
        else:
            for n in range(nchannels):
                pqeval_output = pqevalaudio_wrapper(s1[:, n], s2[:, n], fs)

+1 −0
Original line number Diff line number Diff line
@@ -514,6 +514,7 @@ def test_param_file_tests(
            allow_differing_lengths=allow_differing_lengths,
            get_ssnr=get_ssnr,
            get_odg=get_odg,
            peaq_binaural=peaq_binaural,
            ref_jbm_tf=ref_tracefile_dec,
            cut_jbm_tf=dut_tracefile_dec,
        )
+1 −0
Original line number Diff line number Diff line
@@ -1235,6 +1235,7 @@ def sba_dec(
            allow_differing_lengths=allow_differing_lengths,
            get_ssnr=get_ssnr,
            get_odg=get_odg,
            peaq_binaural=peaq_binaural,
        )

        text_to_parse = reason