RealtimeSTT icon indicating copy to clipboard operation
RealtimeSTT copied to clipboard

in case client send corrupt data

Open kunci115 opened this issue 8 months ago • 2 comments

feat: Add comprehensive data integrity verification system with client rejection

  • Implement checksum-based verification for WebSocket audio transmission
  • Add server-side rejection policies for corrupted data clients
  • Create configurable corruption thresholds (0=strict, N=tolerant)
  • Add per-client corruption tracking with automatic cleanup

Server Features:

  • New CLI flags: --verify-data-integrity, --reject-corrupted-data, --corruption-threshold
  • Real-time verification of audio length and checksum
  • Structured rejection messages sent to clients before disconnection
  • Extended logging support for verification results

kunci115 avatar Aug 21 '25 18:08 kunci115

That's a great PR. I think probably it needs some changes to stt_cli_client.py in RealtimeSTT_server folder and then maybe to audio_input.py and audio_recorder_client.py in RealtimeSTT folder to adapt to this new chunk verification logic. Since I'm doing some refacturing currently too I think I'll merge it later and then add the needed changes.

KoljaB avatar Aug 23 '25 18:08 KoljaB

I'll help in case I'm free on weekend if you haven't finished it, I also forgot to push the other test that I wrote

kunci115 avatar Aug 26 '25 13:08 kunci115