python-pesq
python-pesq copied to clipboard
cant print
a,sr=sf.read('E:/speech/sliced_test_clean/S_01_01.wav') b,sr=sf.read('E:/speech/sliced_test_-5/S_01_01.wav') score=pesq(a,b,sr) print(score) there is no print
hi,Process finished with exit code -1073741571 (0xC00000FD) do you konw why i have this problem
I also encountered this problem, and I didn't find a solution
Can you provide the test audios?
Can you provide the test audios? i also tried Valentini dataset and had this problem.i dont konw how to upload file in github .but it is just ordinary wav file.are you chinese?.i am a student of post graduate.my qq is 1720705359.we can discuss and i can send you the file
Uploading files is easy, drag and drops it into the comment box.
Desktop.zip this is the file
Hi, hidehowever777
To notice that PESQ cannot be computed in some cases. Unfortunately, your data is in this case.
For your data, the C version of PESQ will produce the same results as pypesq.
BTW, the C code assumes that audios are 16-bit-int quantized.
And I notice that the data-type of your audios is 32-bit-float.
So, you should convert your data to 16-bit-int quantized.
The attachment is 16-bit-int audios. You can verify the result using C code by yourself. 16bit - samples.zip
Desktop.zip Hi,I tried to change the 32-float audio to 16-int audio,but also can not print.If i code like this: b,sr=sf.read('E:/speech/16int/sliced_test_-5/S_01_01.wav') print(b) than b will be [ 0.07687378 0.08346558 -0.01574707 ... -0.15936279 -0.20346069 -0.12380981],It looks like 32-float data even though i have changed to 16-int. However.If use deep learning to do speech enhancement .That should use 32-float data.Do you konw how to deal with this problem.Thank you
Hello, even i try to your samples data, i also meet this error :Process finished with exit code -1073741571 (0xC00000FD)
I run it on windows, do you try on it?
I try use librosa.load('data/m2_script1_clean.wav', sr=16000)
on my own data, but it showProcess finished with exit code -1073741571 (0xC00000FD)
. And without scores.
Can you help me? I am so sad, and don`t how to deal with it.
The sample data prove that PESQ cannot be calculated in some cases, even if C version is used.
The sample data prove that PESQ cannot be calculated in some cases, even if C version is used.
ok,I know.
When using librosa.load
or soundfile.read
or anything similar, the best result is obtained by using the optional argument dtype
to ensure int16
.
Example:
librosa.load('path', dtype='int16')
and
sf.read('path', dtype='int16')
@pjnr1 i used the way you told,but also have mistake :librosa.util.exceptions.ParameterError: Audio data must be floating-point
@pjnr1 i used the way you told,but also have mistake :librosa.util.exceptions.ParameterError: Audio data must be floating-point
@hidehowever777 what format is your sound file?
@pjnr1 16int,i send the file for you p232_001.zip
oh, I see. Doesn't work for librosa. Which is a bid counter-intuitive. The wav-format is implemented so that each sample is save on disk as integer-values. You could convert the file from librosa, assuming the maximum value being 1.0
:
x, fs = librosa.load('p232_001.wav')
x = (x * np.iinfo(np.int16).max).astype(np.int16)
That should work. However, that process seems to be included already: https://github.com/vBaiCai/python-pesq/blob/d870dfa9972afa0b82ad0b0d01341010343907ba/pypesq/init.py#L42-L48
@pjnr1 sorry,the problem still exist:Process finished with exit code -1073741571 (0xC00000FD)
@hidehowever777 I guess you can conclude that the file format isn't the problem then. Sorry.
I had the same problem. Please advise. problems: Process finished with exit code -1073741571 (0xC00000FD) sampling rate:8000
The above audio file has sample rate of 16000, which is working on C version pesq script, just to be clear, the C version has been rescripted in python script, which is working fine. The pesq score for the above audio is 1.027367353439331