amazon-connect / ai-powered-speech-analytics-for-amazon-connect

The AI Powered Speech Analytics for Amazon Connect solution provides the combination of speech to text transcription, translation into preferred languages, and insights for agents and supervisors all in real-time
https://aws.amazon.com/solutions/implementations/ai-powered-speech-analytics-for-amazon-connect/
Other
55 stars 54 forks source link

Speaker identification in transcription #8

Closed tamdilip closed 4 years ago

tamdilip commented 4 years ago

I see from the contact flow I can enable options to stream both agent and customer voice. I need to set the speaker identification and to receive the transcription for both voices, I am not able to figure out how to achieve this ? Please guide me in setting it up ASAP.

References I went through-

  1. Enabling two way streams
  2. Setting diarization
efh365 commented 4 years ago

Hi, yes you can do this. First, you need to enable streaming to and from the customer in the contact flow by using the Start Media Streaming block. Then you need to update the KvsTrigger Lambda function to set the boolean to true for both directions. Then you should see the audio stream to the customer being transcribed into the DDB for the ToCustomer audio stream.

tamdilip commented 4 years ago

Thanks for the response 🙂. Yes I did the same and it worked as u said. Looks like I have to set the lambda trigger function for agent segment table too to send it in the socket response on DB insert. Will try that, as I was expecting e2e transcription on both voices ✌️.

YogeshDhana commented 3 years ago

@efh365 , @tamdilip, Is there any way I can show the Agent transcribe on the front end. If so could you please tell me? Thanks.

efh365 commented 3 years ago

Yes, you can copy the setup for the customer side transcript for the agent side transcript. In short, there is a websocket established on the front end and whenever there is a write to the DDB, the messages are pushed to the API Gateway websocket API and received on the front end.

YogeshDhana commented 3 years ago

@efh365 Thanks for the reply, I tried the same, but couldn't able to achieve it. Could you please show me an example or could you please tell me the method for Agent?

YogeshDhana commented 3 years ago

@efh365 I have enabled to Stream both Agent and Customer audio, I can also able to store the transcript of Agent and Customer in DDB. But I couldn't able to find the method to show the Agent transcripts on the front end. Kindly help me on this please

efh365 commented 3 years ago

Sorry, let me clarify. The pieces needed to pass the agent transcript to the front end are not a part of this solution. However, you can follow the same pattern that is used to pass the customer transcript to the front end (using a websocket API Gateway endpoint and subscribing to that websocket on the front end). You will need to configure that yourself, but you have the pattern available through this solution.

YogeshDhana commented 3 years ago

@efh365 Thank you. I made a workaround, It worked. Thanks again for the wonderful response.

aman-appcino commented 3 years ago

@YogeshDhana can you help me with the same.. I am able to save the transcript to DDB but not able to get it on frontend. I tried to make a clone of lambda function ( Ai-powered-speech-analyti-wsrealtimetranscribeOnDD ) and set the trigger on "tocustomer" DDB but not able to get the data on frontend. I think DDB scan method returning empty array instead of transcript . can you help me with the same. what I need to do and get the agent transcript on front end.

YogeshDhana commented 3 years ago

@aman-appcino Please check whether the transcript is enabled for both agent and the customer. If not enable the transcripts to both and set the same trigger to both customer and the agent DDB.

aman-appcino commented 3 years ago

@YogeshDhana Thank you for reply. The transcript is enabled for both agent and the customer . and the trigger is set on both agent and customer DDB. The values are stores in agent table as well but unable to them on frontend using websocket.

YogeshDhana commented 3 years ago

@aman-appcino You have to work around with Lambda functions to get the transcripts through WebSocket messages. Please take a look at the kvs_transcribe_streaming_lambda and ws_realtime_transcribe_OnMessage lambda functions