add colab support fix 283dc91
reenigne314 commited on
How to use reenigne314/chatterbox-indic-lora with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-to-speech", model="reenigne314/chatterbox-indic-lora") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("reenigne314/chatterbox-indic-lora", dtype="auto")How to use reenigne314/chatterbox-indic-lora 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)