Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

chatterbox-tts

CONTAINERS IMAGES RUN BUILD

Chatterbox TTS

Chatterbox TTS is an advanced text-to-speech engine that offers high-quality voice synthesis with emotion control and voice cloning capabilities. It's based on the Chatterbox project by Resemble AI.

Overview

Chatterbox TTS is a more resource-intensive model compared to alternatives like Piper and Kokoro, offering enhanced synthesis quality and additional features. The added capabilities come at the cost of higher computational requirements.

Features

  • Standard Voice Generation: Generate natural-sounding speech from text
  • Emotional Voice Synthesis: Control the emotional tone of generated speech
  • Voice Cloning: Clone voices from audio samples for personalized speech output

Hardware Compatibility

Device Status
Jetson AGX ✅ Tested
Jetson Nano 🔄 Testing in progress
Other Jetson devices 📝 To be tested

System Requirements

  • CUDA 12.9+
  • Ubuntu 24.04 or compatible OS
  • Sufficient GPU memory (tested on Jetson AGX)

Performance

  • Claimed inference time: ~200ms per generation
  • Actual benchmarks: Pending detailed testing across Jetson devices

Usage

Building the container

When building the container, use:

CUDA_VERSION=12.9 LSB_RELEASE=24.04 jetson-containers build --name=... chatterbox-tts 

Running the Container

docker run -it --rm --runtime nvidia dustynv/chatterbox-tts:r36.2.0

Basic Text-to-Speech Generation

import torchaudio as ta
from chatterbox.tts import ChatterboxTTS

# Load model to GPU
model = ChatterboxTTS.from_pretrained(device="cuda")

# Generate speech
text = "Hello, I am Chatterbox TTS running on NVIDIA Jetson!"
wav = model.generate(text)
ta.save("output.wav", wav, model.sr)

Voice Cloning

# Load reference audio for voice cloning
reference_audio = "path/to/reference.wav"
wav = model.generate(text, reference_audio_path=reference_audio)
ta.save("cloned_voice.wav", wav, model.sr)

⚠️ Development Status: Work in Progress ⚠️

This package is currently under active development. Planned improvements include:

  • Proper Docker container lifecycle management
  • Comprehensive test suite
  • Extended device compatibility testing
  • Performance optimizations for Jetson devices
  • Expanded documentation with more usage examples

Troubleshooting

If you encounter issues with GPU memory or performance:

  • Ensure you have sufficient GPU memory available
  • Consider reducing batch size or sequence length for larger inputs
  • Check that you're using the appropriate CUDA version

Additional Resources

CONTAINERS
chatterbox-tts
   Requires L4T ['>=36.1.0']
   Dependencies build-essential pip_cache:cu126 cuda:12.6 cudnn python numpy cmake onnx torch pytorch:2.8 torchaudio torchvision huggingface_hub rust transformers diffusers sound-utils
   Dockerfile Dockerfile
RUN CONTAINER

To start the container, you can use jetson-containers run and autotag, or manually put together a docker run command:

# automatically pull or build a compatible container image
jetson-containers run $(autotag chatterbox-tts)

# or if using 'docker run' (specify image and mounts/ect)
sudo docker run --runtime nvidia -it --rm --network=host chatterbox-tts:36.4.0

jetson-containers run forwards arguments to docker run with some defaults added (like --runtime nvidia, mounts a /data cache, and detects devices)
autotag finds a container image that's compatible with your version of JetPack/L4T - either locally, pulled from a registry, or by building it.

To mount your own directories into the container, use the -v or --volume flags:

jetson-containers run -v /path/on/host:/path/in/container $(autotag chatterbox-tts)

To launch the container running a command, as opposed to an interactive shell:

jetson-containers run $(autotag chatterbox-tts) my_app --abc xyz

You can pass any options to it that you would to docker run, and it'll print out the full command that it constructs before executing it.

BUILD CONTAINER

If you use autotag as shown above, it'll ask to build the container for you if needed. To manually build it, first do the system setup, then run:

jetson-containers build chatterbox-tts

The dependencies from above will be built into the container, and it'll be tested during. Run it with --help for build options.