Closed thijsdeschildre closed 4 months ago
Hi, I think the deg.wav
and ref.wav
should be mono-channel audio.
Hi, I think the
deg.wav
andref.wav
should be mono-channel audio.
thanks, good pointer but no luck. do you have any sample files that should work?
import soundfile as sf
from pypesq import pesq
import numpy as np
# ref, sr = sf.read("ref.wav")
# deg, sr = sf.read("deg.wav")
sr = 16000
ref = np.random.uniform(-1, 1, 16000 * 10)
deg = np.random.uniform(-1, 1, 16000 * 10)
score = pesq(ref, deg, sr)
print(score)
you can try dummy input data.
yeah, that works. no idea what is wrong with my input data. files have the same length and the audio is somewhat aligned. or does it need perfect syncing?
OK, found it. I had to use a tool to cut both files to exactly the same length. now it works.
with python 3.10, I use the example script:
and get the error
info about both files: