{"record":{"id":"1da18d71b3081692","repo":"unslothai/unsloth","slug":"dac-dataset-needs-audio-and-text-columns-got","errorCode":null,"errorMessage":"DAC dataset needs 'audio' and 'text' columns, got: {dataset.column_names}","messagePattern":"DAC dataset needs 'audio' and 'text' columns, got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/training/trainer.py","lineNumber":2271,"sourceCode":"        ).AudioProcessor\n        PromptProcessor = import_outetts_module(\n            \"outetts.version.v3.prompt_processor\",\n            outetts_code_dir,\n        ).PromptProcessor\n        OuteTTSModelConfig = import_outetts_module(\n            \"outetts.models.config\",\n            outetts_code_dir,\n        ).ModelConfig\n        text_normalizations = import_outetts_module(\n            \"outetts.utils.preprocessing\",\n            outetts_code_dir,\n        ).text_normalizations\n\n        resolved = self._resolve_audio_columns(dataset, custom_format_mapping)\n        audio_col = resolved[\"audio_col\"]\n        text_col = resolved[\"text_col\"]\n        if not audio_col or not text_col:\n            raise ValueError(\n                f\"DAC dataset needs 'audio' and 'text' columns, got: {dataset.column_names}\"\n            )\n\n        # Cast audio to 24kHz (notebook: cast_column(\"audio\", Audio(sampling_rate=24000)))\n        from datasets import Audio\n\n        dataset = dataset.cast_column(audio_col, Audio(sampling_rate = 24000))\n        logger.info(\"Cast audio column to 24kHz\\n\")\n\n        self._update_progress(status_message = \"Loading Whisper model for word timings...\")\n        logger.info(\"Loading Whisper model for word timings...\\n\")\n        import whisper\n\n        whisper_model = whisper.load_model(\"turbo\", device = device)\n\n        self._update_progress(status_message = \"Loading OuteTTS AudioProcessor...\")\n        logger.info(\"Loading OuteTTS AudioProcessor...\\n\")\n        audio_codec_path = ensure_dac_speech_weights()","sourceCodeStart":2253,"sourceCodeEnd":2289,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/training/trainer.py#L2253-L2289","documentation":"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.","triggerScenarios":"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.","commonSituations":"Unmapped alternative column names; datasets prepared for a different TTS stack; wrong model selection routing a non-audio dataset into the DAC path.","solutions":["Pass custom_format_mapping entries mapping your column names to 'audio' and 'text'.","Rename columns to conventional audio/text names before training.","Confirm the dataset contains audio plus aligned text, as DAC preprocessing requires."],"exampleFix":"// before\ndataset  # columns: ['clip', 'words']\n// after\ndataset = dataset.rename_column('clip', 'audio').rename_column('words', 'text')","handlingStrategy":"validation","validationCode":"def dac_ready(dataset) -> bool:\n    return 'audio' in dataset.column_names and 'text' in dataset.column_names\n\nassert dac_ready(dataset), \"DAC needs 'audio' and 'text' columns\"","typeGuard":"def is_dac_dataset(dataset) -> bool:\n    return 'audio' in dataset.column_names and 'text' in dataset.column_names","tryCatchPattern":"try:\n    ds = trainer._preprocess_dac_dataset(dataset, mapping)\nexcept ValueError as e:\n    if \"DAC dataset needs\" in str(e):\n        mapping = {**(mapping or {}), 'clip': 'audio', 'words': 'text'}\n        ds = trainer._preprocess_dac_dataset(dataset, mapping)","preventionTips":["Use canonical 'audio'/'text' column names for DAC-style TTS datasets.","Provide custom_format_mapping for non-standard schemas in the trainer config.","Check columns before Whisper loads — the column check is cheap, the model load is not."],"tags":["audio","dac","tts","dataset","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}