Skip to content

Commit 9401982

Browse files
Deep-unlearningWauplinVaibhavs10julien-c
authored
Add chatterbox snippet (#1503)
~~Waiting this PR to be merged first~~ PR Merged: https://huggingface.co/ResembleAI/chatterbox/discussions/4 --------- Co-authored-by: Lucain <lucain@huggingface.co> Co-authored-by: vb <vaibhavs10@gmail.com> Co-authored-by: Julien Chaumond <julien@huggingface.co>
1 parent 017cf3a commit 9401982

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,23 @@ export const bm25s = (model: ModelData): string[] => [
115115
retriever = BM25HF.load_from_hub("${model.id}")`,
116116
];
117117

118+
export const chatterbox = (model: ModelData): string[] => [
119+
`# pip install chatterbox-tts
120+
import torchaudio as ta
121+
from chatterbox.tts import ChatterboxTTS
122+
123+
model = ChatterboxTTS.from_pretrained(device="cuda")
124+
125+
text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill."
126+
wav = model.generate(text)
127+
ta.save("test-1.wav", wav, model.sr)
128+
129+
# If you want to synthesize with a different voice, specify the audio prompt
130+
AUDIO_PROMPT_PATH="YOUR_FILE.wav"
131+
wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH)
132+
ta.save("test-2.wav", wav, model.sr)`,
133+
];
134+
118135
export const cxr_foundation = (): string[] => [
119136
`# pip install git+https://github.com/Google-Health/cxr-foundation.git#subdirectory=python
120137

packages/tasks/src/model-libraries.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
179179
repoUrl: "https://github.com/fudan-generative-vision/champ",
180180
countDownloads: `path:"champ/motion_module.pth"`,
181181
},
182+
chatterbox: {
183+
prettyLabel: "Chatterbox",
184+
repoName: "Chatterbox",
185+
repoUrl: "https://github.com/resemble-ai/chatterbox",
186+
snippets: snippets.chatterbox,
187+
countDownloads: `path:"tokenizer.json"`,
188+
filter: false,
189+
},
182190
chat_tts: {
183191
prettyLabel: "ChatTTS",
184192
repoName: "ChatTTS",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy