Skip to content

Add indextts snippet #1373

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 9 commits into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
@@ -435,6 +435,24 @@ export const gliner = (model: ModelData): string[] => [
model = GLiNER.from_pretrained("${model.id}")`,
];

export const indextts = (model: ModelData): string[] => [
`# Download model
from huggingface_hub import snapshot_download

snapshot_download(${model.id}, local_dir="checkpoints")

from indextts.infer import IndexTTS

# Ensure config.yaml is present in the checkpoints directory
tts = IndexTTS(model_dir="checkpoints", cfg_path="checkpoints/config.yaml")

voice = "path/to/your/reference_voice.wav" # Path to the voice reference audio file
text = "Hello, how are you?"
output_path = "output_index.wav"

tts.infer(voice, text, output_path)`,
];

export const htrflow = (model: ModelData): string[] => [
`# CLI usage
# see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html
7 changes: 7 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
@@ -426,6 +426,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
repoUrl: "https://github.com/DigitalPhonetics/IMS-Toucan",
countDownloads: `path:"embedding_gan.pt" OR path:"Vocoder.pt" OR path:"ToucanTTS.pt"`,
},
"index-tts": {
prettyLabel: "IndexTTS",
repoName: "IndexTTS",
repoUrl: "https://github.com/index-tts/index-tts",
snippets: snippets.indextts,
filter: false,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
filter: false,

Default value, I think.

Copy link
Member

Choose a reason for hiding this comment

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

but we put false for all of the ones we don't want so prolly okay to keep it the way it is, unless we want to make the change for all.

Copy link
Member

Choose a reason for hiding this comment

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

We have not been consistent AFAIK, but ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah to be honest I tend to approve both with or without explicit filter: false without caring much. Happy to review a follow-up PR to harmonize this (removing all unecessary filter: false) but low prio

},
"infinite-you": {
prettyLabel: "InfiniteYou",
repoName: "InfiniteYou",