PlexichatGuides

Acoustic Eavesdropping Defense

Guides, route-group overviews, and live schema entry points for the Plexichat backend.

Acoustic eavesdropping defense

Plexichat can reduce the risk of AI-based acoustic eavesdropping attacks that try to infer what you type from keyboard sounds captured during voice calls.

This feature is based on the paper Self-Supervised Acoustic Eavesdropping Attacks on Keyboards (July 2026), which showed that a general Transformer model can map an unfamiliar keyboard in 100–150 keystrokes and achieve over 99% transcription accuracy when it receives clean keystroke audio.

How the defense works

Plexichat provides four server-side audio processing defenses in the SFU adapter. They run in the AudioProcessingTrack pipeline (src/core/voice/signaling/sfu/acoustic_defense.py), before packets are forwarded to other participants. You do not need to install client-side software.

1. Jitter injection

What it does: Adds a randomized delay of 5–20 ms to each audio frame. The implementation applies a bounded in-frame shift padded with silence so the frame duration stays constant (src/core/voice/signaling/sfu/acoustic_defense.py).

Why it helps: Transformer models depend on precise timing and continuity to segment keystrokes. Random jitter breaks that continuity.

Effect on calls: Not perceptible in normal conversation.

2. Spectral masking

What it does: When no speech is detected, mixes low-amplitude, band-limited white noise in the 1–8 kHz band into the frame. Noise is generated by filtering white noise in the frequency domain (FFT), normalizing, and applying a fade envelope to avoid clicks (src/core/voice/signaling/sfu/acoustic_defense.py). The default level is −40 dB (spectral_mask_noise_db).

Why it helps: Keyboard clicks contain sharp high-frequency transients. Filling the 1–8 kHz band with comfort noise masks the differences between key types.

Effect on calls: You may hear a faint shhh during silence, similar to standard VoIP comfort noise.

3. VAD gating

What it does: Estimates speech presence using RMS energy (src/core/voice/signaling/sfu/acoustic_defense.py). If the RMS of a frame is below vad_speech_threshold (default 0.02), the frame is treated as non-speech. After vad_silence_frames consecutive non-speech frames (default 3), the server forwards a silent frame ([0.0] * len(samples)) instead of the original audio (src/core/voice/signaling/sfu/acoustic_defense.py). The track is not closed; a silent frame is emitted to keep the stream alive.

Why it helps: Keyboard impulses have low, brief energy compared to continuous speech. Suppressing extended silence prevents an attacker from collecting isolated clicks.

Effect on calls: If a participant types heavily without speaking, you may notice brief gaps.

This is an energy-based gate, not a spectral-envelope or harmonic detector.

4. Transient shaving

What it does: Applies a fast-attack, fast-release compressor to the audio. The default attack is 0.5 ms and release is 5 ms with a ratio of 0.3 (AcousticDefenseConfig in src/core/voice/signaling/sfu/acoustic_defense.py). An envelope follower tracks the signal and reduces gain for sharp peaks.

Why it helps: Keyboard sounds have a sharp attack transient that classifiers use as a primary feature. Compressing those peaks makes them less distinct.

Effect on calls: Slightly reduces audio sharpness, similar to light podcast compression. Speech remains intelligible.

All per-sample processing is vectorized with NumPy to keep real-time performance at 48 kHz.

Turn on acoustic defense

In the app

  1. Go to Settings > Voice.
  2. Under Audio Processing, turn on Acoustic Eavesdropping Defense.

On the server

Set the option in config.yaml:

voice:
  acoustic_defense:
    enabled: true
    jitter_ms_min: 5
    jitter_ms_max: 20
    spectral_masking: true
    vad_gating: true
    transient_shaving: true

You can tune each defense individually. See the defaults in src/core/voice/signaling/sfu/acoustic_defense.py and src/config_defaults.py.

Limitations

  • The defenses run only on the server's SFU adapter. The strongest protection is available when voice.sfu_backend is aiortc (in-process SFU).
  • External SFU backends such as mediasoup or Janus have limited audio processing support.
  • Effectiveness varies with microphone quality and background noise.