Merge remote-tracking branch 'origin/dev' into feat/vad-agent

# Conflicts:
#	pyproject.toml
#	src/control_backend/main.py
#	uv.lock
This commit is contained in:
Twirre Meulenbelt
2025-10-28 10:44:03 +01:00
18 changed files with 271 additions and 95 deletions

View File

@@ -1,4 +1,4 @@
from unittest.mock import MagicMock, AsyncMock, patch
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
import zmq
@@ -20,7 +20,8 @@ def streaming(mocker):
@pytest.mark.asyncio
async def test_normal_setup(streaming):
"""
Test that during normal setup, the VAD agent creates a Streaming behavior and creates audio sockets.
Test that during normal setup, the VAD agent creates a Streaming behavior and creates audio
sockets.
"""
vad_agent = VADAgent("tcp://localhost:12345", False)
vad_agent.add_behaviour = MagicMock()
@@ -36,9 +37,10 @@ async def test_normal_setup(streaming):
@pytest.mark.parametrize("do_bind", [True, False])
def test_in_socket_creation(zmq_context, do_bind: bool):
"""
Test that the VAD agent creates an audio input socket, differentiating between binding and connecting.
Test that the VAD agent creates an audio input socket, differentiating between binding and
connecting.
"""
vad_agent = VADAgent(f"tcp://{"*" if do_bind else "localhost"}:12345", do_bind)
vad_agent = VADAgent(f"tcp://{'*' if do_bind else 'localhost'}:12345", do_bind)
vad_agent._connect_audio_in_socket()