aws-samples / amazon-transcribe-live-call-analytics

Amazon Transcribe Live Call Analytics (LCA) Sample Solution
Other
77 stars 47 forks source link

Support PCA with Chime SDK Call Analytics #102

Closed garyzhon closed 8 months ago

garyzhon commented 9 months ago

Update call_event_processor to process CallAnalyticsMetadata KDS event generated by CallAnalytics. The call_event_processor sends an EventBridge event to chime_call_analytics_initialization. The EventBridge event contains the mapping of the call id to session id. chime_call_analytics_initialization creates the SessionData for pca_integration and process_tca_postcall Lambdas. pca_integration and process_tca_postcall Lambdas are updated to get the transcript and media path from the TCA completion event.

Test manually tested with a LCA call

Migrate to StartVoiceToneAnalysisTask

Migrate to the new StartVoiceToneAnalysisTask API in the media pipeline namespace. Using the new API allows LCA to have a single MediaInsightPipelineConfiguration rather the workaround with two MediaInsightPipelineConfigurations.

Test Manually update CF template to a single MediaInsightPipelineConfiguration. Manually tested voice tone analysis and review the logs in Voice Tone Analysis lambda. Validate that voice tone fluctuation is shown in LCA console.

Support existing VC Id instead of creating VC

Allow customer to specify their own Voice Connector as a CloudFormation Template parameter. If the customer provided Voice Connector is provided, LCA will not deploy a new VC. EventBridgeRule for LCA Lambda will use the provided VC Id.

Test deploy CFT and run VC

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rstrahan commented 8 months ago

Hi Gary.. on a test call (using Asterisk) I'm seeing the call playback appear immediately after the end of the call when the recording is not yet available.. so it won't playback. image

Later, when the PCA integration comes in, the playback still doesn't work.. it shows zero length.. Until the web page is refreshed - then it works.

image

Can we fix it so that the recording playback (ADD_S3_RECORDING_URL) comes only after the recording is made available from PCA, and therefore will reference an existing file when it first is rendered? (When using Chime Call Analytics, of course)

Thanks!