-
Notifications
You must be signed in to change notification settings - Fork 239
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
Infinite loop in "Change gender" #1926
Comments
For this example, Praat 6.2.02 will bail out with an appropriate error message, which is "Change gender: your pitch manipulation would lead to negative pitch values." Thanks for the excellent bug hunt. |
Thank you for solving this! One small additional question: in older versions of Praat (before the 6.2.02 fix), is there a way of detecting when this would happen, in order to not call "Change gender" on this audio with these parameters, and avoid getting stuck in this infinite loop? |
Instead of "Sound: Change gender", you could compute the pitch yourself (with the given minimum and maximum pitch) and do "Sound & Pitch: Change Gender". Once you have the Pitch, you can query its minimum (without interpolation) and median, and check whether the resulting pitch value will be less than 0:
|
Thank you very much! This will be quite useful to @auspicious3000. |
I got an issue reported at YannickJadoul/Parselmouth#68 by @auspicious3000, that in some cases, "Change gender"'s execution blocks.
@auspicious3000 very kindly provided me an minimal reproducing example of a case in which this happens, and it seems that the error lies somewhere in Praat, as I can reproduce the issue in Praat.
The following should reproduce the error (tried out in Praat 6.1.51, and in the latest
master
version):(Apologies for the zip file, but GitHub only allows to upload certain file types/extensions into an issue.)
I've compiled a debug version of Praat and found out the following:
praat/fon/Manipulation.cpp
Line 418 in 586bc8b
praat/fon/Manipulation.cpp
Line 399 in 586bc8b
I haven't looked further than this, trying to figure out why
RealTier_getValueAtTime (pitch, endOfSourceVoice)
on line 399 results in 0. If I do figure out more, I will update!The text was updated successfully, but these errors were encountered: