Skip to content

Commit 904964c

Browse files
Deep-unlearningDeep-UnlearningDeep-UnlearningWauplin
authored
Add indextts snippet (#1373)
Co-authored-by: Deep-Unlearning <[email protected]> Co-authored-by: Deep-Unlearning <[email protected]> Co-authored-by: Lucain <[email protected]>
1 parent 15b481a commit 904964c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

+18
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,24 @@ export const gliner = (model: ModelData): string[] => [
435435
model = GLiNER.from_pretrained("${model.id}")`,
436436
];
437437

438+
export const indextts = (model: ModelData): string[] => [
439+
`# Download model
440+
from huggingface_hub import snapshot_download
441+
442+
snapshot_download(${model.id}, local_dir="checkpoints")
443+
444+
from indextts.infer import IndexTTS
445+
446+
# Ensure config.yaml is present in the checkpoints directory
447+
tts = IndexTTS(model_dir="checkpoints", cfg_path="checkpoints/config.yaml")
448+
449+
voice = "path/to/your/reference_voice.wav" # Path to the voice reference audio file
450+
text = "Hello, how are you?"
451+
output_path = "output_index.wav"
452+
453+
tts.infer(voice, text, output_path)`,
454+
];
455+
438456
export const htrflow = (model: ModelData): string[] => [
439457
`# CLI usage
440458
# see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html

packages/tasks/src/model-libraries.ts

+7
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
426426
repoUrl: "https://github.com/DigitalPhonetics/IMS-Toucan",
427427
countDownloads: `path:"embedding_gan.pt" OR path:"Vocoder.pt" OR path:"ToucanTTS.pt"`,
428428
},
429+
"index-tts": {
430+
prettyLabel: "IndexTTS",
431+
repoName: "IndexTTS",
432+
repoUrl: "https://github.com/index-tts/index-tts",
433+
snippets: snippets.indextts,
434+
filter: false,
435+
},
429436
"infinite-you": {
430437
prettyLabel: "InfiniteYou",
431438
repoName: "InfiniteYou",

0 commit comments

Comments
 (0)