All problems
Streaming Chunk Latency
Problem
Return the algorithmic latency of a streaming model in milliseconds: (chunk_frames + lookahead_frames) * frame_shift_ms.
Zero frames give zero latency.
Hint
Both the current chunk and the lookahead frames add to the delay.
Test cases
case 1
in: [10,2,10]
expected: 120
case 2
in: [0,0,10]
expected: 0
case 3
in: [3,1,20.5]
expected: 82
case 4
in: [1,0,25]
expected: 25
Starter codePython
def streaming_chunk_latency(chunk_frames, lookahead_frames, frame_shift_ms):
# Your code here
pass4 test cases · run your code against them in the editor