Entity detection
How-to guide · Assumes you have completed the Speech to Text quickstart.
Overview
Entity detection comes at an additional cost. See the API pricing page for detailed pricing information.
Entity detection is a feature that allows you to detect specific words and phrases in the transcript, providing their exact timestamps. This is useful to detect credit card numbers, names, medical conditions or SSNs which can then be redacted.
When enabled, the model will detect specific entity types in the transcript and provide their exact timestamps.
For example, the following audio:
Outputs the following transcript when we specify "pii" (Personally Identifiable Information) as the entity type:
The result shows the PII entities detected in the transcript, with their exact timestamps.
Integrating entity detection
Entity detection is integrated into the Speech to Text API by passing the entity_detection parameter to the convert method.
Entity types
The following entity types are supported for detection. You can detect entire groups using the category keywords pii, phi, pci, other, or offensive_language, or specify individual entity types by their label. To detect all entity types, use the all category.
PII (Personally Identifiable Information)
PHI (Protected Health Information)
PCI (Payment Card Industry)
Other entities
Offensive language
Entity redaction
In addition to detecting entities, you can redact them from the transcript text with the
entity_redaction parameter. It accepts the same format as entity_detection: all, a
category keyword, or a list of specific entity types. The redacted types must be a subset of
the detected types.
When redaction is enabled, matched entity text is replaced with a marker in both the
transcript text and the word-level output, and the entities field is not returned in the
response.
The entity_redaction_mode parameter controls the marker format:
Entity detection and redaction are not supported with the combined multichannel output style.