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 arrays cause unpredictable behavior in DIO #40

Open
KnurpsBram opened this issue Jul 5, 2019 · 1 comment
Open

Small arrays cause unpredictable behavior in DIO #40

KnurpsBram opened this issue Jul 5, 2019 · 1 comment

Comments

@KnurpsBram
Copy link

I'm interested in real-time voice conversion. I'm experimenting with showing small buffers of audio to WORLD, so as to perform conversion chunk-by-chunk. I would expect DIO to be able to recognize a frequency if at least two wavelengths are shown to the function. For 100Hz, this is 20ms. I see a weird behavior where DIO can't recognize 100Hz if the buffer is under 100ms. Strange! What could be the cause of this?

import numpy as np
import pyworld as pw

sr = 16000 # samplerate of 16kHz
f = 100 # Hz
dur = .5 # seconds
x = np.cos(2*np.pi*np.arange(sr*dur)*f/sr)
f0, t = pw.dio(x, sr)
print(f0)
f0, t = pw.dio(x[:int(.1*sr)], sr)
print(f0)
f0, t = pw.dio(x[:int(.12*sr)], sr)
print(f0)

image

@JeremyCCHsu
Copy link
Owner

Could you post this on https://github.com/mmorise/World ?
Unfortunately, I don't have an answer to this.
WORLD could have been designed to assume extra period of time for pitch evaluation.

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