Classifies ambient audio into indoor/outdoor/traffic/park at 1 Hz using a 16-d feature vector (13 MFCC + spectral centroid + rolloff + ZCR) with a normalised nearest-centroid classifier. Centroids are computed at import time from seeded synthetic prototypes, ensuring deterministic behaviour. Changes ------- - saltybot_scene_msgs/msg/AudioScene.msg — label + confidence + features[16] - saltybot_scene_msgs/CMakeLists.txt — register AudioScene.msg - _audio_scene.py — pure-numpy feature extraction + NearestCentroidClassifier - audio_scene_node.py — subscribes /audio/audio, publishes /saltybot/audio_scene - test/test_audio_scene.py — 53 tests (all passing) with synthetic audio - setup.py — add audio_scene entry point Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 lines
249 B
Plaintext
5 lines
249 B
Plaintext
std_msgs/Header header
|
||
string label # 'indoor' | 'outdoor' | 'traffic' | 'park'
|
||
float32 confidence # 0.0–1.0 (nearest-centroid inverted distance)
|
||
float32[16] features # raw feature vector: MFCC[0..12] + centroid_hz + rolloff_hz + zcr
|