Giter Site home page Giter Site logo

amazon-connect / amazon-connect-realtime-transcription Goto Github PK

View Code? Open in Web Editor NEW
162.0 28.0 98.0 83.46 MB

Transcribe Live Customer Audio for Amazon Connect using Amazon Kinesis Video Streams and Amazon Transcribe

License: MIT No Attribution

Java 80.45% JavaScript 16.57% Python 2.98%

amazon-connect-realtime-transcription's Introduction

Amazon Connect IVR Recording

Making it easy to get started with Amazon Connect live audio streaming and real-time transcription using Amazon Transcribe.

On this Page

Project Overview

The purpose of this project is to provide an example solution to get you started with capturing and transcribing Amazon Connect audio using Kinesis Video Streams and Amazon Transcribe. The example Lambda functions can be used to create varying solutions such as capturing audio in the IVR and transcribing customer audio. To enable these different use-cases there are multiple environment variables environment variables and parameters in the invocation event that control the behavior of the Lambda Function.

Architecture Overview

Description

This solution can be configured to use the following services: Amazon Connect, Amazon Kinesis Video Streams, Amazon Transcribe, Amazon DynamoDB, AWS Lambda, and Amazon S3.

With Amazon Connect, customer audio can be live streamed to Kinesis Video Streams as described in this Amazon Connect documentation. This project serves as an example of how to consume an Amazon Connect live audio stream, capture the audio from each channel of the Connect audio stream, send it to S3, and combine the audio into a single file, as well as perform real-time transcription using Amazon Transcribe and posting those transcriptions to a DynamoDB table.

In the diagram above, once a call is connected to Amazon Connect:

  • (Step 1) In the Amazon Connect Contact Flow, ensure there is a "Start Media Streaming" block. Based on the block settings you can stream audio from the customer, to the customer, or both.
    • (Step 1a) Once the "Start Media Streaming" block is executed, a KVS stream will be "assigned" and Amazon Connect will begin to stream the customer audio
    • Amazon Connect will continue to stream the customer audio for the duration of this call until a "Stop media streaming" block is executed, or the call is disconnected
  • (Step 2) In the Amazon Connect Contact Flow invoke the Trigger Lambda Function which will automatically be passed the KVS details and the ContactId
    • tip: Set these Contact Attributes prior to invoking the trigger lambda function:
      • key: transcribeCall, value: true or false
      • key: saveCallRecording, value: true or false
      • key: languageCode, value: en-US or es-US
      • key: streamAudioFromCustomer, value true or false
      • key: streamAudioToCustomer, value true or false
  • (Step 3) Amazon Connect Contact Flow invokes the kvsConsumerTrigger function with all the Contact Attributes set in the previous step.
  • (Step 4) The kvsConsumerTrigger function will write the ContactID, CustomerPhoneNumber, Date, and Time to the DynamoDB table ContactDetails
  • (Step 5) The kvsConsumerTrigger invokes the kvsTranscriber function passing it all the attributes needed to start consuming the Kinesis Video Stream (call audio). The Contact Flow will continue to execute while the kvsTranscriber Lambda function processes the audio stream. The function will process audio for up to 15 minutes (Lambda limit) or until the call is disconnected.
  • (Step 6) The kvsTranscriber function will send the audio to Amazon Transcribe to transcribe the audio from speech to text. The Kinesis Video Stream has two channels one for Audio to Customer and one for Audio from Customer. Each audio channel is transcribed separately.
  • (Step 7) The kvsTranscriber function will write the transcribed text to two different DynamoDB tables one for audio from customer, transcriptSegments, and one for audio to customer, transcriptSegmentsToCustomer.
  • (Step 8) The kvsTranscriber function writes two audio files AUDIO_FROM_CUSTOMER.wav and AUDIO_TO_CUSTOMER.wav to the designated S3 bucket in the CloudFormation template with ContactID, date and time prepended to the filenames.
  • (Step 9) The S3 bucket has a trigger that looks for files to be written with a .wav extension and invokes the Lambda processContactSummary
  • (Step 10) The processContactSummary queries the contactTranscriptSegments tables to retrieve the transcript.
  • (Step 11) The processContactSummary then updates the contactDetails table with the Contacts Transcripts using the ContactID as the Key.
  • (Step 12) The processContactSummary invokes the overlay-audio Lambda that takes the two audio file names, FROM_CUSTOMER and TO_CUSTOMER, and combines them.
  • (Step 13) The processContactSummary writes the combined audio file to the combined audio S3 bucket.

The Lambda code expects the Kinesis Video Stream details provided by the Amazon Connect Contact Flow as well as the Amazon Connect Contact Id. The handler function of the Lambda is present in KVSTranscribeStreamingLambda.java and it uses the GetMedia API of Kinesis Video Stream to fetch the InputStream of the customer audio call. The InputStream is processed using the AWS Kinesis Video Streams provided Parser Library. If the transcriptionEnabled property is set to true on the input, a TranscribeStreamingRetryClient client is used to send audio bytes of the audio call to Transcribe. As the transcript segments are being returned, they are saved in a DynamoDB table having ContactId as the Partition key and StartTime of the segment as the Sort key. The audio bytes are also saved in a file along with this and at the end of the audio call, if the saveCallRecording property is set to true on the input, the WAV audio file is uploaded to S3 in the provided RECORDINGS_BUCKET_NAME bucket.

See the Amazon Transcribe streaming documentation for the latest supported languages.

Getting Started

Getting started with this project is easy. The most basic use case of capturing audio in the Amazon Connect IVR can be accomplished by downloading the pre-packaged Lambda Functions, deploying the CloudFormation template in your account, and importing the Contact Flows into your Amazon Connect Instance.

Easy Setup

  • Clone the github repo into your account.
  • Create an S3 bucket and create a new folder “deployment” and upload the deployment/ folder into it
    • Open the cloudformation.template file and copy the S3 url on it's detail page
  • Go to CloudFormation and select 'Create Stack'.
    • Create the stack from an S3 url and paste the url from the cloudformation.template file
    • Fill in the parameters for the stack. The existingS3BucketName and existingS3Path should be the ones created above that contain all the deployment related code.
  • While the stack is building, go to the Amazon Connect AWS console and ensure that your Amazon Connect instance has the "live media streaming" feature enabled by following the Amazon Connect documentation for "Enable Live Media Streaming"
  • Once the stack is complete you will need to add the Lambda function to your Connect Instance. In the AWS Console open the Amazon Connect management console, select the Instance you would like to add the IVR recording capabilities to, go to the Contact Flows menu, and then the AWS Lambda section. Find the Lambda function with kvsConsumerTrigger in the name in the list and select Add Lambda Function.
  • Now go to the S3 management console, open the bucket that you created with the deployment/ folder, and download the Contact Flow. The flow is called kvsStreamingSampleFlow.json.
  • Log into your Amazon Connect instance and import the Contact Flow.
  • In the Contact Flow edit the Lambda function that is configured in the Invoke Lambda Function block and select the name of the kvsConsumerTrigger Lambda function that was deployed by the Cloudformation template.
  • Click save and publish the Contact Flow
  • In your Amazon Connect instance, claim a Phone Number and assign the Contact Flow you created to it and call the number. Depending on the settings in the KvsTranscriber Lambda Function, the audio will be saved in S3 and the transcriptions will be visible in DynamoDB.

