PII Redaction
Overview
Streaming PII Redaction lets you automatically detect and remove personally identifiable information from your streaming transcripts in real time. When enabled, the API redacts PII in final turns only before sending them to the client.
PII redaction supports all streaming models: u3-rt-pro, universal-streaming-english, and universal-streaming-multilingual.
Final turns only
PII redaction only applies to final turns. When redact_pii is true,
include_partial_turns defaults to false automatically so no unredacted
text reaches the client. Only set include_partial_turns to true if you
explicitly want partial (non-final) turns, which will contain unredacted PII
alongside the redacted final turns.
When you enable PII redaction, your final turns will look like this:
- With
hashsubstitution:Hi, my name is ####! - With
entity_namesubstitution:Hi, my name is [PERSON_NAME]!
Pre-recorded PII redaction
For PII redaction on pre-recorded audio, including redacted audio file generation, see PII Redaction.
Connection parameters
Quickstart
Get started with streaming PII redaction using the code below. This example streams audio from your microphone and prints each turn with PII redacted.
Python
Python SDK
JavaScript
Example output
With entity_name substitution:
With hash substitution:
Supported PII policies
Streaming PII redaction supports the same policies as pre-recorded PII redaction, including person_name, phone_number, email_address, credit_card_number, us_social_security_number, date_of_birth, and more.
For the full list of available policies, see PII policies.
Troubleshooting
Why am I still seeing PII in the transcript?
PII redaction only applies to final turns. If you’re seeing PII, you
likely set include_partial_turns to true, which returns unredacted
partial turns alongside redacted finals. Remove that override (or set it to
false) to only receive redacted final turns — this is the default when
redact_pii is enabled.
Can I redact PII from the audio itself?
Audio redaction is not available for streaming. To generate a redacted audio
file, use pre-recorded PII redaction
with the redact_pii_audio parameter.