hello team
recently, we had a requirement of downloading record audio for objectives below
- target conversation which multiple agents involved
(ex. mutiple call transfers of ivr,acd included in between) - audio should be seperated by exact range of each agent's own call part
for achieving objectives above, our approach is below
- get conversation details (Conversation/Analytics API)
-> classify each agent's connected/disconnected time - get recording details (Recordings API)
- check "annotations" list from recording metadata
-> classify/gather location & duration of eliminated pauses from actual audio file - add silence bytes into downloaded audio file at positions according to "annotations"
-> for the purpose of extracting range of audio for conversation event's connected/disconnected time
proceeding above approach, we had some issues
- recording/event duration (endtime - starttime) versus
downloaded audio file duration + annotations cumulated pause duration
differs 10 seconds - unable to find out which annotation's duration causes difference above
- as a result, extracted audio range by each agent's connected/disconnected time
mismatches the actual audio position
(lastest part has 10 seconds cut off at the end)
are there any suggestions or other approaches to achive objectives above ?
"startTime": "2024-08-12T00:05:43.999Z",
"endTime": "2024-08-12T00:22:51.905Z",
"media": "audio",
"annotations": [
{
"id": "********-7f3b-4309-8f78-************",
"type": "Pause",
"location": 400,
"durationMs": 690,
"absoluteLocation": 0,
"absoluteDurationMs": 690,
"recordingLocation": 400,
"recordingDurationMs": 0,
"description": "Flow Or Queue",
"reason": "FlowOrQueue",
"realtimeLocation": 0
},
{
"id": "********-7f3b-4309-8f78-************",
"type": "Pause",
"location": 58500,
"durationMs": 126136,
"absoluteLocation": 58100,
"absoluteDurationMs": 126136,
"recordingLocation": 58500,
"recordingDurationMs": 0,
"description": "Flow Or Queue",
"reason": "FlowOrQueue",
"realtimeLocation": 57284
},
{
"id": "********-7f3b-4309-8f78-************",
"type": "Pause",
"location": 75060,
"durationMs": 126473,
"absoluteLocation": 74660,
"absoluteDurationMs": 126473,
"recordingLocation": 75060,
"recordingDurationMs": 0,
"description": "Flow Or Queue",
"reason": "FlowOrQueue",
"realtimeLocation": 198517
},
{
"id": "********-7f3b-4309-8f78-************",
"type": "Pause",
"location": 91380,
"durationMs": 115812,
"absoluteLocation": 90980,
"absoluteDurationMs": 115812,
"recordingLocation": 91380,
"recordingDurationMs": 0,
"description": "Flow Or Queue",
"reason": "FlowOrQueue",
"realtimeLocation": 339850
},
{
"id": "********-7f3b-4309-8f78-************",
"type": "Pause",
"location": 213000,
"durationMs": 9800,
"absoluteLocation": 212600,
"absoluteDurationMs": 9800,
"recordingLocation": 213000,
"recordingDurationMs": 0,
"description": "Flow Or Queue",
"reason": "FlowOrQueue",
"realtimeLocation": 575808
},
{
"id": "********-7f3b-4309-8f78-************",
"type": "Pause",
"location": 354940,
"durationMs": 107735,
"absoluteLocation": 354540,
"absoluteDurationMs": 107735,
"recordingLocation": 354940,
"recordingDurationMs": 0,
"description": "Flow Or Queue",
"reason": "FlowOrQueue",
"realtimeLocation": 726104
}
]