Content-Length: 326506 | pFad | http://github.com/huggingface/huggingface.js/commit/9401982fc67bb3cc3c5230c22bbd1afe9fda3a91

7F Add chatterbox snippet (#1503) · huggingface/huggingface.js@9401982 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/huggingface/huggingface.js/commit/9401982fc67bb3cc3c5230c22bbd1afe9fda3a91

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy