I have been able to get various stats (Jitter, RTT, Packet lost, etc) of WebRTC audio call using RTCPeerConnection.getStats() API.
I need to rate the overall call quality as Excellent, Good, Fair, or Poor.
Is there a formula that uses WebRTC stats to give a overall rating? if not, which of the WebRTC stat(s) that I should give more weightage?
We ended up using MOS (mean opinion score) algorithm to calculate voice call quality metric.
Here is the formula we used -
Take the average latency, add jitter, but double the impact to latency then add 10 for protocol latencies EffectiveLatency = ( AverageLatency + Jitter * 2 + 10 )
Implement a basic curve - deduct 4 for the R value at 160ms of latency (round trip). Anything over that gets a much more agressive deduction if EffectiveLatency < 160 then R = 93.2 - (EffectiveLatency / 40) else R = 93.2 - (EffectiveLatency - 120) / 10
Now, let's deduct 2.5 R values per percentage of packet loss R = R - (PacketLoss * 2.5)
Convert the R into an MOS value.(this is a known formula) MOS = 1 + (0.035) * R + (.000007) * R * (R-60) * (100-R)
We found the formula from https://www.pingman.com/kb/article/how-is-mos-calculated-in-pingplotter-pro-50.html