test(voice): wait for async streaming asr push
This commit is contained in:
@@ -1610,6 +1610,10 @@ def test_media_runtime_streaming_sidecar_push_does_not_block_vad_finalization():
|
|||||||
elapsed = time.monotonic() - started
|
elapsed = time.monotonic() - started
|
||||||
pcm_bytes, _ = await asyncio.wait_for(actor.turn_queue.get(), timeout=0.1)
|
pcm_bytes, _ = await asyncio.wait_for(actor.turn_queue.get(), timeout=0.1)
|
||||||
assert pcm_bytes
|
assert pcm_bytes
|
||||||
|
for _ in range(50):
|
||||||
|
if streaming_provider.push_count >= 1:
|
||||||
|
break
|
||||||
|
await asyncio.sleep(0.01)
|
||||||
await runtime._close_streaming_asr(actor, drain=False)
|
await runtime._close_streaming_asr(actor, drain=False)
|
||||||
return elapsed
|
return elapsed
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user