fix: make VAD unit tests work after changes

Namely, the Streamer has to be marked ready.

ref: N25B-216
This commit is contained in:
Twirre Meulenbelt
2025-10-30 16:40:45 +01:00
parent 86938f79c0
commit 4ffe3b2071
2 changed files with 4 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ async def test_real_audio(mocker):
audio_out_socket = AsyncMock()
vad_streamer = Streaming(audio_in_socket, audio_out_socket)
vad_streamer._ready = True
for _ in audio_chunks:
await vad_streamer.run()

View File

@@ -21,7 +21,9 @@ def streaming(audio_in_socket, audio_out_socket):
import torch
torch.hub.load.return_value = (..., ...) # Mock
return Streaming(audio_in_socket, audio_out_socket)
streaming = Streaming(audio_in_socket, audio_out_socket)
streaming._ready = True
return streaming
async def simulate_streaming_with_probabilities(streaming, probabilities: list[float]):