{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "AcousticProfile.json",
  "title": "Acoustic Profile V1.0",
  "type": "object",
  "description": "Ambient audio characteristics of the scene, including reverberation, echo, noise levels, and inferred geometry",
  "properties": {
    "Header": {
      "type": "string",
      "pattern": "^OSD-ACP-V[0-9]{1,2}[.][0-9]{1,2}$"
    },
    "MInstance": {
      "type": "string"
    },
    "AcousticProfile": {
      "type": "object",
      "properties": {
        "ReverberationLevel": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "EchoPresence": {
          "type": "boolean"
        },
        "BackgroundNoiseLevel": {
          "type": "number",
          "minimum": 0
        },
        "DominantFrequencyBands": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "BandLabel": { "type": "string" },
              "FrequencyRangeHz": {
                "type": "array",
                "items": { "type": "number" },
                "minItems": 2,
                "maxItems": 2
              },
              "BandEnergy": { "type": "number" }
            },
            "required": ["BandLabel", "FrequencyRangeHz", "BandEnergy"]
          }
        },
        "InferredGeometry": {
          "type": "string"
        }
      },
      "required": ["ReverberationLevel", "EchoPresence", "BackgroundNoiseLevel"]
    },
    "Duration": {
      "$ref": "Time.json",
      "description": "Time duration or timestamp over which the acoustic profile was evaluated"
    },
    "Trace": {
      "type": "object",
      "properties": {
        "Origin": { "type": "string" },
        "Timestamp": {
          "$ref": "Time.json"
        }
      },
      "required": ["Origin", "Timestamp"]
    },
    "DescrMetadata": {
      "type": "string"
    }
  },
  "required": ["Header", "MInstance", "AcousticProfile", "Duration", "Trace", "DescrMetadata"]
}
