unslothai/unsloth · error · ValueError

DAC dataset needs 'audio' and 'text' columns, got: {dataset.

Error message

DAC dataset needs 'audio' and 'text' columns, got: {dataset.column_names}

What it means

ValueError raised at the start of DAC (OutEts-style TTS) preprocessing when the dataset has no resolvable audio or text column. Both are mandatory: audio is cast to 24kHz and Whisper is loaded for word timings right after. The check fires before any expensive model loading, echoing column_names to show what the dataset actually contains.

Source

Thrown at studio/backend/core/training/trainer.py:2271

        ).AudioProcessor
        PromptProcessor = import_outetts_module(
            "outetts.version.v3.prompt_processor",
            outetts_code_dir,
        ).PromptProcessor
        OuteTTSModelConfig = import_outetts_module(
            "outetts.models.config",
            outetts_code_dir,
        ).ModelConfig
        text_normalizations = import_outetts_module(
            "outetts.utils.preprocessing",
            outetts_code_dir,
        ).text_normalizations

        resolved = self._resolve_audio_columns(dataset, custom_format_mapping)
        audio_col = resolved["audio_col"]
        text_col = resolved["text_col"]
        if not audio_col or not text_col:
            raise ValueError(
                f"DAC dataset needs 'audio' and 'text' columns, got: {dataset.column_names}"
            )

        # Cast audio to 24kHz (notebook: cast_column("audio", Audio(sampling_rate=24000)))
        from datasets import Audio

        dataset = dataset.cast_column(audio_col, Audio(sampling_rate = 24000))
        logger.info("Cast audio column to 24kHz\n")

        self._update_progress(status_message = "Loading Whisper model for word timings...")
        logger.info("Loading Whisper model for word timings...\n")
        import whisper

        whisper_model = whisper.load_model("turbo", device = device)

        self._update_progress(status_message = "Loading OuteTTS AudioProcessor...")
        logger.info("Loading OuteTTS AudioProcessor...\n")
        audio_codec_path = ensure_dac_speech_weights()

View on GitHub (pinned to 203007d190)

Solutions

  1. Pass custom_format_mapping entries mapping your column names to 'audio' and 'text'.
  2. Rename columns to conventional audio/text names before training.
  3. Confirm the dataset contains audio plus aligned text, as DAC preprocessing requires.

Example fix

// before
dataset  # columns: ['clip', 'words']
// after
dataset = dataset.rename_column('clip', 'audio').rename_column('words', 'text')
Defensive patterns

Strategy: validation

Validate before calling

def dac_ready(dataset) -> bool:
    return 'audio' in dataset.column_names and 'text' in dataset.column_names

assert dac_ready(dataset), "DAC needs 'audio' and 'text' columns"

Type guard

def is_dac_dataset(dataset) -> bool:
    return 'audio' in dataset.column_names and 'text' in dataset.column_names

Try / catch

try:
    ds = trainer._preprocess_dac_dataset(dataset, mapping)
except ValueError as e:
    if "DAC dataset needs" in str(e):
        mapping = {**(mapping or {}), 'clip': 'audio', 'words': 'text'}
        ds = trainer._preprocess_dac_dataset(dataset, mapping)

Prevention

When it happens

Trigger: DAC fine-tune with a dataset missing the text column, missing audio, or using column names (e.g. 'clip', 'words') not covered by the resolver or custom_format_mapping.

Common situations: Unmapped alternative column names; datasets prepared for a different TTS stack; wrong model selection routing a non-audio dataset into the DAC path.

Related errors


AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15). Data as JSON: /api/errors/1da18d71b3081692. Report an issue: GitHub.