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

two pitch? #40

Open
a897456 opened this issue Mar 26, 2024 · 3 comments
Open

two pitch? #40

a897456 opened this issue Mar 26, 2024 · 3 comments

Comments

@a897456
Copy link

a897456 commented Mar 26, 2024

the first pitch in the sample() as follow:

duration, pitch = self.duration_pitch(phoneme_enc, prompt_enc)
pitch = rearrange(pitch, 'b n -> b 1 n')

the second pitch in the forward() of Naturalspeech2 as follow:

if not exists(pitch):
assert exists(audio) and audio.ndim == 2
assert exists(self.target_sample_hz)
if self.calc_pitch_with_pyworld:
pitch = compute_pitch_pyworld(
audio,
sample_rate = self.target_sample_hz,
hop_length = self.mel_hop_length
)
else:
pitch = compute_pitch_pytorch(audio, self.target_sample_hz)
pitch = rearrange(pitch, 'b n -> b 1 n')

  1. Personally, I think the first pitch is from the prompt, and the second pitch is from the training data, right?
  2. Personally, I think the prompt is a small part of the training data, such as the training data is10s, from which prompt takes 2s, right?
  3. Because the input format of the prompt and the training data is the same, why are the calculation methods of pitch different?
@lexkoro
Copy link

lexkoro commented Mar 26, 2024

One is the ground truth pitch and the other one is the predicted

@a897456
Copy link
Author

a897456 commented Mar 26, 2024

One is the ground truth pitch and the other one is the predicted

Thank you for your reply. @lexkoro
By the way, have you completed the conditional training?
And can you share how to generate the prompt and the text just like LJSpeech dataset.

@lexkoro
Copy link

lexkoro commented Mar 26, 2024

I don't think the repository is usable yet.

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