{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiomap-ai/json-schema/audiomap-ai-speaker-list-schema.json",
  "title": "SpeakerList",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiomap-ai-openapi.json#/components/schemas/SpeakerList",
  "type": "object",
  "properties": {
    "noteId": {
      "type": "string",
      "format": "uuid"
    },
    "speakers": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/Speaker"
          },
          {
            "type": "object",
            "properties": {
              "evidence": {
                "type": "array",
                "description": "Quotes that support the suggested name",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "transcript",
                        "metadata",
                        "roster",
                        "voice"
                      ],
                      "description": "`voice`: the voice sounds like one of the owner's voice profiles (only with the owner's biometric consent)"
                    },
                    "segment": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Segment `sequence` when the source is the transcript"
                    },
                    "quote": {
                      "type": "string",
                      "description": "For `voice`, the profile name"
                    },
                    "similarity": {
                      "type": "number",
                      "description": "For `voice`: cosine similarity with the profile (0..1)"
                    }
                  }
                }
              }
            }
          }
        ]
      }
    }
  },
  "$defs": {
    "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"
        }
      }
    }
  }
}