Instructions to use arjun10g/chatterbox-web with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use arjun10g/chatterbox-web with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-to-speech', 'arjun10g/chatterbox-web'); - Chatterbox
How to use arjun10g/chatterbox-web with Chatterbox:
# pip install chatterbox-tts import torchaudio as ta from chatterbox.tts import ChatterboxTTS model = ChatterboxTTS.from_pretrained(device="cuda") text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill." wav = model.generate(text) ta.save("test-1.wav", wav, model.sr) # If you want to synthesize with a different voice, specify the audio prompt AUDIO_PROMPT_PATH="YOUR_FILE.wav" wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH) ta.save("test-2.wav", wav, model.sr) - Notebooks
- Google Colab
- Kaggle
Per-file external data map; stub encoder has none
Browse files- config.json +6 -1
config.json
CHANGED
|
@@ -36,7 +36,12 @@
|
|
| 36 |
"vocab_size": 8194
|
| 37 |
},
|
| 38 |
"transformers.js_config": {
|
| 39 |
-
"use_external_data_format":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
"kv_cache_dtype": {
|
| 41 |
"fp16": "float16",
|
| 42 |
"q4f16": "float16"
|
|
|
|
| 36 |
"vocab_size": 8194
|
| 37 |
},
|
| 38 |
"transformers.js_config": {
|
| 39 |
+
"use_external_data_format": {
|
| 40 |
+
"embed_tokens.onnx": 1,
|
| 41 |
+
"language_model_q4f16.onnx": 1,
|
| 42 |
+
"conditional_decoder.onnx": 1,
|
| 43 |
+
"speech_encoder.onnx": 0
|
| 44 |
+
},
|
| 45 |
"kv_cache_dtype": {
|
| 46 |
"fp16": "float16",
|
| 47 |
"q4f16": "float16"
|