Instructions to use ResembleAI/chatterbox with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Chatterbox
How to use ResembleAI/chatterbox 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) - Inference
- Notebooks
- Google Colab
- Kaggle
ValueError: numpy.dtype size changed while using ChatterboxTTS and Transformers
#19
by sharvanc - opened
I’m trying to test it out in Google Colab (tried in both T4 GPU and CPU runtime), and I’m getting the following error:
RuntimeError: Failed to import transformers.models.llama.modeling_llama because of the following error (look up to see its traceback):
numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
(attached screenshot)
same error.. stuck in there
Found Solution in colab ..
freshly run this 1st ...
!pip install chatterbox-tts -q
!pip install --upgrade --force-reinstall numpy transformers
!pip install numpy==1.26.4 --force-reinstall
then runtime restart popup will come , restart , then run the model ..
import torchaudio as ta
from chatterbox.tts import ChatterboxTTS
from IPython.display import Audio
model = ChatterboxTTS.from_pretrained(device="cuda")
