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

[TTS] Add period discriminator and feature matching loss to codec recipe #7884

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

rlangman
Copy link
Collaborator

What does this PR do ?

Add the feature matching loss and period discriminator used in most traditional vocoders. These will be used in my next PR which adds a configuration for creating a codec from mel spectrogram.

Collection: [TTS]

Changelog

  • Add absolute feature matching loss.
  • Add period discriminator
  • Add wrapper for supplying multiple discriminators.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

Copy link
Contributor

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 28, 2023
@rlangman rlangman removed the stale label Nov 28, 2023
anteju
anteju previously approved these changes Dec 13, 2023
Copy link
Collaborator

@anteju anteju left a comment

Choose a reason for hiding this comment

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

Added a couple minor comments.

nemo/collections/tts/models/audio_codec.py Show resolved Hide resolved
def __init__(self, period):
super().__init__()
self.period = period
self.activation = nn.LeakyReLU(0.1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add slope as an input parameter?

def output_types(self):
return {
"score": NeuralType(('B', 'D', 'T'), VoidType()),
"fmap": [NeuralType(("B", "C", "H", "W"), VoidType())],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: "B" -> 'B' for consistency
Other dimensions similarly

Also, are H and W actually T and D or C?

Copy link
Contributor

github-actions bot commented Jan 4, 2024

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jan 4, 2024
Copy link
Contributor

This PR was closed because it has been inactive for 7 days since being marked as stale.

Copy link
Collaborator

@anteju anteju left a comment

Choose a reason for hiding this comment

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

LGTM

@rlangman rlangman merged commit 46f6465 into main Jan 19, 2024
15 checks passed
@rlangman rlangman deleted the codec_disc branch January 19, 2024 17:02
stevehuang52 pushed a commit that referenced this pull request Jan 31, 2024
…ipe (#7884)

* [TTS] Add period discriminator and feature matching loss to codec recipe

Signed-off-by: Ryan <[email protected]>

* [TTS] Update docs for period discriminator

Signed-off-by: Ryan <[email protected]>

---------

Signed-off-by: Ryan <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
ssh-meister pushed a commit to ssh-meister/NeMo that referenced this pull request Feb 15, 2024
…ipe (NVIDIA#7884)

* [TTS] Add period discriminator and feature matching loss to codec recipe

Signed-off-by: Ryan <[email protected]>

* [TTS] Update docs for period discriminator

Signed-off-by: Ryan <[email protected]>

---------

Signed-off-by: Ryan <[email protected]>
Signed-off-by: Sasha Meister <[email protected]>
pablo-garay pushed a commit that referenced this pull request Mar 19, 2024
…ipe (#7884)

* [TTS] Add period discriminator and feature matching loss to codec recipe

Signed-off-by: Ryan <[email protected]>

* [TTS] Update docs for period discriminator

Signed-off-by: Ryan <[email protected]>

---------

Signed-off-by: Ryan <[email protected]>
Signed-off-by: Pablo Garay <[email protected]>
rohitrango pushed a commit to rohitrango/NeMo that referenced this pull request Jun 25, 2024
…ipe (NVIDIA#7884)

* [TTS] Add period discriminator and feature matching loss to codec recipe

Signed-off-by: Ryan <[email protected]>

* [TTS] Update docs for period discriminator

Signed-off-by: Ryan <[email protected]>

---------

Signed-off-by: Ryan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants