ambient_sound_node:
  ros__parameters:
    sample_rate: 16000              # Expected PCM sample rate (Hz)
    window_s: 1.0                   # Accumulate this many seconds before classifying
    n_fft: 512                      # FFT size (32 ms frame at 16 kHz)
    n_mels: 32                      # Mel filterbank bands
    audio_topic: "/social/speech/audio_raw"  # Source PCM-16 UInt8MultiArray topic

    # ── Classifier thresholds ──────────────────────────────────────────────
    # Adjust to tune sensitivity for your deployment environment.
    silence_db: -40.0               # Below this energy (dBFS) → silence
    alarm_db_min: -25.0             # Min energy for alarm detection
    alarm_zcr_min: 0.12             # Min ZCR for alarm (intermittent high pitch)
    alarm_high_ratio_min: 0.35      # Min high-band energy fraction for alarm
    speech_zcr_min: 0.02            # Min ZCR for speech (voiced onset)
    speech_zcr_max: 0.25            # Max ZCR for speech
    speech_flatness_max: 0.35       # Max spectral flatness for speech (tonal)
    music_zcr_max: 0.08             # Max ZCR for music (harmonic / tonal)
    music_flatness_max: 0.25        # Max spectral flatness for music
    crowd_zcr_min: 0.10             # Min ZCR for crowd noise
    crowd_flatness_min: 0.35        # Min spectral flatness for crowd