Building the KVS Transcriber project

The lambda code is designed to be built with Gradle. All requisite dependencies are captured in the build.gradle file. Simply use gradle build to build the zip that can be deployed as an AWS Lambda application. After running gradle build, the updated zip file can be found in the build/distributions folder; copy it to the deployment folder then follow the Easy Setup steps above. Other files in the deployment folder are zip archives, each containing an individual file from the functions folder. The layer.zip file is produced by the Connect Audio Utils project; see the Audio Utils section below for further info.

Lambda Environment Variables

This Lambda Function has environment variables that control its behavior:

  • APP_REGION - The region for AWS DynamoDB, S3 and Kinesis Video Streams resources (ie: us-east-1)
  • TRANSCRIBE_REGION - The region to be used for AWS Transcribe Streaming (ie: us-east-1)
  • RECORDINGS_BUCKET_NAME - The AWS S3 bucket name where the audio files will be saved (Lambda needs to have permissions to this bucket)
  • RECORDINGS_KEY_PREFIX - The prefix to be used for the audio file names in AWS S3
  • RECORDINGS_PUBLIC_READ_ACL - Set to TRUE to add public read ACL on audio file stored in S3. This will allow for anyone with S3 URL to download the audio file.
  • INPUT_KEY_PREFIX - The prefix for the AWS S3 file name provided in the Lambda request. This file is expected to be present in RECORDINGS_BUCKET_NAME
  • CONSOLE_LOG_TRANSCRIPT_FLAG - Needs to be set to TRUE if the Connect call transcriptions are to be logged.
  • TABLE_CALLER_TRANSCRIPT - The DynamoDB table name where the transcripts of the audio from the customer need to be saved (Table Partition key must be: ContactId, and Sort Key must be: StartTime)
  • TABLE_CALLER_TRANSCRIPT_TO_CUSTOMER - The DynamoDB table name where the transcripts of the audio to the customer need to be saved (Table Partition key must be: ContactId, and Sort Key must be: StartTime)
  • SAVE_PARTIAL_TRANSCRIPTS - Set to TRUE if partial segments need to saved in the DynamoDB table. Else, only complete segments will be persisted.
  • START_SELECTOR_TYPE - Set to NOW to get transcribe once the agent and user are connected. Set to FRAGMENT_NUMBER to start transcribing once the 'Start Media Streaming' block is executed in your contact flow

Sample Lambda Environment Variables

Lambda Invocation Event Details

This Lambda Function will need some details when invoked:

  • streamARN - The ARN of the Kinesis Video stream that includes the customer audio, this is provided by Amazon Connect when streaming is started successfully
  • startFragmentNum - Identifies the Kinesis Video Streams fragment in which the customer audio stream started, this is provided by Amazon Connect when streaming is started successfully
  • connectContactId - The Amazon Connect Contact ID, this is always present in the Amazon Connect invocation event.
  • transcriptionEnabled - An optional flag to instruct the Lambda function if transcription (using Amazon Transcribe) is to be enabled or not (options are "true" or "false")
  • saveCallRecording - An optional flag to instruct the Lambda function to upload the saved audio to S3 (options are "true" or "false")
  • languageCode - An optional flag to instruct the Lambda function on what language the source customer audio is in, as of this writing the options are: "en-US" or "es-US" (US-English, or US-Spanish)
  • streamAudioFromCustomer - An optional flag to instruct the Lambda function on whether to stream audio from the customer. It is true by default (options are "true" or "false")
  • streamAudioToCustomer - An optional flag to instruct the Lambda function on whether to stream audio to the customer. It is true by default (options are "true" or "false")

Sample Lambda Invocation Event

The following is a sample invocation event:

   { 
       "streamARN": "arn:aws:kinesisvideo:us-east-1:6137874xxxxx:stream/kvsstreams-connect-demo-6855eee9-fa47-4b84-a970-ac6dbdd30b9d/1542430xxxxxx",
       "startFragmentNum": "9134385233318150666908441974200077706515712xxxx",
       "connectContactId": "b0e14540-ca63-4205-b285-c6dde79bxxxx",
       "transcriptionEnabled": "true",
       "saveCallRecording": "true",
       "languageCode": "en-US",
       "streamAudioFromCustomer": "true",
       "streamAudioToCustomer": "true"
    }

Audio Utils

This solution uses the Connect Audio Utils project for combining audio files. For details on the building Connect Audio Utils see this link. Amazon Connect Audio Utils

License Summary

This sample code is made available under a modified MIT license. See the LICENSE file.

amazon-connect-realtime-transcription's People

Contributors

angieyu avatar btgann avatar efh365 avatar groverkaran11 avatar groverkaran11-amazon avatar hyandell avatar jossulli avatar khastation avatar lwarneminde avatar yaelhagg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-connect-realtime-transcription's Issues

Return S3 wav file that has been saved by Java lambda

Hello again!

I have successfully implemented the sample Java code you provided into an Amazon Connect flow. The voice is being stored in a S3 bucket and the transcript is being stored in a DynamoDB.

Next, I created a Node.JS lambda function that runs after the call to do some post-processing. The idea is to store some of the call attributes along with the transcript (which I am concatenating into a single string) into a single record in a database along with the URL to the voice recording. So far, I can successfully collect and store the contact id, caller phone number, and text of the transcript.

The problem I now have is that I can't figure out how to obtain the URL of the S3 file. I can see that the S3 key contains the contact id from the call, but it also contains a timestamp and I have no idea of knowing exactly what that timestamp will be.

Using Node.JS in a Amazon Connect lambda function, is there a way for me to query S3 and locate the correct wav file based on the contact id? Alternately, it would be nice if the Java lambda function somehow returne the ARN to the saved file or even wrote it as a value in the DynamoDB.

saveCallRecording variable not mentioned in documentation

In order to save the audio file to an S3 bucket a variable called saveCallRecording needs to be set to true when the Java function is triggered. Such variable is not mentioned in the documentation or the sample lambda trigger function.

In my case, I chose to set it as a contact attribute in Connect and I send it in the payload from the trigger function:

let payload = {
		        streamARN: event.Details.ContactData.MediaStreams.Customer.Audio.StreamARN,
		        startFragmentNum: event.Details.ContactData.MediaStreams.Customer.Audio.StartFragmentNumber,
		        connectContactId: event.Details.ContactData.ContactId,
		        transcriptionEnabled: event.Details.ContactData.Attributes.transcribeCall === "true" ? true : false,
		        saveCallRecording: event.Details.ContactData.Attributes.saveCallRecording === "true" ? true : false
    		};

Thank you for the code though, it's great!

Stack creation fails with error Error occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist.

The following error occurs when I try to create the stack by following the steps mentioned in readme.md

Logical ID : processContactSummary

Error occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 69bd456e-6c18-4af8-b54f-a2a26ce0a5c0)

image

Location of the codes to save the transcript after the call complete

