Repository navigation
Add entity_redaction to the realtime speech-to-text wrapper - #912
Conversation
Adds the entity_redaction and entity_redaction_mode options to both realtime connection modes, sent as query params (entity_redaction repeated per entity, like entity_detection), and the RealtimeEvents.REDACTED_TRANSCRIPT event so the new redacted_transcript server message reaches subscribers.
PR SummaryLow Risk Overview Those options are forwarded as WebSocket query parameters and documented as mutually exclusive with Tests cover URL serialization (including a bare string for Reviewed by Cursor Bugbot for commit 0299024. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the realtime speech-to-text entity-redaction changes.
No open issues 🎉
What changed in this PR
Adds entity redaction support to the realtime speech-to-text wrapper, allowing callers to configure redaction and receive redacted transcripts separately from unredacted transcript events.
Changes:
- Adds typed redaction options and serializes them into WebSocket query parameters.
- Exposes the redaction mode type and
REDACTED_TRANSCRIPTevent. - Extends tests for option forwarding, serialization, and redacted event delivery.
| File | Description |
|---|---|
tests/test_stt_realtime.py |
Tests redaction parameters and event payload delivery. |
src/elevenlabs/realtime/scribe.py |
Defines, documents, and forwards redaction options. |
src/elevenlabs/realtime/connection.py |
Adds the redacted transcript event constant. |
src/elevenlabs/realtime/__init__.py |
Exports the redaction mode type. |
Review effort: Balanced
No description provided.