Pub/Sub intermediate transcription

An intermediate transcript is an interim result of speech recognition from the Cloud Speech-to-Text API . The intermediate transcript can change upon further analysis of the audio. Configure intermediate transcription delivery with a Cloud Pub/Sub topic or use gRPC for CCAI transcription delivery.

You can configure delivery of the final result of speech recognition with ConversationProfile.newMessageEventNotificationConfig or with gRPC responses.

Create or update your conversation profile

Follow these steps when you create or update a conversation profile. Agent Assist does not redact intermediate transcripts.

Console

  1. Within the Agent Assist console, click Conversation profiles.
  2. Click the name of a profile or + Create.
  3. Navigate to Pub/Sub notifications, and select Transcription intermediate result notifications.
  4. Enter the Pub/Sub topic you created for receiving intermediate transcripts, and select your message format.
  5. Click Save.

REST

  1. Configure a Pub/Sub topic for receiving intermediate transcriptions with ConversationProfile.newRecognitionResultNotificationConfig .

Example Configuration:

 { 
 "name" 
:  
 "projects/PROJECT_ID/locations/global/conversationProfiles/CONVERSATION_PROFILE_ID" 
, "displayName" 
:  
 "CONVERSATION_PROFILE_NAME" 
, "automatedAgentConfig" 
:  
 { 
 } 
, "humanAgentAssistantConfig" 
:  
 { 
  
 "notificationConfig" 
:  
 { 
  
 "topic" 
:  
 "projects/PROJECT_ID/topics/FEATURE_SUGGESTION_TOPIC_ID" 
,  
 "messageFormat" 
:  
 "JSON" 
  
 } 
,  
 "humanAgentSuggestionConfig" 
:  
 { 
  
 "featureConfigs" 
:  
 [{ 
  
 "enableEventBasedSuggestion" 
:  
true,  
 "suggestionFeature" 
:  
 { 
  
 "type" 
:  
 "ARTICLE_SUGGESTION" 
  
 } 
,  
 "conversationModelConfig" 
:  
 { 
  
 } 
  
 }] 
  
 } 
,  
 "messageAnalysisConfig" 
:  
 { 
  
 } 
 } 
, "notificationConfig" 
:  
 { 
  
 "topic" 
:  
 "projects/PROJECT_ID/topics/CONVERSARION_LIFECYCLE_TOPIC_ID" 
,  
 "messageFormat" 
:  
 "JSON" 
 } 
, "newMessageEventNotificationConfig" 
:  
 { 
  
 "topic" 
:  
 "projects/PROJECT_ID/topics/NEW_MESSAGE_TOPIC_ID" 
,  
 "messageFormat" 
:  
 "JSON" 
 } 
, "newRecognitionResultNotificationConfig" 
:  
 { 
  
 "topic" 
:  
 "projects/PROJECT_ID/topics/INTERMEDIATE_TRANSCRIPT_TOPIC_ID" 
,  
 "messageFormat" 
:  
 "JSON" 
 } 
, "languageCode" 
:  
 "en-US" 
 } 

Optional: Enable message ordering

Conversation ID is the ordering key for published Pub/Sub transcript messages. To receive the messages in order, set the message ordering property on the subscription you receive messages from.

Optional: Fetch more information

Dialogflow appends conversation IDs, message IDs, participant IDs, and participant roles to the Pub/Sub messages as attributes. You can access these attributes with PubsubMessage.attributes or you can fetch them together with the following Pub/Sub message data by subscribing with custom attributes .

  • The attribute key of participant ids: participant_id
  • The attribute key of message ids: message_id
  • The attribute key of conversation ids: conversation_id
  • The attribute key of participant roles: participant_role

The following is an example of a set of attributes: { "conversation_id": "c_id" , "participant_id": "p_id" }

Optional: Subscription configurations

Follow these guidelines to customize your Pub/Sub subscription for handling transcript delivery:

Create a Mobile Website
View Site in Mobile | Classic
Share by: