{
  "title": "foxglove.CompressedAudio",
  "description": "A single chunk of a compressed audio bitstream",
  "$comment": "Generated by https://github.com/foxglove/foxglove-sdk",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "object",
      "title": "time",
      "properties": {
        "sec": {
          "type": "integer",
          "minimum": 0
        },
        "nsec": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999999999
        }
      },
      "description": "Timestamp of the start of the audio chunk"
    },
    "data": {
      "type": "string",
      "contentEncoding": "base64",
      "description": "Compressed audio data. Packet duration is determined by the codec during encoding. Messages should generally contain approximately 20 ms of audio.\n\n- `opus`\n  - Each message must contain a complete raw Opus packet, without Ogg, WebM, or other container framing, as described in [RFC 6716 section 3](https://datatracker.ietf.org/doc/html/rfc6716#section-3).\n  - Each packet contains all information necessary for decoding, and may be decoded at any sample rate supported by Opus (8, 12, 16, 24, or 48 kHz).\n  - A single raw Opus packet represents mono or stereo audio; multichannel Opus requires multistream or container metadata and is not supported by this schema.\n- `mp4a.40.2`\n  - Each message must contain a complete MPEG-4 AAC-LC ADTS frame, including the ADTS header, as described in section 1.A.3.2 of ISO/IEC 14496-3:2019.\n  - The ADTS header supplies stream parameters such as sample rate and channel configuration."
    },
    "format": {
      "type": "string",
      "description": "Audio format. Values supported by Foxglove are `opus` for raw Opus packets and `mp4a.40.2` for AAC-LC ADTS frames."
    }
  },
  "required": [
    "timestamp",
    "data",
    "format"
  ]
}
