ludlows / PESQ

PESQ (Perceptual Evaluation of Speech Quality) Wrapper for Python Users (narrow band and wide band)
https://github.com/ludlows/PESQ
MIT License
518 stars 97 forks source link

Add `lengths` argument to `pesq_batch` #46

Open philgzl opened 1 year ago

philgzl commented 1 year ago

When using pesq_batch the user might be using batched audio waveforms that originally had different length and were padded to match their length before creating the batch. The padding however changes the results.

This PR solves this by adding an extra optional argument lengths to pesq_batch. lengths should contain the original lengths of the signals before padding and batching.