Entity detection
Smart formatting converts spoken values into their written form by default. Entity detection additionally exposes the structure behind each conversion: which class of entity was detected, and the individual words it was made from as spoken and as written.
Availability
Entity detection is available with the Standard and Enhanced models for pre-recorded and streaming transcription, and with Linden 1 for agent STT. See Feature availability.
Entity metadata appears in JSON output only. SRT and TXT output are unchanged.
Enable entity detection
Add enable_entities to your configuration:
{
"type": "transcription",
"transcription_config": {
"model": "enhanced",
"language": "en",
"enable_entities": true
}
}
By default, enable_entities is false. When it is false, the words appear individually in the output.
Entity output
With enable_entities set to true, the JSON output includes:
- A
typefield with the valueentityfor formatted numeric entities - The full written form in the
contentsection, including any spaces or symbols - An
entity_classfield describing how the entity was formatted - Start and end times spanning all words in the entity
- Two additional representations:
spoken_form, the original words as spoken with individual timing and confidence, andwritten_form, the formatted words separated individually
This is a transcript with enable_entities set to true:
{
"results": [
{
"alternatives": [
{
"confidence": 0.99,
"content": "17th of January 2022",
"language": "en",
"speaker": "UU"
}
],
"end_time": 3.14,
"entity_class": "date",
"spoken_form": [
{
"alternatives": [
{
"confidence": 1.0,
"content": "seventeenth",
"language": "en",
"speaker": "UU"
}
],
"end_time": 1.41,
"start_time": 0.72,
"type": "word"
}
// Additional spoken words omitted for brevity
],
"start_time": 0.72,
"type": "entity",
"written_form": [
{
"alternatives": [
{
"confidence": 0.99,
"content": "17th",
"language": "en",
"speaker": "UU"
}
],
"end_time": 1.33,
"start_time": 0.72,
"type": "word"
}
// Additional written words omitted for brevity
]
}
]
}
Entity classes
Formatting rules are applied based on the class of entity detected.
Numbers and quantities:
Dates, identifiers, and contact details:
Entity classes are chosen based on context, so occasionally a value might be classified differently than expected. For example, "2001" could be a cardinal number or a date.