{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiomap-ai/json-schema/audiomap-ai-transcript-schema.json",
  "title": "Transcript",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiomap-ai-openapi.json#/components/schemas/Transcript",
  "type": "object",
  "properties": {
    "noteId": {
      "type": "string",
      "format": "uuid"
    },
    "language": {
      "type": [
        "string",
        "null"
      ]
    },
    "languagesDetected": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "durationSeconds": {
      "type": [
        "integer",
        "null"
      ]
    },
    "provider": {
      "type": [
        "string",
        "null"
      ]
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "fullText": {
      "type": "string"
    },
    "speakers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Speaker"
      }
    },
    "segments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Segment"
      }
    }
  },
  "$defs": {
    "Segment": {
      "type": "object",
      "properties": {
        "sequence": {
          "type": "integer"
        },
        "startMs": {
          "type": "integer"
        },
        "endMs": {
          "type": "integer"
        },
        "speakerLabel": {
          "type": [
            "string",
            "null"
          ]
        },
        "speakerName": {
          "type": [
            "string",
            "null"
          ]
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ]
        },
        "locale": {
          "type": [
            "string",
            "null"
          ]
        },
        "words": {
          "type": [
            "array",
            "null"
          ],
          "description": "Per-word timings when the provider emits them; null otherwise",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "startMs": {
                "type": "integer"
              },
              "endMs": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "Speaker": {
      "type": "object",
      "properties": {
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "A, B, C… as the diarizer assigned them"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name in use: persistent profile, name given by the user, or inferred with high confidence"
        },
        "nameStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "confirmed",
            "suggested",
            null
          ],
          "description": "`confirmed` = given by the user; `suggested` = inferred from the content, not confirmed yet"
        },
        "suggestedName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name inferred from the content and the source metadata"
        },
        "suggestedNameConfidence": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        },
        "speechSeconds": {
          "type": [
            "number",
            "null"
          ]
        },
        "segmentCount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "voiceExcluded": {
          "type": "boolean",
          "description": "\"Do not recognise this person\" is set on this speaker or on its profile: its voice is not analysed nor matched"
        }
      }
    }
  }
}