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

Run XTTS models by direct name with versions #3318

Merged
merged 5 commits into from
Nov 30, 2023
Merged

Run XTTS models by direct name with versions #3318

merged 5 commits into from
Nov 30, 2023

Conversation

erogol
Copy link
Member

@erogol erogol commented Nov 27, 2023

This PR allows for running XTTS models with version tags. So you the user can access any version they like.

from TTS.api import TTS

# get v2.0.2
tts = TTS(model_name="xtts_v2.0.2", gpu=True)

# get the latest version
tts = TTS(model_name="xtts", gpu=True)

# generate speech by cloning a voice using default settings
tts.tts_to_file(text="Here is my sample text.",
                file_path="output.wav",
                speaker_wav=["reference.wav", "reference1.wav"],
                language="en")

Making automatic sentence splitting optional. So you can apply any custom logic for processing the text before passing it to the model. Set split_sentences False.

from TTS.api import TTS

# get v2.0.2
tts = TTS(model_name="xtts_v2.0.2", gpu=True)

# generate speech by cloning a voice using default settings
tts.tts_to_file(text="Here is my sample text.",
                file_path="output.wav",
                speaker_wav=["reference.wav", "reference1.wav"],
                language="en",
                split_sentences=False)

@erogol erogol merged commit 9328338 into dev Nov 30, 2023
53 checks passed
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