Hi, I'm looking for the location of the codes to save the transcript after the call ended. I see that the transcripts are saved in the "transcripts" folder on S3 bucket. But I wanted to know how the name of the txt file is generated, and can't find the codes for that anywhere.
Any help would be appreciated.

"ExpiresAfter" attribute set to milliseconds but Dynamo Db TTL says it only accepts only in seconds

Hey,

Just want to get clarification on the part of the code line 103 in the function TranscribedSegmentWriter.java where the value is set in milliseconds for the attribute "ExpiresAfter" but in the Dynamo TTL documentation it says that the attribute has to be in seconds [1] thus records are not deleted after 7 days. Why is this the case or this is an issue with the code logic?

Thanks

References:

[1] https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/time-to-live-ttl-before-you-start.html

Environment Variables

I am confused by the INPUT_KEY_PREFIX.

  1. Where does this valued come from?
  2. What does this mean? This file is expected to be present in RECORDINGS_BUCKET_NAME

An example would be helpful
Could you provide an example of the complete table filled out with a description of where each piece of data comes from?

Here's my current attempt

APP_REGION: us-west-2
CONSOLE_LOG_TRANSCRIPT_FLAG: TRUE
INPUT_KEY_PREFIX: AspenCalls <--I have no idea what this is supposed to be!
RECORDINGS_BUCKET_NAME: arn:aws:s3:::aspen-call-bucket
RECORDINGS_KEY_PREFIX: CallRecordings <-- Do I just make this up?
RECORDINGS_PUBLIC_READ_ACL: TRUE
SAVE_PARTIAL_TRANSCRIPTS: TRUE
TABLE_CALLER_TRANSCRIPT: arn:aws:dynamodb:us-west-2:639689516630:table/AspenCalls
TRANSCRIBE_REGION: us-west-2

Dynamo and S3 stooped updating

Hi guys,
Wondering if you could help me. Set this up this morning and it was working perfectly, then all of a sudden it stopped updating on dynamo and on S3

No errors in the logfiles either, has anyone seen this happen before?

Not getting full transcription for a call

Hi Team,
I have created a contact flow and invoked kvs-trigger function.
But in the dynamo DB table I am not getting full transcription for the call.
For example, I have conversation like below,

IVR Bot: Hello how may I help you?
Customer: show my balance
IVR Bot: what is your account number?
Customer: 123
IVR Bot: responds with correct answers
Customer: list my accounts
IVR Bot: responds with the answer
and so on...

But I can only see show my balance and 123 in my dynamoDB table which means it does not store the transcript for whole call.

Please help me with this urgently.

UnknownHostException: transcribestreaming.ap-northeast-1.amazonaws.com

Hi, I am trying to test this sample for making customer demo.

In the Lambda function "kvsTranscriber" which is implemented as Java returns error as belows.
There are several errors when this function is triggered. Of course there is no record files on S3

TranscribeStreamingRetryClient:164 - Error occurred on channel AUDIO_FROM_CUSTOMER : software.amazon.awssdk.core.exception.SdkClientException

Caused by: software.amazon.awssdk.core.exception.SdkClientException
Caused by: java.net.UnknownHostException: transcribestreaming.ap-northeast-1.amazonaws.com

Could you give me a solution?
I just ran CloudFormation Stacks from the document.

Not able to re trigger failed transcriptions

We are seeing occasional failures (believe to be service limit related, case opened) in the transcription that causes it to enter a error loop and never even try to copy the audio file to S3. When we try to re trigger the transcription from the same Lambda it goes straight to 'Completable future is complete.' in the logs then 'Skipping upload to S3. saveCallRecording was disabled or audio file has 0 bytes:' . We have a identical lambda deployed under a different name and when we run it there it works as expected.

image

S3File fails to write

Sometimes the S3 wav file is not created. I know that I have set the parameters correctly to both record the audio and transcribe. Sometimes it works great and other times it seems to just refuse to save the wav file.

