Conversation Events

Every conversation event type has the following properties:

Property Type Description
Required Properties
conversation_id string ID of the conversation associated with the conference.
event_type string The type of Conversation Event stored in the event field
Optional Properties
conference_name string If the conversation was the result of a conference, the name of the conference. Otherwise, not present.

Conversation Ended Event

Sent when a conversation ends. For conference calls, this is as soon as the last person disconnects from the conference. For direct calls, this is when either party hangs up.

Event type:ended
Property Type Description
start_time string Start date and time of the conversation, as an ISO 8601 string.
end_time string End date and time of the conversation, as an ISO 8601 string.
status string Status of the conversation. One of the Conversation status strings

Example

{
    "conversation_id": "5d3dc73fc8cf34be",
    "event_type": "ended",
    "start_time": 2016-05-06T19:22:22Z,
    "end_time": 2016-05-06T19:45:21Z,
    "status": "processing"
}

Transcript Event

Sent when a segment of audio is transcribed.

Event type:transcript
Event structure:
 
Property Type Description
timestamp_ms integer The start time of the segment, in milliseconds since the epoch.
duration_ms integer Duration of the segment, in milliseconds.
connection_id string The ID of the connection within the conversation that was speaking.
transcript string Machine-generated transcript of the segment, as text.
emotion dict If live_emotion was enabled for the conversation, contains a map from the emotion model name to its produced values. Currently, the only emotion model available is sem_v0.
emotion.sem_v0 list[float] A list containing three float values representing the amount of negative, neutral, and positive content in the utterance, respectively.

Example

{
    "conversation_id": "5d3dc73fc8cf34be",
    "conference_name": "party-room",
    "event_type": "transcript",
    "transcript": "yes i would love to subscribe to some magazines",
    "connection_id": "3143d63913ff344c",
    "timestamp_ms": 1462514977421,
    "duration_ms": 10430,
    "emotion": {
        "sem_v0": [0.01, 0.02, 0.3]
    }
}

Scan Event

Sent when one of the live_scan queries matched something spoken by a person in the conversation.

Event type:scan
Event structure:
 
Property Type Description
scan list List of triggered scan results.
scan[].key string The user-defined key string for this scan. Use this to more easily match results to their original query.
scan[].match string The phrase that matched the query.
scan[].extractions dictionary Dictionary mapping the names of extractors in the query (values inside curly braces) to the extracted entities.
scan[].segment_index integer Index of the segment in the transcript that matched the query.
scan[].query string The original scanner query string
scan[].start_word integer The index of the first word in the match region
scan[].end_word integer The index of the last word in the match region
scan[].weight number The strength of the match. For scans with tilde operators, the bigger this number, the closer the detected phrase was to the example phrase.
scan[].segment_highlighted string The transcript segment, with the matching region highlighted with <b> tags.
scan[].pretty_highlighted string The punctuated transcript segment, with the matching region highlighted with <b> tags.
scan[].start_ms integer Milliseconds from the start of the segment until start of the match region.
scan[].end_ms integer Milliseconds from the start of the segment until end of the match region.
scan[].pretty_start_char integer Offset of the first character in the match, relative to the punctuated transcript.
scan[].pretty_end_char integer Offset of the last character in the match, relative to the punctuated transcript.
scan[].start_char integer Offset of the first character in the match, relative to the raw transcript.
scan[].end_char integer Offset of the last character in the match, relative to the raw transcript.

Example

{
    "conversation_id": "5d3dc73fc8cf34be",
    "conference_name": "party-room",
    "event_type": "talk-time",
    "scan": [
        {
            "segment_index": 0,
            "start_word": 0,
            "end_word": 5,
            "weight": 0.6277915227929646,
            "segment_highlighted": "<b>hello my name is benjamin</b>",
            "pretty_highlighted": "<b>Hello, My name is Benjamin</b>.",
            "start_ms": 3322,
            "end_ms": 4912,
            "pretty_start_char": 0,
            "pretty_end_char": 26,
            "start_char": 0,
            "end_char": 25,
            "extractions": {
                "0": {
                    "name": "name",
                    "value": "benjamin"
                }
            },
            "key": "greeting",
            "query": "~~\"hello my name is\" then ~~\"{name}\"",
            "match": "hello my name is ... benjamin"
        }
    ]
}

Talk Time Event

Sent repeatedly during a conversation when the amount of time spent speaking changes.

Event type:talk-time
Event structure:
 
Property Type Description
talk_times dictionary The time that each connection has spent talking. The keys are ids of connections participanting in the conversation, as strings. Each key references an integer representing the number of milliseconds that the connection has spent speaking in the conversation.

Example

{
    "conversation_id": "5d3dc73fc8cf34be",
    "conference_name": "party-room",
    "event_type": "talk-time",
    "talk_times": {
        "3143d63913ff344c": 5128,
        "6cc621614fc279b0": 90282
    }
}

Topic Event

Sent when new conversation topics are detected.

Event type:topics
Event structure:
 
Property Type Description
topics list[string] List of the most recent topics of the conversation.

Example

{
    "conversation_id": "5d3dc73fc8cf34be",
    "event_type": "topics",
    "topics": ["vacation", "grand canyon", "weather"]
}

Done Processing Event

Sent when all Conversation Processors bound to a conversation have finished.

Event name:done-processing
Event structure:
 
Property Type Description
conversation object Conversation object.