Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant print #17

Open
hidehowever1 opened this issue Feb 18, 2020 · 20 comments
Open

cant print #17

hidehowever1 opened this issue Feb 18, 2020 · 20 comments

Comments

@hidehowever1
Copy link

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

@hidehowever1
Copy link
Author

hi,Process finished with exit code -1073741571 (0xC00000FD)
do you konw why i have this problem

@loongtech-Nitin
Copy link

I also encountered this problem, and I didn't find a solution

@vBaiCai
Copy link
Owner

vBaiCai commented Feb 29, 2020

Can you provide the test audios?

@hidehowever1
Copy link
Author

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

@vBaiCai
Copy link
Owner

vBaiCai commented Feb 29, 2020

Uploading files is easy, drag and drops it into the comment box.

RKu7x

@hidehowever1
Copy link
Author

Desktop.zip
this is the file

@vBaiCai
Copy link
Owner

vBaiCai commented Mar 1, 2020

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

@hidehowever1
Copy link
Author

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

@shazhongcheng
Copy link

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.

@vBaiCai
Copy link
Owner

vBaiCai commented Mar 13, 2020

The sample data prove that PESQ cannot be calculated in some cases, even if C version is used.

@shazhongcheng
Copy link

The sample data prove that PESQ cannot be calculated in some cases, even if C version is used.

ok,I know.

@pjnr1
Copy link

pjnr1 commented May 18, 2020

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')

@hidehowever1
Copy link
Author

@pjnr1 i used the way you told,but also have mistake :librosa.util.exceptions.ParameterError: Audio data must be floating-point

@pjnr1
Copy link

pjnr1 commented May 18, 2020

@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?

@hidehowever1
Copy link
Author

@pjnr1 16int,i send the file for you
p232_001.zip

@pjnr1
Copy link

pjnr1 commented May 18, 2020

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:

if ref.dtype != np.int16:
ref *= 32767
ref = ref.astype(np.int16)
if deg.dtype != np.int16:
deg *= 32767
deg = deg.astype(np.int16)

@hidehowever1
Copy link
Author

@pjnr1 sorry,the problem still exist:Process finished with exit code -1073741571 (0xC00000FD)

@pjnr1
Copy link

pjnr1 commented May 19, 2020

@hidehowever777 I guess you can conclude that the file format isn't the problem then. Sorry.

@sunjihai
Copy link

sunjihai commented Dec 8, 2020

I had the same problem. Please advise.
problems:
Process finished with exit code -1073741571 (0xC00000FD)
sampling rate:8000

@arunraj-sandeza
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants