Files
voiceagent/src/voice_assistant/tts/mock.py

18 lines
378 B
Python

from collections.abc import AsyncIterator
from .adapter import TTSAdapter
class MockTTSAdapter(TTSAdapter):
def __init__(self) -> None:
self.calls: list[str] = []
async def synthesize(
self,
text: str,
) -> AsyncIterator[bytes]:
self.calls.append(text)
yield b"\x01\x02\x03\x04"
yield b"\x05\x06\x07\x08"