Here is a log file from the transcription lambda for a time that it failed:

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-04-26 00:32:58 ERROR KVSTranscribeStreamingLambda:122 - KVS to Transcribe Streaming failed with:
org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:266)
at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:225)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:184)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:213)
at org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:315)
at org.apache.http.impl.execchain.ResponseEntityProxy.streamClosed(ResponseEntityProxy.java:143)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:228)
at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:172)
at com.amazonaws.internal.SdkFilterInputStream.close(SdkFilterInputStream.java:107)
at com.amazonaws.event.ProgressInputStream.close(ProgressInputStream.java:211)
at com.amazonaws.internal.SdkFilterInputStream.close(SdkFilterInputStream.java:107)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.closeFileAndUploadRawAudio(KVSTranscribeStreamingLambda.java:248)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.startKVSToTranscribeStreaming(KVSTranscribeStreamingLambda.java:174)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.handleRequest(KVSTranscribeStreamingLambda.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:259)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:178)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:293)
at lambdainternal.AWSLambda.(AWSLambda.java:64)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:114)
END RequestId: 57c43b7b-a2c7-4bce-9536-ca5748c192e9
REPORT RequestId: 57c43b7b-a2c7-4bce-9536-ca5748c192e9 Duration: 63698.86 ms Billed Duration: 63700 ms Memory Size: 512 MB Max Memory Used: 209 MB
START RequestId: f3d70ab1-2969-48c2-96ab-d81d01a84c65 Version: $LATEST
2019-04-26 00:35:48 INFO KVSTranscribeStreamingLambda:97 - received request : streamARN=arn:aws:kinesisvideo:us-west-2:639689516630:stream/SMSServiceCallDemoStreaming-connect-cxdemo-contact-783068c2-e44c-4c0b-b98d-69fb82ebd61d/1551467631136, startFragmentNum=91343852333181462103243005468785519199418949846, connectContactId=9be426a0-3e00-49c1-82a2-89273e89c259, transcriptionEnabled=true
2019-04-26 00:35:48 INFO KVSTranscribeStreamingLambda:98 - received context: lambdainternal.api.LambdaContext@42c28305
2019-04-26 00:35:49 INFO KVSUtils:208 - GetMedia called on stream SMSServiceCallDemoStreaming-connect-cxdemo-contact-783068c2-e44c-4c0b-b98d-69fb82ebd61d response 200 requestId f0e4a4c9-e688-2301-a5d8-f06c962c4c64
2019-04-26 00:35:49 INFO KVSTranscribeStreamingLambda:153 - Calling Transcribe service..
2019-04-26 00:35:49 INFO StreamTranscriptionBehaviorImpl:51 - 1556238949989 Received Initial response from Transcribe. Request Id: 70ea0c73-471b-4ff8-9f57-1af877df27be
2019-04-26 00:36:04 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238964042: [11.930, 12.040] - The
2019-04-26 00:36:04 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238964194: [11.930, 12.340] - The, uh
2019-04-26 00:36:04 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238964210: [11.930, 12.740] - The, uh
2019-04-26 00:36:04 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238964288: [11.930, 12.840] - The uh sir.
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965061: [11.930, 12.940] - The, uh
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965071: [11.930, 13.040] - The, uh secure
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965109: [11.930, 13.140] - The, uh, security.
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965119: [11.930, 13.240] - The, uh, security key.
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965138: [11.930, 13.340] - The, uh, security cam.
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965150: [11.930, 13.640] - The, uh, security cameras.
2019-04-26 00:36:05 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238965178: [11.930, 13.840] - The, uh, security cameras.
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966305: [11.930, 13.940] - The, uh, security cameras are
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966315: [11.930, 14.140] - The, uh, security cameras are
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966331: [11.930, 14.240] - The, uh, security cameras are both
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966357: [11.930, 14.840] - The, uh, security cameras are both point
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966591: [11.930, 15.040] - The, uh, security cameras are both pointy.
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966648: [11.930, 15.140] - The, uh, security cameras are both pointy.
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966748: [11.930, 15.340] - The, uh, security cameras are both pointy headed.
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966791: [11.930, 15.440] - The, uh, security cameras are both pointing at each
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966817: [11.930, 15.540] - The, uh, security cameras are both pointing at each
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966850: [11.930, 15.640] - The, uh, security cameras are both pointing at each other.
2019-04-26 00:36:06 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238966870: [11.930, 15.980] - The, uh, security cameras are both pointing at each other.
2019-04-26 00:36:08 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238968144: [17.440, 17.550] - Mhm.
2019-04-26 00:36:08 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238968170: [17.440, 17.650] - Mhm.
2019-04-26 00:36:08 INFO TranscribedSegmentWriter:106 - Thread sdk-async-response-15-0 1556238968231: [17.440, 18.150] - Mhm.
2019-04-26 00:36:22 DEBUG TranscribeStreamingRetryClient:163 - Error occured: software.amazon.awssdk.services.transcribestreaming.model.BadRequestException: Your request timed out because no new audio was received for 15 seconds. (Service: transcribe, Status Code: 400, Request ID: 70ea0c73-471b-4ff8-9f57-1af877df27be)
2019-04-26 00:36:22 DEBUG TranscribeStreamingRetryClient:166 - Retriable error occurred and will be retried.
2019-04-26 00:36:22 DEBUG TranscribeStreamingRetryClient:167 - Sleeping for sometime before retrying...
2019-04-26 00:36:22 DEBUG TranscribeStreamingRetryClient:174 - Making retry attempt: 1
2019-04-26 00:36:22 INFO StreamTranscriptionBehaviorImpl:51 - 1556238982592 Received Initial response from Transcribe. Request Id: 35dbb1d5-7c4e-4769-b192-9aa28de92c5d
2019-04-26 00:36:22 DEBUG TranscribeStreamingRetryClient:163 - Error occured: software.amazon.awssdk.core.exception.SdkClientException
2019-04-26 00:36:23 ERROR TranscribeStreamingRetryClient:178 - Encountered unretriable exception or ran out of retries.
java.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.utils.CompletableFutureUtils.errorAsCompletionException(CompletableFutureUtils.java:61)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.lambda$execute$0(AsyncExecutionFailureExceptionReportingStage.java:50)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryErrorIfNeeded(AsyncRetryableStage.java:166)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:118)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.lambda$execute$0(AsyncRetryableStage.java:103)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage$ResponseHandler.onError(MakeAsyncHttpRequestStage.java:236)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:225)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.lambda$writeRequest$6(NettyRequestExecutor.java:187)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Thread.java:748)
Caused by: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
at software.amazon.awssdk.core.internal.util.ThrowableUtils.asSdkException(ThrowableUtils.java:98)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:117)
... 17 more
Caused by: java.lang.IllegalArgumentException: The validated expression is false
at org.apache.commons.lang3.Validate.isTrue(Validate.java:183)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.setSize(EBMLParserInternalElement.java:132)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLUtils.readEbmlInt(EBMLUtils.java:141)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLUtils.readSize(EBMLUtils.java:168)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.readSize(EBMLParserInternalElement.java:54)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParser.parse(EBMLParser.java:89)
at com.amazonaws.kinesisvideo.parser.mkv.StreamingMkvReader.nextIfAvailable(StreamingMkvReader.java:116)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:93)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:143)
at com.amazonaws.transcribestreaming.KVSByteToAudioEventSubscription.lambda$request$0(KVSByteToAudioEventSubscription.java:73)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
2019-04-26 00:36:23 ERROR StreamTranscriptionBehaviorImpl:39 - Error in middle of stream:
java.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.utils.CompletableFutureUtils.errorAsCompletionException(CompletableFutureUtils.java:61)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.lambda$execute$0(AsyncExecutionFailureExceptionReportingStage.java:50)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryErrorIfNeeded(AsyncRetryableStage.java:166)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:118)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.lambda$execute$0(AsyncRetryableStage.java:103)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage$ResponseHandler.onError(MakeAsyncHttpRequestStage.java:236)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:225)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.lambda$writeRequest$6(NettyRequestExecutor.java:187)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Thread.java:748)
Caused by: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
at software.amazon.awssdk.core.internal.util.ThrowableUtils.asSdkException(ThrowableUtils.java:98)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:117)
... 17 more
Caused by: java.lang.IllegalArgumentException: The validated expression is false
at org.apache.commons.lang3.Validate.isTrue(Validate.java:183)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.setSize(EBMLParserInternalElement.java:132)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLUtils.readEbmlInt(EBMLUtils.java:141)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLUtils.readSize(EBMLUtils.java:168)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.readSize(EBMLParserInternalElement.java:54)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParser.parse(EBMLParser.java:89)
at com.amazonaws.kinesisvideo.parser.mkv.StreamingMkvReader.nextIfAvailable(StreamingMkvReader.java:116)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:93)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:143)
at com.amazonaws.transcribestreaming.KVSByteToAudioEventSubscription.lambda$request$0(KVSByteToAudioEventSubscription.java:73)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
2019-04-26 00:36:23 DEBUG TranscribeStreamingRetryClient:243 - TranscribeStreamingRetryClient closed
2019-04-26 00:36:23 ERROR KVSTranscribeStreamingLambda:170 - Error during streaming:
java.util.concurrent.ExecutionException: software.amazon.awssdk.core.exception.SdkClientException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.startKVSToTranscribeStreaming(KVSTranscribeStreamingLambda.java:164)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.handleRequest(KVSTranscribeStreamingLambda.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:259)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:178)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:293)
at lambdainternal.AWSLambda.(AWSLambda.java:64)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:114)
Caused by: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
at software.amazon.awssdk.core.internal.util.ThrowableUtils.asSdkException(ThrowableUtils.java:98)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:117)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.lambda$execute$0(AsyncRetryableStage.java:103)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage$ResponseHandler.onError(MakeAsyncHttpRequestStage.java:236)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:225)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.lambda$writeRequest$6(NettyRequestExecutor.java:187)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: The validated expression is false
at org.apache.commons.lang3.Validate.isTrue(Validate.java:183)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.setSize(EBMLParserInternalElement.java:132)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLUtils.readEbmlInt(EBMLUtils.java:141)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLUtils.readSize(EBMLUtils.java:168)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.readSize(EBMLParserInternalElement.java:54)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParser.parse(EBMLParser.java:89)
at com.amazonaws.kinesisvideo.parser.mkv.StreamingMkvReader.nextIfAvailable(StreamingMkvReader.java:116)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:93)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:143)
at com.amazonaws.transcribestreaming.KVSByteToAudioEventSubscription.lambda$request$0(KVSByteToAudioEventSubscription.java:73)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
2019-04-26 00:36:26 ERROR rejectedExecution:770 - Failed to submit a listener notification task. Event loop shut down?
java.util.concurrent.RejectedExecutionException: event executor terminated
at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:867)
at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:328)
at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:321)
at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:778)
at io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultPromise.java:768)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:432)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:121)
at com.typesafe.netty.http.HttpStreamsHandler$3.error(HttpStreamsHandler.java:267)
at com.typesafe.netty.HandlerSubscriber.onError(HandlerSubscriber.java:233)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor$StreamedRequest$1.onError(NettyRequestExecutor.java:443)
at software.amazon.awssdk.utils.async.DelegatingSubscriber.onError(DelegatingSubscriber.java:38)
at software.amazon.awssdk.auth.signer.internal.AsyncSigV4SubscriberAdapter.onError(AsyncSigV4SubscriberAdapter.java:80)
at software.amazon.awssdk.utils.async.DelegatingSubscriber.onError(DelegatingSubscriber.java:38)
at software.amazon.awssdk.utils.async.DelegatingSubscriber.onError(DelegatingSubscriber.java:38)
at com.amazonaws.transcribestreaming.KVSByteToAudioEventSubscription.lambda$request$0(KVSByteToAudioEventSubscription.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-04-26 00:36:26 ERROR rejectedExecution:770 - Failed to submit a listener notification task. Event loop shut down?
java.util.concurrent.RejectedExecutionException: event executor terminated
at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:867)
at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:328)
at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:321)
at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:778)
at io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultPromise.java:768)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:432)
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:112)
at io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:89)
at io.netty.channel.AbstractChannelHandlerContext.safeExecute(AbstractChannelHandlerContext.java:1017)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:610)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:465)
at com.typesafe.netty.http.HttpStreamsHandler$3.error(HttpStreamsHandler.java:268)
at com.typesafe.netty.HandlerSubscriber.onError(HandlerSubscriber.java:233)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor$StreamedRequest$1.onError(NettyRequestExecutor.java:443)
at software.amazon.awssdk.utils.async.DelegatingSubscriber.onError(DelegatingSubscriber.java:38)
at software.amazon.awssdk.auth.signer.internal.AsyncSigV4SubscriberAdapter.onError(AsyncSigV4SubscriberAdapter.java:80)
at software.amazon.awssdk.utils.async.DelegatingSubscriber.onError(DelegatingSubscriber.java:38)
at software.amazon.awssdk.utils.async.DelegatingSubscriber.onError(DelegatingSubscriber.java:38)
at com.amazonaws.transcribestreaming.KVSByteToAudioEventSubscription.lambda$request$0(KVSByteToAudioEventSubscription.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-04-26 00:36:56 ERROR KVSTranscribeStreamingLambda:122 - KVS to Transcribe Streaming failed with:
org.apache.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:266)
at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:225)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:184)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:213)
at org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:315)
at org.apache.http.impl.execchain.ResponseEntityProxy.streamClosed(ResponseEntityProxy.java:143)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:228)
at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:172)
at com.amazonaws.internal.SdkFilterInputStream.close(SdkFilterInputStream.java:107)
at com.amazonaws.event.ProgressInputStream.close(ProgressInputStream.java:211)
at com.amazonaws.internal.SdkFilterInputStream.close(SdkFilterInputStream.java:107)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.closeFileAndUploadRawAudio(KVSTranscribeStreamingLambda.java:248)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.startKVSToTranscribeStreaming(KVSTranscribeStreamingLambda.java:174)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.handleRequest(KVSTranscribeStreamingLambda.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:259)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:178)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:293)
at lambdainternal.AWSLambda.(AWSLambda.java:64)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:114)
END RequestId: f3d70ab1-2969-48c2-96ab-d81d01a84c65
REPORT RequestId: f3d70ab1-2969-48c2-96ab-d81d01a84c65 Duration: 67193.64 ms Billed Duration: 67200 ms Memory Size: 512 MB Max Memory Used: 210 MB

