Skip to content

Component system - #56

Open
john- wants to merge 7 commits into
masterfrom
component-system-pr
Open

Component system#56
john- wants to merge 7 commits into
masterfrom
component-system-pr

Conversation

@john-

@john- john- commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Title

feat: introduce modular component architecture, event dispatching, and Silero VAD

Summary

This PR refactors ham2mon's audio processing pipeline into an extensible, decoupled Component Architecture (WavGatekeeper for audio evaluation and TransmissionNotifier for event listeners), centralizes WAV recording persistence within Scanner, and adds Silero VAD voice detection.


Key Changes

  • Extensible Component Architecture (apps/components/):

    • BaseComponent: Foundation for components with strict lifecycles (start, stop, error recovery).
    • ComponentManager: Orchestrates worker pools, isolates timeouts, and prevents single-component crashes from hanging the scanner loop.
    • Built-in WavGatekeeper components:
      • TfliteClassifierComponent: Refactored existing TFLite/LiteRT model runner into an isolated component process.
      • SileroVadComponent: Added lightweight ONNX-based Silero Voice Activity Detection (~16MB runtime dependency).
    • Built-in TransmissionNotifier components:
      • ActivityLoggerComponent: Dispatches kept transmission records to active channel activity loggers.
  • Audio Recording Lifecycle Centralization:

    • Moved WAV file retention, metadata formatting, and sidecar JSON generation from demodulators/receiver directly into Scanner._process_completed_transmission().
    • Introduced immutable @dataclass(frozen=True) TransmissionRecord for cross-boundary payload safety.
  • Configuration Alignment & Docs:

    • Added structured components: domain block parsing to MasterHam2MonConfig and CLI options.
    • Added user documentation (doc/components/available_components.md) and updated README.md and doc/minimal.config.yaml.
    • Added test coverage for component lifecycle, gatekeeper evaluations, and notifier dispatches.

@john-
john- force-pushed the component-system-pr branch from c341bd6 to ccaae9a Compare August 1, 2026 21:43
@john-
john- force-pushed the component-system-pr branch from ccaae9a to 23015cb Compare August 2, 2026 15:02
@john-
john- force-pushed the component-system-pr branch from 23015cb to 8c61a70 Compare August 9, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant