Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/test_transcription_delay_anchor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
_compute_end_of_turn_metrics,
)

pytestmark = pytest.mark.unit
pytestmark = [pytest.mark.unit, pytest.mark.no_concurrent]

# the anchor rules are shared by both modes, so every test asserts both
both_modes = pytest.mark.parametrize("mode", ["vad", "stt"])
Expand Down Expand Up @@ -163,10 +163,11 @@ async def test_usable_provider_timestamp_replaces_the_anchor_only_in_stt_mode(mo


@both_modes
async def test_skewed_provider_timestamp(mode: str) -> None:
async def test_skewed_provider_timestamp(mode: str, monkeypatch: pytest.MonkeyPatch) -> None:
# the provider's audio clock runs ahead of wall clock: end_time maps into the
# future and the estimate clamps to `now`, zeroing the delay
now = time.time()
monkeypatch.setattr(audio_recognition.time, "time", lambda: now)
ar = _make_recognition(vad=MagicMock(), input_started_at=now - 10.0, mode=mode)
vad_anchor = now - 0.6
ar._last_speaking_time = vad_anchor
Expand Down
Loading