CompressedAudio
A single chunk of a compressed audio bitstream
Schema
| field | type | description |
|---|---|---|
timestamp | Timestamp | Timestamp of the start of the audio chunk |
data | bytes | Compressed audio data. Packet duration is determined by the codec during encoding. Messages should generally contain approximately 20 ms of audio. |
format | string | Audio format. Values supported by Foxglove are opus for raw Opus packets and mp4a.40.2 for AAC-LC ADTS frames. |
data
opus- Each message must contain a complete raw Opus packet, without Ogg, WebM, or other container framing, as described in RFC 6716 section 3.
- 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).
- A single raw Opus packet represents mono or stereo audio; multichannel Opus requires multistream or container metadata and is not supported by this schema.
mp4a.40.2- 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.
- The ADTS header supplies stream parameters such as sample rate and channel configuration.
Reference implementations
Foxglove messages are framework-agnostic, and can be implemented using any supported message encoding:
| encoding | schema |
|---|---|
| ROS 1 | foxglove_msgs/CompressedAudio |
| ROS 2 | foxglove_msgs/msg/CompressedAudio |
| JSON | foxglove.CompressedAudio |
| Protobuf | foxglove.CompressedAudio |
| FlatBuffers | foxglove.CompressedAudio |
| OMG IDL | foxglove::CompressedAudio |
You must use the schema names specified above for Foxglove to recognize the schema.