Skip to content

Determining Intent(s) and the Customer Uttered Value from a Live Conversation using Lex that I intend to pass to an API in the backend. I am not using Agent Workspace or Q in Connect Widget.

0

Scenario: Determine the Intent or Intents during the live conversation, in real time, pass that intent as it is recognized to an API. Along with the intent, I need to pass the value or the text that the customer spoke that resulted in the determination of that intent. There is no knowledge base. Something like this:

  1. Customer Connects to an Agent
  2. Using Kinesis Data Stream Event, I can invoke a Lambda function.
  3. This Lambda function then starts to stream the Kinesis Audio Stream --> I need it in a format that I can pass audio to Lex.
  4. Lambda invokes the Lex Bot and passes the audio fragment.
  5. Lex determines the Intent and Text Value.
  6. Pass the Intent and Text Value to an API downstream.

I read a lot of material that Contact Lens provides real time analytics, sentiment and transcription; Q in Connect provides recommendations and suggestions but NONE of the solutions seem simple enough where I can have something as simple as Lex "listen in" to the live conversation.

Even if I can trigger a conference to another Contact Flow which can invoke the Lex that can invoke the Bedrock Agent Intent to continuously listen in and provide the intents and recognized text utterance - will be helpful.

asked a year ago119 views

1 Answer
0

Based on your scenario, you're looking to extract intents and customer utterances in real-time from a live conversation. There are a few approaches to consider, but none are as straightforward as having Lex "listen in" continuously to an ongoing conversation.

For real-time voice processing from Amazon Connect calls, you have these main options:

  1. Contact Lens real-time streaming: This provides transcription and sentiment analysis in near real-time, but doesn't directly integrate with Lex for intent recognition.

  2. Kinesis Video Streams with Amazon Connect: This allows you to stream raw audio, but you'd need additional processing to make it compatible with Lex, as Lambda by itself cannot directly capture or stream real-time audio.

  3. Amazon Connect External Voice Transfer: This feature allows Connect to SIP conference the call with your bot, so your bot handles the media while Connect maintains call control. This might be suitable for high call volume scenarios.

  4. GetCustomerInput block with Amazon Lex: This is the most established approach. When using Lex with Connect through the GetCustomerInput block, you can extract the intent and customer utterance in a Lambda function:

  • When Lex recognizes an intent, it passes the information to your Lambda function
  • You can extract the intent name from the interpretations array in the Lex response
  • The customer's utterance that triggered the intent recognition would be available in the input event

If you're set on processing the entire conversation in real-time, you would need to:

  1. Use Kinesis Video Streams to capture the audio
  2. Process that with Amazon Transcribe Streaming to convert speech to text
  3. Send the transcribed text to Lex for intent recognition
  4. Extract the intent and original utterance
  5. Forward this to your downstream API

However, this approach adds complexity and potential latency issues.

The most practical solution would be to use the GetCustomerInput block with Lex and have your Lambda function extract both the recognized intent and the customer's utterance from the Lex response, then send that to your downstream API.
Sources
Drive insights of customer’s self-service IVR journey with Amazon Connect and personalized dashboards | AWS Contact Center
Community | Build A Translator App in 30 Min or Less
Is it possible to get real-time voice from a call with just a lambda? | AWS re:Post
Exercise 2: Review the conversation flow - Amazon Lex

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.