From 09a6ae09fc9a147f7d460c3b8ecbc08e972ff147 Mon Sep 17 00:00:00 2001 From: fgwt202412 <191263616+fgwt202412@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:42:39 -0500 Subject: [PATCH 1/4] FG-2933: Add CompressedAudio schema --- .../exportTypeScriptSchemas.test.ts.snap | 26 +++++++++ internal/schemas.ts | 26 +++++++++ package.json | 2 +- ros_foxglove_msgs/ros1/CompressedAudio.msg | 17 ++++++ ros_foxglove_msgs/ros2/CompressedAudio.msg | 17 ++++++ schemas/README.md | 56 +++++++++++++++++++ schemas/flatbuffer/CompressedAudio.fbs | 23 ++++++++ schemas/jsonschema/CompressedAudio.json | 33 +++++++++++ schemas/jsonschema/index.ts | 34 +++++++++++ schemas/omgidl/foxglove/CompressedAudio.idl | 23 ++++++++ schemas/proto/foxglove/CompressedAudio.proto | 23 ++++++++ schemas/ros1/CompressedAudio.msg | 17 ++++++ schemas/ros2/CompressedAudio.msg | 17 ++++++ schemas/typescript/CompressedAudio.ts | 24 ++++++++ schemas/typescript/index.ts | 1 + 15 files changed, 338 insertions(+), 1 deletion(-) create mode 100644 ros_foxglove_msgs/ros1/CompressedAudio.msg create mode 100644 ros_foxglove_msgs/ros2/CompressedAudio.msg create mode 100644 schemas/flatbuffer/CompressedAudio.fbs create mode 100644 schemas/jsonschema/CompressedAudio.json create mode 100644 schemas/omgidl/foxglove/CompressedAudio.idl create mode 100644 schemas/proto/foxglove/CompressedAudio.proto create mode 100644 schemas/ros1/CompressedAudio.msg create mode 100644 schemas/ros2/CompressedAudio.msg create mode 100644 schemas/typescript/CompressedAudio.ts diff --git a/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap b/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap index 7ee534d..b0076b7 100644 --- a/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap +++ b/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap @@ -236,6 +236,31 @@ export type CompressedVideo = { */ format: string; }; +", + "CompressedAudio" => "// Generated by https://github.com/foxglove/schemas +// Options: {} + +import { Time } from "./Time"; + +/** A single frame of a compressed audio bitstream */ +export type CompressedAudio = { + /** Timestamp of audio frame */ + timestamp: Time; + + /** + * Compressed audio frame data. + * + * TK + */ + data: Uint8Array; + + /** + * Audio format. + * + * Supported values: \`opus\`. + */ + format: string; +}; ", "CylinderPrimitive" => "// Generated by https://github.com/foxglove/schemas // Options: {} @@ -1104,6 +1129,7 @@ export enum PositionCovarianceType { export * from "./CameraCalibration"; export * from "./CircleAnnotation"; export * from "./Color"; +export * from "./CompressedAudio"; export * from "./CompressedImage"; export * from "./CompressedVideo"; export * from "./CubePrimitive"; diff --git a/internal/schemas.ts b/internal/schemas.ts index 1bf5e5c..19c7e1b 100644 --- a/internal/schemas.ts +++ b/internal/schemas.ts @@ -843,6 +843,31 @@ Specifically, the requirements for different \`format\` values are: ], }; +const CompressedAudio: FoxgloveMessageSchema = { + type: "message", + name: "CompressedAudio", + description: "A single frame of a compressed audio bitstream", + fields: [ + { + name: "timestamp", + type: { type: "primitive", name: "time" }, + description: "Timestamp of audio frame", + }, + { + name: "data", + type: { type: "primitive", name: "bytes" }, + description: `Compressed audio frame data. + +TK`, + }, + { + name: "format", + type: { type: "primitive", name: "string" }, + description: "Audio format.\n\nSupported values: `opus`.", + }, + ], +}; + const RawImage: FoxgloveMessageSchema = { type: "message", name: "RawImage", @@ -1482,6 +1507,7 @@ export const foxgloveMessageSchemas = { Color, CompressedImage, CompressedVideo, + CompressedAudio, CylinderPrimitive, CubePrimitive, FrameTransform, diff --git a/package.json b/package.json index 787aedb..4992a43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@foxglove/schemas", - "version": "1.6.6", + "version": "1.6.7", "description": "Foxglove-defined message schemas for ROS, Protobuf, FlatBuffers, OMG IDL, and JSON", "license": "MIT", "repository": { diff --git a/ros_foxglove_msgs/ros1/CompressedAudio.msg b/ros_foxglove_msgs/ros1/CompressedAudio.msg new file mode 100644 index 0000000..90da460 --- /dev/null +++ b/ros_foxglove_msgs/ros1/CompressedAudio.msg @@ -0,0 +1,17 @@ +# foxglove_msgs/CompressedAudio +# A single frame of a compressed audio bitstream + +# Generated by https://github.com/foxglove/schemas + +# Timestamp of audio frame +time timestamp + +# Compressed audio frame data. +# +# TK +uint8[] data + +# Audio format. +# +# Supported values: `opus`. +string format diff --git a/ros_foxglove_msgs/ros2/CompressedAudio.msg b/ros_foxglove_msgs/ros2/CompressedAudio.msg new file mode 100644 index 0000000..7afd869 --- /dev/null +++ b/ros_foxglove_msgs/ros2/CompressedAudio.msg @@ -0,0 +1,17 @@ +# foxglove_msgs/msg/CompressedAudio +# A single frame of a compressed audio bitstream + +# Generated by https://github.com/foxglove/schemas + +# Timestamp of audio frame +builtin_interfaces/Time timestamp + +# Compressed audio frame data. +# +# TK +uint8[] data + +# Audio format. +# +# Supported values: `opus`. +string format diff --git a/schemas/README.md b/schemas/README.md index 3dfd5a6..97f188b 100644 --- a/schemas/README.md +++ b/schemas/README.md @@ -16,6 +16,7 @@ All schemas are generated from [schemas.ts](/internal/schemas.ts). - [CameraCalibration](#cameracalibration) - [CircleAnnotation](#circleannotation) - [Color](#color) +- [CompressedAudio](#compressedaudio) - [CompressedImage](#compressedimage) - [CompressedVideo](#compressedvideo) - [CubePrimitive](#cubeprimitive) @@ -550,6 +551,61 @@ Alpha value between 0 and 1 +## CompressedAudio + +A single frame of a compressed audio bitstream + + + + + + + + + + + + + + + + + + + + + + +
fieldtypedescription
timestamp + +time + + + +Timestamp of audio frame + +
data + +bytes + + + +Compressed audio frame data. + +TK + +
format + +string + + + +Audio format. + +Supported values: `opus`. + +
+ ## CompressedImage A compressed image diff --git a/schemas/flatbuffer/CompressedAudio.fbs b/schemas/flatbuffer/CompressedAudio.fbs new file mode 100644 index 0000000..48f8462 --- /dev/null +++ b/schemas/flatbuffer/CompressedAudio.fbs @@ -0,0 +1,23 @@ +// Generated by https://github.com/foxglove/schemas + +include "Time.fbs"; + +namespace foxglove; + +/// A single frame of a compressed audio bitstream +table CompressedAudio { + /// Timestamp of audio frame + timestamp:Time (id: 0); + + /// Compressed audio frame data. + /// + /// TK + data:[uint8] (id: 1); + + /// Audio format. + /// + /// Supported values: `opus`. + format:string (id: 2); +} + +root_type CompressedAudio; diff --git a/schemas/jsonschema/CompressedAudio.json b/schemas/jsonschema/CompressedAudio.json new file mode 100644 index 0000000..763393c --- /dev/null +++ b/schemas/jsonschema/CompressedAudio.json @@ -0,0 +1,33 @@ +{ + "title": "foxglove.CompressedAudio", + "description": "A single frame of a compressed audio bitstream", + "$comment": "Generated by https://github.com/foxglove/schemas", + "type": "object", + "properties": { + "timestamp": { + "type": "object", + "title": "time", + "properties": { + "sec": { + "type": "integer", + "minimum": 0 + }, + "nsec": { + "type": "integer", + "minimum": 0, + "maximum": 999999999 + } + }, + "description": "Timestamp of audio frame" + }, + "data": { + "type": "string", + "contentEncoding": "base64", + "description": "Compressed audio frame data.\n\nTK" + }, + "format": { + "type": "string", + "description": "Audio format.\n\nSupported values: `opus`." + } + } +} diff --git a/schemas/jsonschema/index.ts b/schemas/jsonschema/index.ts index 22da45f..7143fdb 100644 --- a/schemas/jsonschema/index.ts +++ b/schemas/jsonschema/index.ts @@ -369,6 +369,40 @@ export const CompressedVideo = { } }; +export const CompressedAudio = { + "title": "foxglove.CompressedAudio", + "description": "A single frame of a compressed audio bitstream", + "$comment": "Generated by https://github.com/foxglove/schemas", + "type": "object", + "properties": { + "timestamp": { + "type": "object", + "title": "time", + "properties": { + "sec": { + "type": "integer", + "minimum": 0 + }, + "nsec": { + "type": "integer", + "minimum": 0, + "maximum": 999999999 + } + }, + "description": "Timestamp of audio frame" + }, + "data": { + "type": "string", + "contentEncoding": "base64", + "description": "Compressed audio frame data.\n\nTK" + }, + "format": { + "type": "string", + "description": "Audio format.\n\nSupported values: `opus`." + } + } +}; + export const CylinderPrimitive = { "title": "foxglove.CylinderPrimitive", "description": "A primitive representing a cylinder, elliptic cylinder, or truncated cone", diff --git a/schemas/omgidl/foxglove/CompressedAudio.idl b/schemas/omgidl/foxglove/CompressedAudio.idl new file mode 100644 index 0000000..45042d6 --- /dev/null +++ b/schemas/omgidl/foxglove/CompressedAudio.idl @@ -0,0 +1,23 @@ +// Generated by https://github.com/foxglove/schemas + +#include "foxglove/Time.idl" + +module foxglove { + +// A single frame of a compressed audio bitstream +struct CompressedAudio { + // Timestamp of audio frame + Time timestamp; + + // Compressed audio frame data. + // + // TK + sequence data; + + // Audio format. + // + // Supported values: `opus`. + string format; +}; + +}; diff --git a/schemas/proto/foxglove/CompressedAudio.proto b/schemas/proto/foxglove/CompressedAudio.proto new file mode 100644 index 0000000..7f26ae8 --- /dev/null +++ b/schemas/proto/foxglove/CompressedAudio.proto @@ -0,0 +1,23 @@ +// Generated by https://github.com/foxglove/schemas + +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; + +package foxglove; + +// A single frame of a compressed audio bitstream +message CompressedAudio { + // Timestamp of audio frame + google.protobuf.Timestamp timestamp = 1; + + // Compressed audio frame data. + // + // TK + bytes data = 2; + + // Audio format. + // + // Supported values: `opus`. + string format = 3; +} diff --git a/schemas/ros1/CompressedAudio.msg b/schemas/ros1/CompressedAudio.msg new file mode 100644 index 0000000..90da460 --- /dev/null +++ b/schemas/ros1/CompressedAudio.msg @@ -0,0 +1,17 @@ +# foxglove_msgs/CompressedAudio +# A single frame of a compressed audio bitstream + +# Generated by https://github.com/foxglove/schemas + +# Timestamp of audio frame +time timestamp + +# Compressed audio frame data. +# +# TK +uint8[] data + +# Audio format. +# +# Supported values: `opus`. +string format diff --git a/schemas/ros2/CompressedAudio.msg b/schemas/ros2/CompressedAudio.msg new file mode 100644 index 0000000..7afd869 --- /dev/null +++ b/schemas/ros2/CompressedAudio.msg @@ -0,0 +1,17 @@ +# foxglove_msgs/msg/CompressedAudio +# A single frame of a compressed audio bitstream + +# Generated by https://github.com/foxglove/schemas + +# Timestamp of audio frame +builtin_interfaces/Time timestamp + +# Compressed audio frame data. +# +# TK +uint8[] data + +# Audio format. +# +# Supported values: `opus`. +string format diff --git a/schemas/typescript/CompressedAudio.ts b/schemas/typescript/CompressedAudio.ts new file mode 100644 index 0000000..b689379 --- /dev/null +++ b/schemas/typescript/CompressedAudio.ts @@ -0,0 +1,24 @@ +// Generated by https://github.com/foxglove/schemas +// Options: {} + +import { Time } from "./Time"; + +/** A single frame of a compressed audio bitstream */ +export type CompressedAudio = { + /** Timestamp of audio frame */ + timestamp: Time; + + /** + * Compressed audio frame data. + * + * TK + */ + data: Uint8Array; + + /** + * Audio format. + * + * Supported values: `opus`. + */ + format: string; +}; diff --git a/schemas/typescript/index.ts b/schemas/typescript/index.ts index 17d8755..3d03544 100644 --- a/schemas/typescript/index.ts +++ b/schemas/typescript/index.ts @@ -2,6 +2,7 @@ export * from "./ArrowPrimitive"; export * from "./CameraCalibration"; export * from "./CircleAnnotation"; export * from "./Color"; +export * from "./CompressedAudio"; export * from "./CompressedImage"; export * from "./CompressedVideo"; export * from "./CubePrimitive"; From 62a068548a53dbb9e3ad964fc8ff0b14531036b9 Mon Sep 17 00:00:00 2001 From: fgwt202412 <191263616+fgwt202412@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:45:16 -0500 Subject: [PATCH 2/4] Add frame type - key or delta --- .../exportTypeScriptSchemas.test.ts.snap | 7 +++++++ internal/schemas.ts | 5 +++++ ros_foxglove_msgs/ros1/CompressedAudio.msg | 5 +++++ ros_foxglove_msgs/ros2/CompressedAudio.msg | 5 +++++ schemas/README.md | 15 +++++++++++++++ schemas/flatbuffer/CompressedAudio.fbs | 5 +++++ schemas/jsonschema/CompressedAudio.json | 4 ++++ schemas/jsonschema/index.ts | 4 ++++ schemas/omgidl/foxglove/CompressedAudio.idl | 5 +++++ schemas/proto/foxglove/CompressedAudio.proto | 5 +++++ schemas/ros1/CompressedAudio.msg | 5 +++++ schemas/ros2/CompressedAudio.msg | 5 +++++ schemas/typescript/CompressedAudio.ts | 7 +++++++ 13 files changed, 77 insertions(+) diff --git a/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap b/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap index b0076b7..0296c89 100644 --- a/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap +++ b/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap @@ -260,6 +260,13 @@ export type CompressedAudio = { * Supported values: \`opus\`. */ format: string; + + /** + * Frame type. + * + * Supported values: \`key\`, \`delta\`. + */ + type: string; }; ", "CylinderPrimitive" => "// Generated by https://github.com/foxglove/schemas diff --git a/internal/schemas.ts b/internal/schemas.ts index 19c7e1b..ab01a1e 100644 --- a/internal/schemas.ts +++ b/internal/schemas.ts @@ -865,6 +865,11 @@ TK`, type: { type: "primitive", name: "string" }, description: "Audio format.\n\nSupported values: `opus`.", }, + { + name: "type", + type: { type: "primitive", name: "string" }, + description: "Frame type.\n\n Supported values: `key`, `delta`.", + }, ], }; diff --git a/ros_foxglove_msgs/ros1/CompressedAudio.msg b/ros_foxglove_msgs/ros1/CompressedAudio.msg index 90da460..f9cdfc0 100644 --- a/ros_foxglove_msgs/ros1/CompressedAudio.msg +++ b/ros_foxglove_msgs/ros1/CompressedAudio.msg @@ -15,3 +15,8 @@ uint8[] data # # Supported values: `opus`. string format + +# Frame type. +# +# Supported values: `key`, `delta`. +string type diff --git a/ros_foxglove_msgs/ros2/CompressedAudio.msg b/ros_foxglove_msgs/ros2/CompressedAudio.msg index 7afd869..31dc397 100644 --- a/ros_foxglove_msgs/ros2/CompressedAudio.msg +++ b/ros_foxglove_msgs/ros2/CompressedAudio.msg @@ -15,3 +15,8 @@ uint8[] data # # Supported values: `opus`. string format + +# Frame type. +# +# Supported values: `key`, `delta`. +string type diff --git a/schemas/README.md b/schemas/README.md index 97f188b..57b041c 100644 --- a/schemas/README.md +++ b/schemas/README.md @@ -602,6 +602,21 @@ Audio format. Supported values: `opus`. + + + +type + + +string + + + + +Frame type. + + Supported values: `key`, `delta`. + diff --git a/schemas/flatbuffer/CompressedAudio.fbs b/schemas/flatbuffer/CompressedAudio.fbs index 48f8462..211df16 100644 --- a/schemas/flatbuffer/CompressedAudio.fbs +++ b/schemas/flatbuffer/CompressedAudio.fbs @@ -18,6 +18,11 @@ table CompressedAudio { /// /// Supported values: `opus`. format:string (id: 2); + + /// Frame type. + /// + /// Supported values: `key`, `delta`. + type:string (id: 3); } root_type CompressedAudio; diff --git a/schemas/jsonschema/CompressedAudio.json b/schemas/jsonschema/CompressedAudio.json index 763393c..c4d1274 100644 --- a/schemas/jsonschema/CompressedAudio.json +++ b/schemas/jsonschema/CompressedAudio.json @@ -28,6 +28,10 @@ "format": { "type": "string", "description": "Audio format.\n\nSupported values: `opus`." + }, + "type": { + "type": "string", + "description": "Frame type.\n\n Supported values: `key`, `delta`." } } } diff --git a/schemas/jsonschema/index.ts b/schemas/jsonschema/index.ts index 7143fdb..8c06a1e 100644 --- a/schemas/jsonschema/index.ts +++ b/schemas/jsonschema/index.ts @@ -399,6 +399,10 @@ export const CompressedAudio = { "format": { "type": "string", "description": "Audio format.\n\nSupported values: `opus`." + }, + "type": { + "type": "string", + "description": "Frame type.\n\n Supported values: `key`, `delta`." } } }; diff --git a/schemas/omgidl/foxglove/CompressedAudio.idl b/schemas/omgidl/foxglove/CompressedAudio.idl index 45042d6..c16a510 100644 --- a/schemas/omgidl/foxglove/CompressedAudio.idl +++ b/schemas/omgidl/foxglove/CompressedAudio.idl @@ -18,6 +18,11 @@ struct CompressedAudio { // // Supported values: `opus`. string format; + + // Frame type. + // + // Supported values: `key`, `delta`. + string type; }; }; diff --git a/schemas/proto/foxglove/CompressedAudio.proto b/schemas/proto/foxglove/CompressedAudio.proto index 7f26ae8..61c3f8b 100644 --- a/schemas/proto/foxglove/CompressedAudio.proto +++ b/schemas/proto/foxglove/CompressedAudio.proto @@ -20,4 +20,9 @@ message CompressedAudio { // // Supported values: `opus`. string format = 3; + + // Frame type. + // + // Supported values: `key`, `delta`. + string type = 4; } diff --git a/schemas/ros1/CompressedAudio.msg b/schemas/ros1/CompressedAudio.msg index 90da460..f9cdfc0 100644 --- a/schemas/ros1/CompressedAudio.msg +++ b/schemas/ros1/CompressedAudio.msg @@ -15,3 +15,8 @@ uint8[] data # # Supported values: `opus`. string format + +# Frame type. +# +# Supported values: `key`, `delta`. +string type diff --git a/schemas/ros2/CompressedAudio.msg b/schemas/ros2/CompressedAudio.msg index 7afd869..31dc397 100644 --- a/schemas/ros2/CompressedAudio.msg +++ b/schemas/ros2/CompressedAudio.msg @@ -15,3 +15,8 @@ uint8[] data # # Supported values: `opus`. string format + +# Frame type. +# +# Supported values: `key`, `delta`. +string type diff --git a/schemas/typescript/CompressedAudio.ts b/schemas/typescript/CompressedAudio.ts index b689379..4b29a2c 100644 --- a/schemas/typescript/CompressedAudio.ts +++ b/schemas/typescript/CompressedAudio.ts @@ -21,4 +21,11 @@ export type CompressedAudio = { * Supported values: `opus`. */ format: string; + + /** + * Frame type. + * + * Supported values: `key`, `delta`. + */ + type: string; }; From c8b9698ba0ec333f28218402ac3dda1eab6386c6 Mon Sep 17 00:00:00 2001 From: fgwt202412 <191263616+fgwt202412@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:17:00 -0500 Subject: [PATCH 3/4] Add sample rate and number of channels --- .../exportTypeScriptSchemas.test.ts.snap | 12 ++++---- internal/schemas.ts | 14 ++++++++-- ros_foxglove_msgs/ros1/CompressedAudio.msg | 8 ++++-- ros_foxglove_msgs/ros2/CompressedAudio.msg | 8 ++++-- schemas/README.md | 28 +++++++++++++++++-- schemas/flatbuffer/CompressedAudio.fbs | 8 ++++-- schemas/jsonschema/CompressedAudio.json | 12 +++++++- schemas/jsonschema/index.ts | 12 +++++++- schemas/omgidl/foxglove/CompressedAudio.idl | 8 ++++-- schemas/proto/foxglove/CompressedAudio.proto | 8 ++++-- schemas/ros1/CompressedAudio.msg | 8 ++++-- schemas/ros2/CompressedAudio.msg | 8 ++++-- schemas/typescript/CompressedAudio.ts | 12 ++++---- 13 files changed, 115 insertions(+), 31 deletions(-) diff --git a/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap b/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap index 0296c89..41aa397 100644 --- a/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap +++ b/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap @@ -247,11 +247,7 @@ export type CompressedAudio = { /** Timestamp of audio frame */ timestamp: Time; - /** - * Compressed audio frame data. - * - * TK - */ + /** Compressed audio frame data. */ data: Uint8Array; /** @@ -267,6 +263,12 @@ export type CompressedAudio = { * Supported values: \`key\`, \`delta\`. */ type: string; + + /** Number of audio samples per second. */ + sample_rate: number; + + /** Number of audio channels in the input. */ + number_of_channels: number; }; ", "CylinderPrimitive" => "// Generated by https://github.com/foxglove/schemas diff --git a/internal/schemas.ts b/internal/schemas.ts index ab01a1e..42f9ae8 100644 --- a/internal/schemas.ts +++ b/internal/schemas.ts @@ -856,9 +856,7 @@ const CompressedAudio: FoxgloveMessageSchema = { { name: "data", type: { type: "primitive", name: "bytes" }, - description: `Compressed audio frame data. - -TK`, + description: `Compressed audio frame data.`, }, { name: "format", @@ -870,6 +868,16 @@ TK`, type: { type: "primitive", name: "string" }, description: "Frame type.\n\n Supported values: `key`, `delta`.", }, + { + name: "sample_rate", + type: { type: "primitive", name: "uint32" }, + description: "Number of audio samples per second.", + }, + { + name: "number_of_channels", + type: { type: "primitive", name: "uint32" }, + description: "Number of audio channels in the input.", + }, ], }; diff --git a/ros_foxglove_msgs/ros1/CompressedAudio.msg b/ros_foxglove_msgs/ros1/CompressedAudio.msg index f9cdfc0..3680dd2 100644 --- a/ros_foxglove_msgs/ros1/CompressedAudio.msg +++ b/ros_foxglove_msgs/ros1/CompressedAudio.msg @@ -7,8 +7,6 @@ time timestamp # Compressed audio frame data. -# -# TK uint8[] data # Audio format. @@ -20,3 +18,9 @@ string format # # Supported values: `key`, `delta`. string type + +# Number of audio samples per second. +uint32 sample_rate + +# Number of audio channels in the input. +uint32 number_of_channels diff --git a/ros_foxglove_msgs/ros2/CompressedAudio.msg b/ros_foxglove_msgs/ros2/CompressedAudio.msg index 31dc397..a03030f 100644 --- a/ros_foxglove_msgs/ros2/CompressedAudio.msg +++ b/ros_foxglove_msgs/ros2/CompressedAudio.msg @@ -7,8 +7,6 @@ builtin_interfaces/Time timestamp # Compressed audio frame data. -# -# TK uint8[] data # Audio format. @@ -20,3 +18,9 @@ string format # # Supported values: `key`, `delta`. string type + +# Number of audio samples per second. +uint32 sample_rate + +# Number of audio channels in the input. +uint32 number_of_channels diff --git a/schemas/README.md b/schemas/README.md index 57b041c..0a5d1fb 100644 --- a/schemas/README.md +++ b/schemas/README.md @@ -585,8 +585,6 @@ bytes Compressed audio frame data. -TK - @@ -617,6 +615,32 @@ Frame type. Supported values: `key`, `delta`. + + + +sample_rate + + +uint32 + + + + +Number of audio samples per second. + + + + +number_of_channels + + +uint32 + + + + +Number of audio channels in the input. + diff --git a/schemas/flatbuffer/CompressedAudio.fbs b/schemas/flatbuffer/CompressedAudio.fbs index 211df16..fbee197 100644 --- a/schemas/flatbuffer/CompressedAudio.fbs +++ b/schemas/flatbuffer/CompressedAudio.fbs @@ -10,8 +10,6 @@ table CompressedAudio { timestamp:Time (id: 0); /// Compressed audio frame data. - /// - /// TK data:[uint8] (id: 1); /// Audio format. @@ -23,6 +21,12 @@ table CompressedAudio { /// /// Supported values: `key`, `delta`. type:string (id: 3); + + /// Number of audio samples per second. + sample_rate:uint32 (id: 4); + + /// Number of audio channels in the input. + number_of_channels:uint32 (id: 5); } root_type CompressedAudio; diff --git a/schemas/jsonschema/CompressedAudio.json b/schemas/jsonschema/CompressedAudio.json index c4d1274..835be23 100644 --- a/schemas/jsonschema/CompressedAudio.json +++ b/schemas/jsonschema/CompressedAudio.json @@ -23,7 +23,7 @@ "data": { "type": "string", "contentEncoding": "base64", - "description": "Compressed audio frame data.\n\nTK" + "description": "Compressed audio frame data." }, "format": { "type": "string", @@ -32,6 +32,16 @@ "type": { "type": "string", "description": "Frame type.\n\n Supported values: `key`, `delta`." + }, + "sample_rate": { + "type": "integer", + "minimum": 0, + "description": "Number of audio samples per second." + }, + "number_of_channels": { + "type": "integer", + "minimum": 0, + "description": "Number of audio channels in the input." } } } diff --git a/schemas/jsonschema/index.ts b/schemas/jsonschema/index.ts index 8c06a1e..e8ffa52 100644 --- a/schemas/jsonschema/index.ts +++ b/schemas/jsonschema/index.ts @@ -394,7 +394,7 @@ export const CompressedAudio = { "data": { "type": "string", "contentEncoding": "base64", - "description": "Compressed audio frame data.\n\nTK" + "description": "Compressed audio frame data." }, "format": { "type": "string", @@ -403,6 +403,16 @@ export const CompressedAudio = { "type": { "type": "string", "description": "Frame type.\n\n Supported values: `key`, `delta`." + }, + "sample_rate": { + "type": "integer", + "minimum": 0, + "description": "Number of audio samples per second." + }, + "number_of_channels": { + "type": "integer", + "minimum": 0, + "description": "Number of audio channels in the input." } } }; diff --git a/schemas/omgidl/foxglove/CompressedAudio.idl b/schemas/omgidl/foxglove/CompressedAudio.idl index c16a510..0ca8c1c 100644 --- a/schemas/omgidl/foxglove/CompressedAudio.idl +++ b/schemas/omgidl/foxglove/CompressedAudio.idl @@ -10,8 +10,6 @@ struct CompressedAudio { Time timestamp; // Compressed audio frame data. - // - // TK sequence data; // Audio format. @@ -23,6 +21,12 @@ struct CompressedAudio { // // Supported values: `key`, `delta`. string type; + + // Number of audio samples per second. + uint32 sample_rate; + + // Number of audio channels in the input. + uint32 number_of_channels; }; }; diff --git a/schemas/proto/foxglove/CompressedAudio.proto b/schemas/proto/foxglove/CompressedAudio.proto index 61c3f8b..4aa5f83 100644 --- a/schemas/proto/foxglove/CompressedAudio.proto +++ b/schemas/proto/foxglove/CompressedAudio.proto @@ -12,8 +12,6 @@ message CompressedAudio { google.protobuf.Timestamp timestamp = 1; // Compressed audio frame data. - // - // TK bytes data = 2; // Audio format. @@ -25,4 +23,10 @@ message CompressedAudio { // // Supported values: `key`, `delta`. string type = 4; + + // Number of audio samples per second. + fixed32 sample_rate = 5; + + // Number of audio channels in the input. + fixed32 number_of_channels = 6; } diff --git a/schemas/ros1/CompressedAudio.msg b/schemas/ros1/CompressedAudio.msg index f9cdfc0..3680dd2 100644 --- a/schemas/ros1/CompressedAudio.msg +++ b/schemas/ros1/CompressedAudio.msg @@ -7,8 +7,6 @@ time timestamp # Compressed audio frame data. -# -# TK uint8[] data # Audio format. @@ -20,3 +18,9 @@ string format # # Supported values: `key`, `delta`. string type + +# Number of audio samples per second. +uint32 sample_rate + +# Number of audio channels in the input. +uint32 number_of_channels diff --git a/schemas/ros2/CompressedAudio.msg b/schemas/ros2/CompressedAudio.msg index 31dc397..a03030f 100644 --- a/schemas/ros2/CompressedAudio.msg +++ b/schemas/ros2/CompressedAudio.msg @@ -7,8 +7,6 @@ builtin_interfaces/Time timestamp # Compressed audio frame data. -# -# TK uint8[] data # Audio format. @@ -20,3 +18,9 @@ string format # # Supported values: `key`, `delta`. string type + +# Number of audio samples per second. +uint32 sample_rate + +# Number of audio channels in the input. +uint32 number_of_channels diff --git a/schemas/typescript/CompressedAudio.ts b/schemas/typescript/CompressedAudio.ts index 4b29a2c..0d13260 100644 --- a/schemas/typescript/CompressedAudio.ts +++ b/schemas/typescript/CompressedAudio.ts @@ -8,11 +8,7 @@ export type CompressedAudio = { /** Timestamp of audio frame */ timestamp: Time; - /** - * Compressed audio frame data. - * - * TK - */ + /** Compressed audio frame data. */ data: Uint8Array; /** @@ -28,4 +24,10 @@ export type CompressedAudio = { * Supported values: `key`, `delta`. */ type: string; + + /** Number of audio samples per second. */ + sample_rate: number; + + /** Number of audio channels in the input. */ + number_of_channels: number; }; From fbb9ccfd8d31ac6c3aa18ce7b9959eb0be9bed7c Mon Sep 17 00:00:00 2001 From: fgwt202412 <191263616+fgwt202412@users.noreply.github.com> Date: Sun, 15 Dec 2024 16:53:27 -0500 Subject: [PATCH 4/4] GitHub workflows - match branches with / in the name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 183d253..6c776e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: [main] tags: ["releases/**"] pull_request: - branches: ["*"] + branches: ["**"] jobs: build: