Files
Meeting-AI-Orchestration-Demo/backend/app/simulator.py
2026-06-27 13:50:11 +03:00

26 lines
788 B
Python

import asyncio
import json
from datetime import datetime
import websockets
TRANSCRIPT = [
{"speaker": "Bride", "text": "Add a note that the customer prefers white flowers."},
{"speaker": "Planner", "text": "Create a task for Maria to confirm the photographer."},
{"speaker": "Groom", "text": "We should reserve the venue for July 15."},
{"speaker": "Bride", "text": "I'll call the florist tomorrow."},
]
async def main() -> None:
async with websockets.connect("ws://localhost:9000/ws/transcript") as socket:
for item in TRANSCRIPT:
await socket.send(json.dumps({**item, "timestamp": datetime.utcnow().isoformat()}))
print(await socket.recv())
await asyncio.sleep(1)
if __name__ == "__main__":
asyncio.run(main())