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

Trick to Upsampling to High sampling rates using VITS model #1456

Merged
merged 15 commits into from
Apr 26, 2022
Merged

Conversation

Edresson
Copy link
Contributor

No description provided.

@Edresson Edresson force-pushed the VITS-upsample branch 3 times, most recently from c583a8a to a5f5eba Compare March 28, 2022 22:05
@Edresson Edresson marked this pull request as ready for review April 21, 2022 19:58
@Edresson Edresson requested a review from erogol April 21, 2022 19:58
@Edresson
Copy link
Contributor Author

Edresson commented Apr 21, 2022

To Fix the zoo-tests we need to merge this coqpit PR.

TTS/tts/models/vits.py Outdated Show resolved Hide resolved
TTS/tts/models/vits.py Outdated Show resolved Hide resolved
TTS/tts/models/vits.py Outdated Show resolved Hide resolved
assert batch["spec"].shape[2] == batch["mel"].shape[2], f"{batch['spec'].shape[2]}, {batch['mel'].shape[2]}"

if not self.args.TTS_part_sample_rate:
assert batch["spec"].shape[2] == batch["mel"].shape[2], f"{batch['spec'].shape[2]}, {batch['mel'].shape[2]}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also implement the corresponding assert when upsampling is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

TTS/server/server.py Show resolved Hide resolved
TTS/tts/models/vits.py Show resolved Hide resolved
TTS/tts/models/vits.py Outdated Show resolved Hide resolved
TTS/tts/models/vits.py Outdated Show resolved Hide resolved
TTS/utils/synthesizer.py Show resolved Hide resolved
@@ -104,6 +104,7 @@ class HifiganConfig(BaseGANVocoderConfig):
"resblock_type": "1",
}
)
discriminator_model_params: dict = field(default_factory=lambda: {"periods": [2, 3, 5, 7, 11]})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HifiGAN changes must be a separate PR

Copy link
Contributor Author

@Edresson Edresson Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, my bad, I removed these commits, it is in the PR: #1526

Copy link
Member

@erogol erogol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good, asked for a bunch of changes

from TTS.vocoder.datasets.preprocess import load_wav_data
from TTS.vocoder.models.gan import GAN

output_path = "/home/julian/workspace/train"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is pointin Julian's workspace?

Why there is HiFiGan recipe update in VITS PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I removed these commits, it is in the PR: #1526

@@ -0,0 +1,90 @@
import glob
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need these costly tests.

Just write unittests in test_vits.py

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, good catch, Done :)

@@ -0,0 +1,90 @@
import glob
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this one too if you tests things in test_vits.py

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Done

@Edresson Edresson requested a review from erogol April 25, 2022 16:07
@erogol erogol self-assigned this Apr 26, 2022
@erogol
Copy link
Member

erogol commented Apr 26, 2022

Awesome PR

@erogol erogol merged commit 8d228ab into dev Apr 26, 2022
@erogol erogol deleted the VITS-upsample branch April 26, 2022 09:47
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.

None yet

2 participants