Conversational Insights uses conversation data that you upload to a Cloud Storage bucket. You can provide your conversation data to the API as either audio or text files.
Conversation transcript data
Your text files include the following details.
Conversation
The top-level object for conversation data.
Field | Type | Description |
---|---|---|
conversation_info | ConversationInfo { } | Optional. Metadata for the conversation. |
entries | Entry [ ] | Required. The chronologically ordered conversation messages. |
ConversationInfo
The metadata for a conversation.
Field | Type | Description |
---|---|---|
categories | Category [ ] | Optional. Custom categories for the conversation data. |
Category
Conversation data category. If you provide categories with your conversation data, they will be used to identify topics in your conversations. If you don't provide categories, the system will automatically categorize conversations based on the content.
Field | Type | Description |
---|---|---|
display_name | string | Required. A display name for the category. |
Entry
Data for a single conversation message.
Field | Type | Description |
---|---|---|
text | string | Required. The text for this conversation message. |
user_id | integer | Required. A number that identifies the conversation participant. Each participant should have a single user_id , used repeatedly if they participate in multiple conversations. |
role | string | Required. The conversation participant role. One of: "AGENT", "AUTOMATED_AGENT", "CUSTOMER", "END_USER". |
start_timestamp_usec | integer | Required. The timestamp for the start of this conversation turn in microseconds of UTC time since Unix epoch. |
Example
The following shows an example of a conversation data file.
{ "conversation_info":{ "categories":[ { "display_name":"Category 1" } ] }, "entries": [ { "start_timestamp_usec": 1000000, "text": "Hello, I'm calling in regards to ...", "role": "CUSTOMER", "user_id": 1 }, { "start_timestamp_usec": 5000000, "text": "Yes, I can answer your question ...", "role": "AGENT", "user_id": 2 } ] }