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

Improved output via increased latent variability + allowing high quality subset of voice clips for CVVP #740

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mikeymezher
Copy link

Rather than using an averaged set of latents derived from voice clips, I've added the ability to instead:
1.) Generate latents (for autoregression and diffusion)
2.) For each autoregressed sample, use a randomly selected latent rather than the averaged latent
3.) Use CVVP to influence selection of ideal autoregressive output (in addition to CLVP).

Why is this better? Firstly, no changes are required to interface with api.py. All user code should continue to work as expected.
Secondly, these improvements allow us to input many more voice clips, and allow CVVP to determine which voice clip (or rather, latent of the voice clip) is most salient. We also allow explicit insertion of "auto_conds" such that the CVVP portion of the model can operate using only high confidence Mels.

This allows for the following process:
1.) Generate a large number of voice clips (potentially from a Youtube video or multiple videos)
2.) Optionally, cluster latents derived from voice clips
3.) Use either voiceclips, their latents, or their cluster centroids as input latents
4.) Select a high quality subset of voice clips to use as conditional Mels into CVVP.
5.) Run tts setting the new parameter "use_averaged_latents" to False, and passing "auto_conds" and "conditioning_latents" explicitly. - Also set cvvp_amount > 0 (> .7 works well in my experiments)

The overarching idea here is that we allow CVVP to better select outputs generated from a more diverse set of latents. I haven't quantified this, but subjectively, this has allowed for more accurate generation of a wider set of voices.

*important note: Previous link to huggingface CVVP model parameters was not accurate ("Manmay/tortoise-tts"), I've
altered this path to "jbetker/tortoise-tts-v2")

Check out https://soundgif.io for a basic system I've created operating on these changes.

I understand that this may be (too) many changes for a single commit. Please let me know if you have any questions.

@mikeymezher
Copy link
Author

Apologies, I noticed one of my utility files is not included in the commit and is imported in the api:
"from tortoise.utils.misc_helpers import Timer"

Look over these changes and let me know if you'll accept them. If so, I'll file a new commit, removing any references to the utility file (misc_helpers.py)

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.

1 participant