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

Various bug fixes #7

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Various bug fixes #7

merged 1 commit into from
Jul 30, 2024

Conversation

lars76
Copy link
Contributor

@lars76 lars76 commented Jul 29, 2024

I was finetuning the models on my own datasets and it failed due to a couple of bugs. This pull request fixes these issues:

  • only divide by MAX_WAV_VALUE if the wav file is saved as int16 (and not float).
  • always try to pad to the length of frames_per_seg or self.segment_size. It can happen that audio.size(1) < frames_per_seg * self.hop_size
  • first comes tqdm, then enumerate, otherwise tqdm is not able to get the length attribute
  • Make sure that y_mel, y_g_hat_mel, y_g_hat, y_g_hat_mel are the same length. I think the issue is that sometimes my wav files have uneven length.

…segment_size, switch tqdm, crop mel/wav in train if necessary
@L0SG
Copy link
Collaborator

L0SG commented Jul 30, 2024

Thank you for your contribution. Looks correct when fine-tuning using a model-generated mel (like TTS). Also based on your feedback, current implementation of load_wav() is indeed not robust to load heterogeneous waveform formats. I'll merge it including my additional commits to provide better robustness loading the waveforms soon.

@L0SG L0SG merged commit bff7dd0 into NVIDIA:main Jul 30, 2024
@L0SG
Copy link
Collaborator

L0SG commented Jul 30, 2024

Merged with my additional implementation to support loading waveform with various file formats, including on-the-fly resampling.

Note regarding fine-tuning (using pre-computed mel): It is recommended to prepare the waveform pair with length of integer multiple of the target hop length to ensure precise alignment.

If you find any additional bugs of the new implementation, please let me know. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants