Skip to content

Add ChatTTS download stats #734

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

Merged
merged 11 commits into from
Jun 7, 2024

Conversation

NielsRogge
Copy link
Contributor

@NielsRogge NielsRogge commented Jun 3, 2024

This PR ensures download stats are working for https://huggingface.co/2Noise/ChatTTS.

To do:

@Wauplin
Copy link
Contributor

Wauplin commented Jun 3, 2024

Thanks for the PR @NielsRogge! You can also add a code snippet by updating model-libraries-snippets.ts and importing it correctly in model-libraries.ts. This way users will see a "use in ChatTTS" button on the model page. Snippet would be more or less the same as in model card (to be adapted)

chat = ChatTTS.Chat()
chat.load_models(compile=False) # Set to True for better performance

# Define the text input for inference (Support Batching)
texts = [
    "So we found being competitive and collaborative was a huge way of staying motivated towards our goals, so one person to call when you fall off, one person who gets you back on then one person to actually do the activity with.",
    ]

# Perform inference and play the generated audio
wavs = chat.infer(texts)

(especially useful if you expect several repos to host ChatTTS models)

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Approve, modulo the comment + the "should we add a snippet?" question.

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

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

Thanks for the opening this PR. I wasn't asked for a review, but reviewing it because Audio :)

Could you make sure to run the linter to pass the failing test?

@NielsRogge NielsRogge merged commit d2d6220 into huggingface:main Jun 7, 2024
4 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.

5 participants