()
| 126 | await ws.send(chunk.tobytes()) |
| 127 | |
| 128 | async def recv_results(): |
| 129 | async for msg in ws: |
| 130 | data = json.loads(msg) |
| 131 | if "sentences" in data: |
| 132 | print_result(data, show_spk=args.spk) |
| 133 | if data.get("is_final") or data.get("event") == "stopped": |
| 134 | break |
| 135 | |
| 136 | send_task = asyncio.create_task(send_audio()) |
| 137 | recv_task = asyncio.create_task(recv_results()) |
no test coverage detected