kirk | 2023-02-21 00:40:15 UTC | #1
I'm working on an integration where I need to download the recorded audio from Genesys in WAV_ULAW format. Once I have the recording, I need to only keep relevant parts of the recording (I.e. customer and agent talking).
Using the Conversation API I can get the conversation details: GET /api/v2/conversations/:conversation_id
This returns all of the relevant participant data I need.
Then I get the recording metadata by going to: GET /api/v2/conversations/:conversation_id/recordingmetadata
This gets me the recording ID. Finally I go to: GET /api/v2/conversations/:conversationid/recordings/:recordingid?formatId=WAV_ULAW&download=true
All of this is great up to this point and now I have the recording in WAV format.
Using Date Time calculations, I take the Customers startTime from above, and the Agents startTime, and calculate the difference between the two times. I would think at this point, I can then go to that calculated offset in the WAV file and SNIP anything before it, and using the Agents endTime get the duration of this conversation, and SNIP anything after the duration.
The problem I'm facing is using the Customers startTime and Agent's startTime and going into the WAV file, th e conversation has already started. This is variable too, meaning I might miss 9 seconds of a call, or I might miss 42 seconds of the beginning of the call on a different recording. Rarely, am I getting the very beginning of the conversation between the customer and the agent.
Any suggestions? Has anyone experienced this before?
Edit: I should mention, I also checked the startTime and endTime with the data returned from /api/v2/conversations/:conversation_id/recordingmetadata , and those times are within milliseconds of the customers startTime/endTime.
Thanks Kirk
tim.smith | 2023-02-21 21:40:19 UTC | #2
Keep in mind that the start/end time of a participant bears no actual relation to the start/end time of a recording. They are separate things and will never match exactly. This means you have to determine the offset between the start of the participant segment and the start of the recording and factor that in accordingly when measuring durations.
If you believe the timestamps are incorrect or the audio doesn't line up with the timestamps accurately, please open a case with Genesys Cloud Care to investigate further as customer-specific data cannot be investigated via the forum.
kirk | 2023-02-22 02:57:40 UTC | #3
Hi Tim, Thanks for the feedback. I understand it might not match exactly to the recording, and thats ok. It's where we have 9 seconds or 42 seconds where it's way off.
Let me ask you this. Does a Secure Pause (being used in the IVR to prevent the customer from being recorded) CUT the audio out of the recording for the duration of the Secure Pause?
I do see this:
"annotations": [ { "id": "adsfasfasfsadfasdfasdf", "type": "Pause", "location": 1540, "durationMs": 52911, "absoluteLocation": 1140, "absoluteDurationMs": 52911, "recordingLocation": 1540, "recordingDurationMs": 0, "description": "Secure Pause", "reason": "SecurePause", "realtimeLocation": 1160 } ],
Is this what I'm running up against? It seems in this case the SecurePause is 52 seconds.
I look forward to your feedback.
system | 2023-03-25 02:58:24 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 18494