Issue in getting wav files uploaded in S3

Hi,
I am unable to get the wav file upload to S3 working. I don't see any exceptions in logs. The transcription to dynamodb is working fine.

*I do see saveCallRecording=true in the logs for the transcriber lambda

Any advise?

Regards,

KVS Concurrency Issues

We've been experiencing some sort of concurrency issues where the logs are saying
"You have reached your limit of concurrent streams, 5. Try again later."

This results to intermittent failures of transcription from either channels (i.e. AUDIO_TO_CUSTOMER)
"Error occurred on channel AUDIO_TO_CUSTOMER : software.amazon.awssdk.core.exception.SdkClientException"

See logs for reference:

2020-08-18 06:02:09 INFO KVSTranscribeStreamingLambda:159 - Calling Transcribe service..
2020-08-18 06:02:10 INFO StreamTranscriptionBehaviorImpl:53 - 1597730530025 Received Initial response from Transcribe. Request Id: bf90141a-0ee7-41f1-b92c-b6386969eb3d
2020-08-18 06:02:10 INFO TranscribeStreamingRetryClient:214 - Reached on error but doing nothingsoftware.amazon.awssdk.services.transcribestreaming.model.LimitExceededException: You have reached your limit of concurrent streams, 5. Try again later. (Service: TranscribeStreaming, Status Code: 429, Request ID: 935a0d1b-8833-472f-b018-ff02b2ba9ac0)
2020-08-18 06:02:10 INFO TranscribeStreamingRetryClient:214 - Reached on error but doing nothingsoftware.amazon.awssdk.services.transcribestreaming.model.LimitExceededException: You have reached your limit of concurrent streams, 5. Try again later. (Service: TranscribeStreaming, Status Code: 429, Request ID: 645e2313-fda8-4e3d-b83e-b636093363c5)
2020-08-18 06:02:11 INFO TranscribedSegmentWriter:59 - table name: CustomerTranscripts
2020-08-18 06:02:11 INFO TranscribedSegmentWriter:60 - Transcription event: Transcript(Results=[])
2020-08-18 06:02:11 INFO TranscribeStreamingRetryClient:214 - Reached on error but doing nothingjava.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
2020-08-18 06:02:11 DEBUG TranscribeStreamingRetryClient:164 - Error occurred on channel AUDIO_TO_CUSTOMER : software.amazon.awssdk.core.exception.SdkClientException
java.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.utils.CompletableFutureUtils.errorAsCompletionException(CompletableFutureUtils.java:61)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.lambda$execute$0(AsyncExecutionFailureExceptionReportingStage.java:50)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryErrorIfNeeded(AsyncRetryableStage.java:167)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:118)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.lambda$execute$0(AsyncRetryableStage.java:103)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage$ResponseHandler.onError(MakeAsyncHttpRequestStage.java:241)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:225)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.lambda$writeRequest$6(NettyRequestExecutor.java:187)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Thread.java:748)
Caused by: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
at software.amazon.awssdk.core.internal.util.ThrowableUtils.asSdkException(ThrowableUtils.java:98)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:117)
... 17 more
Caused by: java.lang.IllegalArgumentException: The validated expression is false
at org.apache.commons.lang3.Validate.isTrue(Validate.java:183)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParserInternalElement.readSize(EBMLParserInternalElement.java:52)
at com.amazonaws.kinesisvideo.parser.ebml.EBMLParser.parse(EBMLParser.java:89)
at com.amazonaws.kinesisvideo.parser.mkv.StreamingMkvReader.nextIfAvailable(StreamingMkvReader.java:116)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:107)
at com.amazonaws.kvstranscribestreaming.KVSUtils.getByteBufferFromStream(KVSUtils.java:171)
at com.amazonaws.transcribestreaming.KVSByteToAudioEventSubscription.lambda$request$0(KVSByteToAudioEventSubscription.java:80)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more

