{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agenticdecks.com/schemas/v1/deckrun-notes-audio-manifest.json",
  "$comment": "© 2026 Agentic Decks. Publicly readable. Not open source. See https://agenticdecks.com/schemas for usage terms.",
  "title": "Deckrun notes-audio manifest",
  "description": "Manifest produced by generate_notes_audio alongside .notes.mp3 and .notes.cue. Used by the video pipeline (generate_video_with_audio) for per-slide durations and by tools that embed chapters (e.g. MP4 chapters, CUE). Slide numbers and timings align with the concatenated audio file.",
  "type": "object",
  "required": ["title", "slides"],
  "properties": {
    "title": {
      "type": "string",
      "description": "Presentation or deck title."
    },
    "audio_file": {
      "type": "string",
      "description": "Path or URI of the concatenated audio file (.notes.mp3) when written. Optional in schema; producers may omit or use a stable identifier."
    },
    "total_duration": {
      "type": "number",
      "minimum": 0,
      "description": "Total duration of the audio in seconds (sum of slide durations plus gaps)."
    },
    "slides": {
      "type": "array",
      "description": "One entry per notes segment; slides with multiple <slide-notes> blocks produce multiple entries. Order matches the audio and CUE TRACK order.",
      "items": { "$ref": "#/$defs/slideSegment" }
    }
  },
  "$defs": {
    "slideSegment": {
      "type": "object",
      "description": "Timing and metadata for one notes segment in the concatenated audio. A slide may contribute multiple segments when it has multiple <slide-notes> blocks.",
      "required": ["slide", "segment", "duration"],
      "properties": {
        "slide": {
          "type": "integer",
          "minimum": 1,
          "description": "1-based slide number. Multiple entries may share the same slide number (one per notes block)."
        },
        "segment": {
          "type": "integer",
          "minimum": 1,
          "description": "1-based segment index within the slide. Always 1 for slides with a single notes block; increments for each additional block."
        },
        "title": {
          "type": "string",
          "description": "Slide title (for chapter labels and CUE TITLE)."
        },
        "start_time": {
          "type": "number",
          "minimum": 0,
          "description": "Start time of this segment in the full audio, in seconds."
        },
        "duration": {
          "type": "number",
          "minimum": 0,
          "description": "Duration of this segment in seconds. Video pipeline uses this for per-slide segment length."
        },
        "end_time": {
          "type": "number",
          "minimum": 0,
          "description": "End time of this segment in the full audio, in seconds (start_time + duration)."
        },
        "language": {
          "type": "string",
          "description": "BCP-47 language code used for TTS narration of this slide (e.g. 'en-US', 'ta-IN', 'zh-CN'). Set from per-slide language attribute or TtsConfig.default_language."
        }
      }
    }
  }
}
