feat: establish voice assistant V1 baseline

This commit is contained in:
2026-10-09 18:31:21 +00:00
commit cebcb3fd61
57 changed files with 9501 additions and 0 deletions

32
tests/test_tts_adapter.py Normal file
View File

@@ -0,0 +1,32 @@
import pytest
from voice_assistant.tts import MockTTSAdapter
@pytest.mark.anyio
async def test_mock_tts_synthesizes_audio_chunks():
tts= MockTTSAdapter()
chunks = [
chunk
async for chunk in tts.synthesize("Olá, tudo bem?")
]
assert chunks == [
b"\x01\x02\x03\x04",
b"\x05\x06\x07\x08",
]
@pytest.mark.anyio
async def test_mock_tts_records_text():
tts = MockTTSAdapter()
chunks = [
chunk
async for chunk in tts.synthesize("Olá")
]
assert chunks
assert tts.calls == ["Olá"], "A mensagem de retorno deve ser Olá"