roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Understand why reported niq latency is above target

Open gavv opened this issue 1 year ago • 8 comments

Commands:

roc-send -vv -s rtp+rs8m://lo:10001 -r rs8m://lo:10002 -c rtcp://lo:10003 -i file:stash/long.wav
roc-recv -vv -s rtp+rs8m://lo:10001 -r rs8m://lo:10002 -c rtcp://lo:10003

In roc-recv output, you will see that niq_latency is growing to 210ms and then is slowly floating around that value. Expected behavior is that it would float around 200ms (which is target latency; you can change it with --sess-latency).

However, if I dump all inputs and outputs of FreqEstimator right after its invocations, I see more expected plot:

image

(yellow is target latency, blue is actual latency).

Here is full dump: fe.txt

Columns in dump:

  • target niq latency (# of samples)
  • actual niq latency (# of samples)
  • freq_coeff returned from FreqEstimator
  • trimmed freq_coeff (according to min and max scaling) passed to Resampler

gavv avatar Sep 09 '23 13:09 gavv