Any suggestions on how can we resolve this issue?

Thanks

Suggestion: Add clarification on the instructions of CoudFormation building process

Hi while trying to build the CloudFormation template I got an error creating the audio s3 bucket, I got this

image

Apparently it was because I didn't change the default Audio bucket name, get solved after changing it, don't know why.

I suggest clarifying that you must personalize the Audio bucket name as I spended a few hours realizing where my error was (I'm quite a beningner with AWS)

Question: what does the web_socket_connections do

Just a quick question, what is there for? I looked at the AWS DynamoDB table and it was completely empty. In the template, it's not related to anything else. I'm a bit new to web development so I apologize if this is a simple question. Thanks

Need Clarificaton

Is the amazon-connect-realtime-transcription.zip example ready to upload to Lamba or is a Gradle build required first? Thx.

Not getting proper output for speech to text translation in dynamoDB

Hello I am trying to get the transcription from customer call. I was able to get the audio in S3 bucket. But at the time of real time transcription I am not getting exact output.
Ex. When I say "balance" or anything else it is just storing Recorded,Courted or where did.
It is not storing the actual speech.

How to call AWS comprehend services realtime?

How to call comprehend service realtime?
When this project transcription audio and save text to dynamodb, Can i call AWS comprehend services realtime? And save the comprehend result to dynamodb realtime?
How can i do ?
I need help.
@efh365 Thanks.

IVR Interaction not recorded

Deat team,

I have deployed the project however I'm not able to understand why the IVR interaction is not transcribed. I have created a very simple lex bot to recognize ok/accept input to be GDPR compliant, however, the spoken information for the voice bot is not recorded. I would like to understand what am I doing wrong.

Kind Regards,
Alex

Error deploying code

Hi, I am new to AWS but this should be a silly question for you. When I tried to create a stack, I get the attached error. How do I resolve this?

The S3 bucket I created is "deployment"

Please assist. Thanks

image

Increasing Lambda limit for recording length

Hi there,
I need to increase the Lambda limit for a recording from the 15 minutes stated in your documentation to potentially 3 hours. I can see that the Lambda timeout can't be extended over 15 minutes though. Is there a way of sending a regular wake up to stop it timing out?
Kind regards
Phil

Not accurate transcribe result Audio to Text in Real time.

Hi There,

Anyone please help me. Do you also find the differences if use Real Time Transcribe in Amazon Connect.

I'm sharing my experiences here, found the difference with Real time transcribe and conversation recording wav file manually upload using transcribe service. Good result in manually convert wav file to text.

First Way - Without Agent:

I'm trying to achieve the Voicemail functionality in case of no agents during non working hours. Customer dialing the contact center then we prompt to leave your message then customer leave voice for 30 secs then it will call the transcribe stream lambda to proceed the conversion of audio to text in Dynamo DB but receiving difference sentences in the output.

Second Way - With Agent:

The same way we transferred the call to dummy agent ccp to retrieve the .wav file. Now, customer recording is available in the s3 bucket and copy the file path then enter it in the transcribe service to create job then getting accurate audio to text.

  1. Anyone help me why there is the difference in Real time transcribe and manually convert .wav file.
  2. Accurate result receiving in the manual convert .wav file. Why?
  3. Any customized configuration available in Real time transcribe to receive the accurate response.
  4. For one call at least three segments then how can we get all results in one final output in Dynamo table.
  5. Without agent we have to achieve this functionality. Can anyone share your experience and documentation if available.

If you need any other details kindly let me know.

Thanks for your help in advance.

Regards,
Dinesh Babu V

Error in lambda functions module uuid not found

3 of the lambda functions for node.js uses uuid but the uuid not included as a node_modules in the zip. I know how to fix it but I thought may be it should be added by default so someone following the instructions step by step does not encounter an issue.

Trigger Function Deployment

How do the Trigger function invoke the real time transcription Java Lambda connect? I don't grok where that is happening.

The trigger lambda has a line of code

'FunctionName': process.env.transcriptionFunction

What is process.env.transcriptionFunction and how is it set?

AccessDeniedException

this is my first time working with AWS. i followed the Easy Setup and now i get this CloudWatch log:
{ "Results": "Status Code: 403; Error Code: AccessDeniedException; RequestId: 4c959554-0532-4921-a528-7f7fbf63b152", "ContactId": "04c11d1b-3b56-44e5-8185-aa92bbc3dfd6", "ContactFlowId": "arn:aws:connect:eu-central-1:216747082431:instance/f146ccc0-3f8a-407a-91ed-844d80118b39/contact-flow/0da3b63b-3065-4563-98fe-e8e6dd1963b8", "ContactFlowModuleType": "InvokeExternalResource", "Timestamp": "2019-12-16T08:57:14.251Z", "Parameters": { "FunctionArn": "arn:aws:lambda:eu-central-1:216747082431:function:transcription-deployment-initContactDetails-1J9T8E0MJTT6J", "TimeLimit": "8000" } }
i don't know if it needs any additional permissions. all lambda permissions look fine to me

Failed to create "initContactDetails" as S3 can't be found

Hi Expert,

As docs said, I tried to create stack in cloud foundry, then met issue as below. May you give me some idea what's wrong about my configuration?

image

The parameters I set as below, I only need write down the existingS3BucketName and existingS3Path, right?

image

Close Amazon Connect Stream

Is there a way to do this within the code (triggering Connect Stream to close)? Within my contact flow, I need to pause streaming and I've tried 1. closing the input stream and 2. cancelling the subscription, though they don't work very well. Is there a more straightforward way to do this?

Live transcription stops after 5 mins

Hi,

I am currently working on live transcription mostly based on this repository and we have been having an error that stops the live transcription after 5 mins. This is the error that gets thrown:

software.amazon.awssdk.services.transcribestreaming.model.BadRequestException: Signature expired: 20200720T093804Z is now earlier than 20200720T093804Z (20200720T094304Z - 5 min.) (Service: transcribe, Status Code: 400, Request ID: 9207a474-b32d-4a29-a06c-6c9381075aa7)

Stop media streaming block not working

I have a problem while trying to stop the media streaming because it seams that the streaming never ends until the call is finished.

To put in context, I am developing a call center answered by a bot (using connect, lex, lambda, S3, kinesis, dynamo and transcribe) and I have different interactions with the user. For example, I start asking the user his name, then his phone number, then his address, etc.. This audios are stored in S3 using the lambda function for this project, that transcribes the content, stores the transcription in Dynamo and stores a .wav in S3.

For all those interactions, I start streaming before the user talks and I end it after he finish. Then I start again the streaming, ask the user whatever, wait for his response and end the streaming again.

The problem is that in this example, the first audio never stops till I finish the call and, as it is still running, contains as well the answer for the second, third and all successive questions, making a huge file that only ends when the call is finished. The second audio contains the second answer as well as the third, fourth, etc.. The third audio will contain the third response, fourth, etc...

It seems that the problem is that the "Stop media streaming" block is not working and the streaming never ends.

Error after transcribe service called

Hi, I believe I have followed all the steps but when I run the example using a call into Amazon connect I get an error after the Transcribe Service is called:

2019-05-03 19:43:08 INFO KVSTranscribeStreamingLambda:155 - Calling Transcribe service..
2019-05-03 19:43:10 DEBUG TranscribeStreamingRetryClient:163 - Error occured: software.amazon.awssdk.core.exception.SdkClientException

Any idea what would be causing that or where I should be looking for more logs? Sorry very new to this any help appreciated.

Need to know all Service Quota restrictions.

We are seeing failures of the transcription service once the number of concurrent calls exceeds 5, resulting in the following error.
java.util.concurrent.CompletionException: software.amazon.awssdk.services.transcribestreaming.model.BadRequestException: Your request timed out because no new audio was received for 15 seconds. (Service: transcribe, Status Code: 400,

Others listed this as a capacity issue and closed it, however when we opened a ticket to increase the for 'Amazon Transcribe -The maximum number of concurrent streaming transcription jobs.' however support is saying that this is already set to 500. What other service quotas effect this?

Error when testing pre-packaged Lambda function

I have upload the pre-packaged Lambda zip into a Lambda function and filled in the properties. When I try to process

my flow, I get the following error:

08:56:50
START RequestId: 56764c7e-50af-4de9-941b-af2ffd087842 Version: $LATEST

08:56:50
Class not found: om.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda: java.lang.ClassNotFoundException java.lang.ClassNotFoundException: om.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at ja
Class not found: om.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda: java.lang.ClassNotFoundException
java.lang.ClassNotFoundException: om.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)


08:56:50
END RequestId: 56764c7e-50af-4de9-941b-af2ffd087842

No docs on Connect specific MKV tags

Where does the tag with the ContactId reside? Namely, in the example it checks if the ContactId from the MKV tags match the connectContactId from the KVS event:

https://github.com/aws-samples/amazon-connect-realtime-transcription/blob/b21f5baab582108d9d53775022fa93ae4e4351d3/src/main/java/com/amazonaws/kvstranscribestreaming/KVSUtils.java#L71

I wrote the KVS output to an MKV file, but only see the following tags:

|+ Tags
| + Tag
|  + Simple
|   + Name: AWS_KINESISVIDEO_FRAGMENT_NUMBER
|   + String: 91343852333181457156434608487321492997712000000
|  + Simple
|   + Name: AWS_KINESISVIDEO_SERVER_TIMESTAMP
|   + String: 1567100227.205
|  + Simple
|   + Name: AWS_KINESISVIDEO_PRODUCER_TIMESTAMP
|   + String: 1109909.253

I'm trying to create an MKV file manually that matches the output from Connect to KVS so that I can write some automation to simulate KVS events.

UnknownHostException: transcribestreaming.eu-central-1.amazonaws.com

Hello all,

I am having this error:
Caused by: java.net.UnknownHostException: transcribestreaming.eu-central-1.amazonaws.com

Somebody knows how to fix this UnknownHost error?

I copy the whole trace:

2019-10-29 14:20:12 DEBUG TranscribeStreamingRetryClient:164 - Error occurred on channel AUDIO_FROM_CUSTOMER : software.amazon.awssdk.core.exception.SdkClientException
java.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.utils.CompletableFutureUtils.errorAsCompletionException(CompletableFutureUtils.java:61)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.lambda$execute$0(AsyncExecutionFailureExceptionReportingStage.java:50)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryErrorIfNeeded(AsyncRetryableStage.java:167)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:118)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.lambda$execute$0(AsyncRetryableStage.java:103)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage$ResponseHandler.onError(MakeAsyncHttpRequestStage.java:241)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:225)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.makeRequestListener(NettyRequestExecutor.java:127)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:112)
at software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool.lambda$acquire0$1(HttpOrHttp2ChannelPool.java:87)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Thread.java:748)
Caused by: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
at software.amazon.awssdk.core.internal.util.ThrowableUtils.asSdkException(ThrowableUtils.java:98)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:117)
... 23 more
Caused by: java.net.UnknownHostException: transcribestreaming.eu-central-1.amazonaws.com
at java.net.InetAddress.getAllByName0(InetAddress.java:1281)
at java.net.InetAddress.getAllByName(InetAddress.java:1193)
at java.net.InetAddress.getAllByName(InetAddress.java:1127)
at java.net.InetAddress.getByName(InetAddress.java:1077)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:146)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:143)
at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:43)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:63)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:55)
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:57)
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:32)
at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:108)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:208)
at io.netty.bootstrap.Bootstrap.access$000(Bootstrap.java:49)
at io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:188)
at io.netty.bootstrap.Bootstrap$1.operationComplete(Bootstrap.java:174)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:103)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:982)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:516)
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:427)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
... 5 more
2019-10-29 14:20:12 INFO TranscribeStreamingRetryClient:214 - Reached on error but doing nothingjava.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
2019-10-29 14:20:12 DEBUG TranscribeStreamingRetryClient:164 - Error occurred on channel AUDIO_TO_CUSTOMER : software.amazon.awssdk.core.exception.SdkClientException
java.util.concurrent.CompletionException: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.utils.CompletableFutureUtils.errorAsCompletionException(CompletableFutureUtils.java:61)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncExecutionFailureExceptionReportingStage.lambda$execute$0(AsyncExecutionFailureExceptionReportingStage.java:50)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryErrorIfNeeded(AsyncRetryableStage.java:167)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:118)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.lambda$execute$0(AsyncRetryableStage.java:103)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeAsyncHttpRequestStage$ResponseHandler.onError(MakeAsyncHttpRequestStage.java:241)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.handleFailure(NettyRequestExecutor.java:225)
at software.amazon.awssdk.http.nio.netty.internal.NettyRequestExecutor.makeRequestListener(NettyRequestExecutor.java:127)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:112)
at software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool.lambda$acquire0$1(HttpOrHttp2ChannelPool.java:87)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)
at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)
at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
at java.lang.Thread.run(Thread.java:748)
Caused by: software.amazon.awssdk.core.exception.SdkClientException
at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:97)
at software.amazon.awssdk.core.internal.util.ThrowableUtils.asSdkException(ThrowableUtils.java:98)
at software.amazon.awssdk.core.internal.http.pipeline.stages.AsyncRetryableStage$RetryExecutor.retryIfNeeded(AsyncRetryableStage.java:117)
... 23 more
Caused by: java.net.UnknownHostException: transcribestreaming.eu-central-1.amazonaws.com
at java.net.InetAddress.getAllByName0(InetAddress.java:1281)
at java.net.InetAddress.getAllByName(InetAddress.java:1193)
at java.net.InetAddress.getAllByName(InetAddress.java:1127)
at java.net.InetAddress.getByName(InetAddress.java:1077)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:146)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:143)
at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:43)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:63)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:55)
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:57)
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:32)
at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:108)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:208)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:170)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:119)
at io.netty.channel.pool.SimpleChannelPool.connectChannel(SimpleChannelPool.java:266)
at io.netty.channel.pool.SimpleChannelPool.acquireHealthyFromPoolOrNew(SimpleChannelPool.java:179)
at io.netty.channel.pool.SimpleChannelPool.acquire(SimpleChannelPool.java:164)
at io.netty.channel.pool.SimpleChannelPool.acquire(SimpleChannelPool.java:158)
at software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool.initializeProtocol(HttpOrHttp2ChannelPool.java:98)
at software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool.acquire0(HttpOrHttp2ChannelPool.java:80)
at software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool.lambda$acquire$0(HttpOrHttp2ChannelPool.java:70)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
... 5 more
2019-10-29 14:35:00 DEBUG TranscribeStreamingRetryClient:248 - TranscribeStreamingRetryClient closed
2019-10-29 14:35:00 ERROR NettyNioAsyncHttpClient:42 - Unable to close channel pool for https://transcribestreaming.eu-central-1.amazonaws.com:443
java.lang.NullPointerException
at software.amazon.awssdk.http.nio.netty.internal.http2.HttpOrHttp2ChannelPool.close(HttpOrHttp2ChannelPool.java:179)
at software.amazon.awssdk.http.nio.netty.internal.HandlerRemovingChannelPool.close(HandlerRemovingChannelPool.java:68)
at software.amazon.awssdk.http.nio.netty.internal.ReleaseOnceChannelPool.close(ReleaseOnceChannelPool.java:91)
at software.amazon.awssdk.utils.FunctionalUtils.runAndLogError(FunctionalUtils.java:40)
at software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient.lambda$close$2(NettyNioAsyncHttpClient.java:174)
at java.lang.Iterable.forEach(Iterable.java:75)
at software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient.close(NettyNioAsyncHttpClient.java:174)
at software.amazon.awssdk.utils.IoUtils.closeQuietly(IoUtils.java:73)
at software.amazon.awssdk.utils.IoUtils.closeIfCloseable(IoUtils.java:90)
at software.amazon.awssdk.utils.AttributeMap.lambda$close$0(AttributeMap.java:86)
at java.util.HashMap$Values.forEach(HashMap.java:981)
at software.amazon.awssdk.utils.AttributeMap.close(AttributeMap.java:86)
at software.amazon.awssdk.core.client.config.SdkClientConfiguration.close(SdkClientConfiguration.java:79)
at software.amazon.awssdk.core.internal.http.HttpClientDependencies.close(HttpClientDependencies.java:88)
at software.amazon.awssdk.core.internal.http.AmazonAsyncHttpClient.close(AmazonAsyncHttpClient.java:78)
at software.amazon.awssdk.core.client.handler.BaseAsyncClientHandler.close(BaseAsyncClientHandler.java:138)
at software.amazon.awssdk.services.transcribestreaming.DefaultTranscribeStreamingAsyncClient.close(DefaultTranscribeStreamingAsyncClient.java:218)
at com.amazonaws.transcribestreaming.TranscribeStreamingRetryClient.close(TranscribeStreamingRetryClient.java:249)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.startKVSToTranscribeStreaming(KVSTranscribeStreamingLambda.java:183)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.handleRequest(KVSTranscribeStreamingLambda.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:259)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:178)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:293)
at lambdainternal.AWSLambda.(AWSLambda.java:64)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:114)
2019-10-29 14:35:00 DEBUG KVSTranscribeStreamingLambda:184 - Timing out KVS to Transcribe Streaming after 890 sec
2019-10-29 14:35:00 ERROR KVSTranscribeStreamingLambda:124 - KVS to Transcribe Streaming failed with:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:593)
at sun.security.ssl.InputRecord.read(InputRecord.java:532)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:261)
at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:222)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:183)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:210)
at org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:312)
at org.apache.http.impl.execchain.ResponseEntityProxy.streamClosed(ResponseEntityProxy.java:142)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:228)
at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:172)
at com.amazonaws.internal.SdkFilterInputStream.close(SdkFilterInputStream.java:107)
at com.amazonaws.event.ProgressInputStream.close(ProgressInputStream.java:211)
at com.amazonaws.internal.SdkFilterInputStream.close(SdkFilterInputStream.java:107)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.closeFileAndUploadRawAudio(KVSTranscribeStreamingLambda.java:274)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.startKVSToTranscribeStreaming(KVSTranscribeStreamingLambda.java:192)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.handleRequest(KVSTranscribeStreamingLambda.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:259)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:178)
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:293)
at lambdainternal.AWSLambda.(AWSLambda.java:64)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:114)

Thank you in advance.
Eduardo

java.lang.IllegalArgumentException: One of streamARN or inputFileName must be provided getting this error when Lambda is calling

Hi Team ,

I need to fix the issue, we are recieving the below error when I am trying to call the Java Lambda. Let me know what its missing , This is working fine in another environment

2019-11-30 04:23:11 INFO KVSTranscribeStreamingLambda:98 - received request : streamARN=null, startFragmentNum=null, connectContactId=null, languageCode=Optional.empty, transcriptionEnabled=false, saveCallRecording=false
2019-11-30 04:23:11 INFO KVSTranscribeStreamingLambda:99 - received context: lambdainternal.api.LambdaContext@15a34df2
2019-11-30 04:23:11 ERROR KVSTranscribeStreamingLambda:123 - KVS to Transcribe Streaming failed with:
java.lang.IllegalArgumentException: One of streamARN or inputFileName must be provided
at com.amazonaws.kvstranscribestreaming.TranscriptionRequest.validate(TranscriptionRequest.java:121)
at com.amazonaws.kvstranscribestreaming.KVSTranscribeStreamingLambda.handleRequest(KVSTranscribeStreamingLambda.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Upload code for Lambda functions

I'm trying to figure out how the kvsConsumerTrigger lambda function works (the one that triggers kvsTranscriber, or the pre-packaged lambda function in the README). However, I'm not seeing the code anywhere & access to the s3 object is denied: would the owners be able to upload that code for learning purposes?

Code Clarification

Please clarify how the pieces of code provided in this example are related and used. There appear to be three:

  1. amazon-connect-realtime-transcription-master (the GitHub repository
  2. amazon-connect-realtime-transcription.zip (the pre-packaged Lambda function)
    3 trigger Lamba function - the sample script you provided at the bottom of the example

Thanks

No data in S3 or DDB

I have followed the "Easy Setup" and created Cloud Formation Stack.
But i don't see any data in DynamoDB or S3.

What could i be missing here? Any idea?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.