- Newest
- Most votes
- Most comments
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:
-
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.
-
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.
-
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.
-
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:
- Use Kinesis Video Streams to capture the audio
- Process that with Amazon Transcribe Streaming to convert speech to text
- Send the transcribed text to Lex for intent recognition
- Extract the intent and original utterance
- 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
