named_entity_recognition message
The entities of a final, right after it (receive_realtime_processing_events).
Delivery
On the WebSocket with messages_config.receive_realtime_processing_events; to your callback as live.named_entity_recognition with callback_config.receive_realtime_processing_events.
Fields
-
session_idstring requiredIdentifier of the session.
-
created_atstring requiredWhen the message was sent (ISO 8601, UTC).
-
type"named_entity_recognition" required -
errorobjectdefault:
null1 fields
-
messagestring required
-
-
dataobject required3 fields
-
utterance_idstring required -
utteranceobject requiredA piece of speech between two pauses, on one channel.
11 fields
-
textstring requiredThe transcript. With named entity recognition or PII redaction on, it carries their inline elements (
<ner:name id="1">…</ner:name>,<pii:email id="1"/>). -
startnumber requiredStart, in seconds from the start of the audio.
-
endnumber requiredEnd, in seconds from the start of the audio.
-
languagestring requiredLanguage spoken (ISO 639-1).
-
confidencenumber requiredConfidence, from 0 to 1.
-
channelinteger requiredAudio channel the utterance was heard on, from 0.
-
speakerintegerSpeaker number, with
diarization.default:
null -
wordsarray of object requiredThe words with their timestamps.
5 fields
-
wordstring requiredThe word, with its leading space when it follows another.
-
startnumber requiredStart of the word, in seconds from the start of the audio.
-
endnumber requiredEnd of the word, in seconds from the start of the audio.
-
confidencenumber requiredConfidence, from 0 to 1.
-
speakerintegerSpeaker of the word, with
diarization.default:
null
-
-
text_rawstringThe transcript without inline elements (with named entity recognition; never with PII redaction).
default:
null -
entitiesarray of objectThe entities of the utterance, with named entity recognition or PII redaction.
default:
null7 fields
-
labelstringEntity type, for example
name,phone_number,location_city.default:
null -
idintegerThe entity's number in the session, per type: the same person is always the same number.
default:
null -
actionstringner: tagged; otherwise how the personal data was redacted.default:
null -
scorenumberConfidence, from 0 to 1.
default:
null -
textstringThe entity as heard (never sent for masked personal data unless
pii.return_entities).default:
null -
startintegerOffset of the entity's element in
text, in characters.default:
null -
endintegerEnd offset of the entity's element in
text, in characters.default:
null
-
-
forced"max_duration"Set when the utterance was closed by
maximum_duration_without_endpointingrather than by a pause.default:
null
-
-
resultsarray of object required8 fields
-
entity_typestring requiredThe entity's type, for example
name. -
textstring requiredThe entity as heard.
-
startnumber requiredStart, in seconds.
-
endnumber requiredEnd, in seconds.
-
idintegerThe entity's number in the session: the same person is always the same number.
default:
null -
scorenumberConfidence, from 0 to 1.
default:
null -
char_startintegerOffset of the entity's element in the final's
text.default:
null -
char_endintegerEnd offset of the entity's element in the final's
text.default:
null
-
-
Example
{ "session_id": "string", "created_at": "string", "type": "named_entity_recognition", "error": { "message": "string" }, "data": { "utterance_id": "string", "utterance": { "text": "Hello, how can I help you?", "start": 0.5, "end": 0.5, "language": "en", "confidence": 0.5, "channel": 0, "speaker": 0, "words": [ { "word": " hello", "start": 0.5, "end": 0.5, "confidence": 0.5, "speaker": 0 } ], "text_raw": "string", "entities": [ { "label": "string", "id": 0, "action": "string", "score": 0.5, "text": "string", "start": 0, "end": 0 } ], "forced": "max_duration" }, "results": [ { "entity_type": "string", "text": "string", "start": 0.5, "end": 0.5, "id": 0, "score": 0.5, "char_start": 0, "char_end": 0 } ] }}