Audio-to-Audio
audio
speech
voice-conversion

Is is typo?

#9
by hndrbrm - opened

I read on beatrice_trainer/__main__.py line 3124:

if target_f0 != target_f0:
    pitch_shift = 0
else:
    pitch_shift = int(round(12.0 * math.log2(target_f0 / source_f0)))

I thought it should be if target_f0 != source_f0 right?
The purposes is to calculate the relative pitch between target speaker and source speaker.

It may be my imagination, but when I trained with the program with these changes, the model seemed less accurate than when I listened to the unmodified program.
I would like to know the results of others who have tried this, as it may be my problem.

It may be my imagination, but when I trained with the program with these changes, the model seemed less accurate than when I listened to the unmodified program.
I would like to know the results of others who have tried this, as it may be my problem.

That code and the unmodified one are actually get the same result.
That code is for optimizing.

If target_f0 equal to source_f0 then the value math.log2(target_f0 / source_f0) are zero hence the pitch_shift are zero.
So even the code mismatch it still produce the same result.

Rather calculating the whole, its more fast if detect the equality, if its equal then the shift are zero.
cmiiw

It may be my imagination, but when I trained with the program with these changes, the model seemed less accurate than when I listened to the unmodified program.
I would like to know the results of others who have tried this, as it may be my problem.

Ah i see, i wrote wrongly in the first comment.

it should be if target_f0 == source_f0

Sign up or log in to comment