Skip to main content
PII/PHI Redaction transcribes audio and returns a version safe to retain: sensitive spans replaced in the text, and the corresponding ranges silenced in the audio. Redaction transcribes as part of its work, so the transcript comes back either way. A separate transcription call on the same audio is redundant. Each detected span is replaced with an empty marker tag, with the surrounding words preserved. <pii:CATEGORY></pii:CATEGORY> marks personal information, where CATEGORY identifies the entity type. <phi></phi> marks health information.

PII/PHI Redaction (batch)

Returns multipart/form-data, not JSON. Two parts: The metadata part: redaction_ranges reflects the final merged and padded ranges actually applied, not the raw detections, so a range can be wider than the words it covers.

Try it

Output
The last line comes from the Python example only. Both examples print the transcript, the speaker turns and the silenced ranges, but the redacted MP3 is a binary part: lifting it out intact needs a real MIME parser, so the curl example leaves the whole envelope in response.multipart and saves no audio. Decoding the multipart response in Python needs requests-toolbelt:

What you can configure

An invalid language is rejected with 400.

Audio formats

Accepted extensions: .aac, .aiff, .flac, .mov, .mp3, .mp4, .ogg, .opus, .wav, .webm. Maximum file size is 100 MB. Files above it are rejected with 413. Empty files are rejected with 400.

PII/PHI Redaction (streaming)

Redacted results arrive utterance by utterance while the call is still running. The stream interleaves JSON text frames and binary MP3 frames, and the pairing rule is the part a client has to get right. When redacted_audio is not null it carries start_ms and duration_ms describing the window the next binary frame covers. It is null for an out-of-order utterance whose audio was already emitted in a previous window, and in that case no binary frame follows. trailing_redacted_audio works the same way for audio after the final utterance. It is null when the last utterance already reached the end. The utterance object carries utterance_uuid, text, start_ms, duration_ms, speaker, and language.

Try it

Output
A stream ends with an empty text frame. A shell pipe sends binary frames only, so curl and websocat cannot close a stream cleanly. Use one of the clients above.

What you can configure

Neither redaction endpoint accepts custom_terms. language is the only vocabulary control.

Audio formats

Self-describing formats. wav, mp3, ogg, flac, webm, aac, aiff. These carry sample rate and channel count in the stream, so audio_format is optional and is auto-detected from the headers when omitted. sample_rate and num_channels must not be sent for these. Unlike the detection streaming endpoints, this one auto-detects containers. audio_format is only required for raw audio. Raw formats. s8, s16le, s16be, s24le, s24be, s32le, s32be, u8, u16le, u16be, u24le, u24be, u32le, u32be, f32le, f32be, f64le, f64be, mulaw, alaw. Headerless, so audio_format, sample_rate, and num_channels are all required. Omitting either of the latter two closes the connection with 1003. sample_rate accepts 8000, 11025, 16000, 22050, 32000, 44100, 48000, 96000. Common raw configurations: To convert a file to raw PCM:

API reference