> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/yocxy2/chatterboxyocxy/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatterboxTurboTTS

> API reference for the ChatterboxTurboTTS class

## Overview

`ChatterboxTurboTTS` is the fastest text-to-speech model in the Chatterbox family, optimized for low-latency inference. It uses a streamlined architecture with 2 CFM timesteps for rapid audio generation while maintaining high quality.

## Class Signature

```python theme={null}
class ChatterboxTurboTTS:
    def __init__(
        self,
        t3: T3,
        s3gen: S3Gen,
        ve: VoiceEncoder,
        tokenizer: EnTokenizer,
        device: str,
        conds: Conditionals = None,
    )
```

## Parameters

<ParamField path="t3" type="T3" required>
  The T3 text-to-speech tokens model instance
</ParamField>

<ParamField path="s3gen" type="S3Gen" required>
  The S3Gen vocoder model instance for token-to-audio conversion
</ParamField>

<ParamField path="ve" type="VoiceEncoder" required>
  Voice encoder for extracting speaker embeddings from reference audio
</ParamField>

<ParamField path="tokenizer" type="EnTokenizer" required>
  English text tokenizer instance
</ParamField>

<ParamField path="device" type="str" required>
  Device to run inference on ("cuda", "cpu", or "mps")
</ParamField>

<ParamField path="conds" type="Conditionals">
  Optional pre-computed conditionals for voice and style. See [Conditionals](/api/conditionals) reference
</ParamField>

## Class Methods

### from\_pretrained()

Load the pre-trained ChatterboxTurboTTS model from Hugging Face.

```python theme={null}
@classmethod
def from_pretrained(cls, device: str) -> 'ChatterboxTurboTTS'
```

#### Parameters

<ParamField path="device" type="str" required>
  Device to load the model on ("cuda", "cpu", or "mps"). Automatically falls back to "cpu" if MPS is not available
</ParamField>

#### Returns

<ResponseField name="model" type="ChatterboxTurboTTS">
  Initialized ChatterboxTurboTTS model with pre-trained weights from `ResembleAI/chatterbox-turbo`
</ResponseField>

#### Example

```python theme={null}
from chatterbox import ChatterboxTurboTTS
import torch

# Load on GPU
device = "cuda" if torch.cuda.is_available() else "cpu"
model = ChatterboxTurboTTS.from_pretrained(device)
```

### from\_local()

Load the model from a local checkpoint directory.

```python theme={null}
@classmethod
def from_local(cls, ckpt_dir: str, device: str) -> 'ChatterboxTurboTTS'
```

#### Parameters

<ParamField path="ckpt_dir" type="str" required>
  Path to the directory containing model checkpoint files
</ParamField>

<ParamField path="device" type="str" required>
  Device to load the model on ("cuda", "cpu", or "mps")
</ParamField>

#### Returns

<ResponseField name="model" type="ChatterboxTurboTTS">
  Initialized ChatterboxTurboTTS model with weights loaded from local directory
</ResponseField>

## Instance Methods

### prepare\_conditionals()

Prepare voice conditionals from an audio prompt for subsequent generation calls.

```python theme={null}
def prepare_conditionals(
    self,
    wav_fpath: str,
    exaggeration: float = 0.5,
    norm_loudness: bool = True
)
```

#### Parameters

<ParamField path="wav_fpath" type="str" required>
  Path to the audio file to use as voice reference. Must be at least 5 seconds long
</ParamField>

<ParamField path="exaggeration" type="float" default="0.5">
  Voice exaggeration level (0.0 to 1.0). Higher values produce more expressive speech
</ParamField>

<ParamField path="norm_loudness" type="bool" default="True">
  Whether to normalize the loudness of the reference audio to -27 LUFS
</ParamField>

#### Example

```python theme={null}
# Prepare voice from reference audio
model.prepare_conditionals(
    wav_fpath="voice_sample.wav",
    exaggeration=0.5,
    norm_loudness=True
)
```

### generate()

Generate speech from text using the prepared voice conditionals.

```python theme={null}
def generate(
    self,
    text: str,
    repetition_penalty: float = 1.2,
    min_p: float = 0.00,
    top_p: float = 0.95,
    audio_prompt_path: str = None,
    exaggeration: float = 0.0,
    cfg_weight: float = 0.0,
    temperature: float = 0.8,
    top_k: int = 1000,
    norm_loudness: bool = True,
) -> torch.Tensor
```

#### Parameters

<ParamField path="text" type="str" required>
  The text to convert to speech
</ParamField>

<ParamField path="repetition_penalty" type="float" default="1.2">
  Penalty for repeating tokens (1.0 = no penalty, higher values discourage repetition)
</ParamField>

<ParamField path="min_p" type="float" default="0.00">
  Minimum probability threshold for sampling. Not supported in Turbo version and will be ignored
</ParamField>

<ParamField path="top_p" type="float" default="0.95">
  Nucleus sampling threshold (0.0 to 1.0). Only tokens with cumulative probability up to top\_p are considered
</ParamField>

<ParamField path="audio_prompt_path" type="str">
  Optional path to audio file for voice cloning. If provided, will override existing conditionals
</ParamField>

<ParamField path="exaggeration" type="float" default="0.0">
  Voice exaggeration level. Not supported in Turbo version and will be ignored
</ParamField>

<ParamField path="cfg_weight" type="float" default="0.0">
  Classifier-free guidance weight. Not supported in Turbo version and will be ignored
</ParamField>

<ParamField path="temperature" type="float" default="0.8">
  Sampling temperature (higher = more random, lower = more deterministic)
</ParamField>

<ParamField path="top_k" type="int" default="1000">
  Number of top tokens to consider during sampling
</ParamField>

<ParamField path="norm_loudness" type="bool" default="True">
  Whether to normalize the loudness of the audio prompt if provided
</ParamField>

#### Returns

<ResponseField name="audio" type="torch.Tensor">
  Generated audio waveform as a PyTorch tensor with shape `[1, samples]`. Sample rate is 44100 Hz (accessible via `model.sr`). Audio includes perceptual watermarking
</ResponseField>

#### Example

```python theme={null}
import torchaudio

# Generate speech with prepared conditionals
audio = model.generate(
    text="Hello, this is a test of the turbo model.",
    temperature=0.8,
    top_k=1000,
    top_p=0.95,
    repetition_penalty=1.2
)

# Save to file
torchaudio.save("output.wav", audio, model.sr)

# Or generate with a new voice in one call
audio = model.generate(
    text="Hello world!",
    audio_prompt_path="new_voice.wav"
)
```

## Attributes

<ResponseField name="sr" type="int">
  Sample rate of generated audio (44100 Hz)
</ResponseField>

<ResponseField name="device" type="str">
  Device the model is running on
</ResponseField>

<ResponseField name="conds" type="Conditionals">
  Current voice conditionals used for generation
</ResponseField>

## Notes

* The Turbo model does not support `cfg_weight`, `min_p`, or `exaggeration` parameters - these will be ignored with a warning
* Audio prompts must be at least 5 seconds long
* Generated audio is automatically watermarked using the Perth implicit watermarker
* Text is automatically normalized (capitalization, punctuation) before generation
