diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index 96a18e40b..970322632 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -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 diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index 54310caa6..a5a043995 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -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, + }, "infinite-you": { prettyLabel: "InfiniteYou", repoName: "InfiniteYou",