volume_adjust_node:
  ros__parameters:
    energy_topic: "/social/speech/energy"    # Linear RMS [0..1] from vad_node
    volume_topic: "/saltybot/tts_volume"     # TTS volume output [0..1]

    # Volume range
    min_volume: 0.5      # Quietest TTS volume (silent environment)
    max_volume: 1.0      # Loudest TTS volume (very noisy environment)

    # Noise mapping window
    noise_floor: 0.001   # Energy ≤ this → maps to min_volume (near-silence)
    noise_ceil: 0.10     # Energy ≥ this → maps to max_volume (loud crowd)

    # Response curve
    # gamma < 1 → concave  (aggressive at low noise, gentle at top)
    # gamma = 1 → linear
    # gamma > 1 → convex   (gentle at low noise, aggressive at top)
    curve_gamma: 0.5

    # Smoothing (EMA)
    smoothing_alpha: 0.1   # 0 = frozen, 1 = instant; 0.1 ≈ ~10-sample lag

    # Timing
    publish_rate: 5.0       # Hz — how often volume command is published
    stale_timeout_s: 5.0    # If no energy received for this long, hold last value
