Hope for some one's help. Thank you!
Code:
from pydub import AudioSegment
from pypesq import pesq
sound1 = AudioSegment.from_file('D:/Test/speech.wav', 'wav')
sound2 = AudioSegment.from_file('D:/Test/speech_bab_0dB.wav', 'wav')
score = pesq(sound1, sound2, 16000)
print(score)
Error:
ValueError Traceback (most recent call last)
----> 5 score = pesq(sound1, sound2, 16000)
---> 21 max_sample = np.max(np.abs(np.array([ref, deg])))
ValueError: could not broadcast input array from shape (3100,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) into shape (3100,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)