RealtimeSTT
RealtimeSTT copied to clipboard
in case client send corrupt data
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
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.
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