Amazon Transcribe and Comprehend – great solution for cloud based call center operations

Use Amazon Transcribe and Comprehend services to convert audio conversations into text and detect customer sentiment, resulting text and sentiment ( positive, negative or neutral) can be saved to choice of your database , in this example I am saving the results to DynamoDB

Requirements for Amazon Transcribe and Comprehend

  • Listens to S3 bucket put events
  • Converts the audio file into text using transcribe service
  • Detects the sentiment from the text using comprehend service
  • Sends email using SNS service
  • Save results to a DynamoDB table
Amazon Comprehend and Transcribe


Complete implementation of Amazon Transcribe and Comprehend Lambda source code at Github

Imaging that you have a use case like Amazon Connect ( Call center operations in amazon cloud) which is producing audio files and saving them in S3 bucket, these audio files contain conversations between your call center rep and customers and you wanted to find if the conservation is positive , neutral or negative and create a report of out of this data. you can run this process at real time or as a batch operation. transcribe takes couple of minutes to convert audio files based on the size however comprehend service is pretty quick .

This solution is meant for real time usage but it can be used as a bath mode as well with a cloud watch schedules instead of a S3 put event listener triggering the Lambda.

Lambda code is written in Python and very easy to follow and all you need to implement this solution is few samples of mp3 audio files and permissions on following AWS Services

S3 bucket,
Lambda,
Transcribe,
Comprehend and
SNS ( optional if you want to email the conversation if customer sentiment is negative)

To enable S3 event trigger on lambda, to to Lambda console, select Add Trigger, Select S3 from the dropdown and complete the rest of the form with S3 bucket details.

Start copying the MP3 files into your bucket and watch Lambda logs from Cloud watch for the print statements to find the transcribe text and comprehend sentiment results.

Possible results from Comprehend are “Positive”, “Negative” or “Neutral”

Let me know your thoughts.

Refer to this article on setting up Amazon managed Directory Service with complete Terraform code.

0

Leave a Reply

Your email address will not be published. Required fields are marked *