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

Small differences between pyreaper and original REAPER #1

Closed
terriyu opened this issue Nov 15, 2017 · 3 comments
Closed

Small differences between pyreaper and original REAPER #1

terriyu opened this issue Nov 15, 2017 · 3 comments

Comments

@terriyu
Copy link

terriyu commented Nov 15, 2017

Hi, I ran pyreaper and the original Google REAPER on some wav files. The F0 results are very similar, but there are a few small differences even though I think I am using the same parameters. Do you know why there are differences?

For pyreaper, I'm running the following commands in my Python script:

from scipy.io import wavfile
from pyreaper import reaper
fs, y = wavfile.read('my-wavfile.wav')
pm_times, pm, F0_times, F0, corr = reaper(y, fs, minf0=40.0, maxf0=500.0, do_high_pass=True, do_hilbert_transform=False, inter_pulse=0.01, frame_period=0.001)

For Google's original REAPER, I'm running this on the command line:

$ ./reaper -i my-wavfile.wav -f f0.txt -p pitchmarks.txt -c corr.txt -s -e 0.001 -x 500.0 -m 40.0 -u 0.01 -a

@terriyu
Copy link
Author

terriyu commented Nov 15, 2017

Here are some plots showing the differences. Blue circles are from Google's REAPER and red dots are from pyreaper. I've only plotted valid frequencies (frequencies of -1 are invalid).

beijing_f3_50_a
beijing_m5_17_c
cant_f6_40_b
cant_f6_95_b
hmong_f4_18_b
hmong_f4_24_d
hmong_m6_24_c

@r9y9
Copy link
Owner

r9y9 commented Nov 15, 2017

REAPER's -s option means suppress applying high pass filter, so in pyreaper you need to set do_high_pass=False. With this change I can get np.allclose(f0s_by_pyreaper, f0s_by_reaper) == True with a speech sample. Let me know if it solve your issue.

@terriyu
Copy link
Author

terriyu commented Nov 15, 2017

Yes, that fixes it. Thank you!

@terriyu terriyu closed this as completed Nov 15, 2017
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

2 participants