You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is example handler. My code shows error like "handle_text_stream is not awaited."
async def handle_text_stream(reader, participant_identity):
info = reader.info
print(
f'Text stream received from {participant_identity}\n'
f' Topic: {info.topic}\n'
f' Timestamp: {info.timestamp}\n'
f' ID: {info.id}\n'
f' Size: {info.size}' # Optional, only available if the stream was sent with `send_text`
)
# Option 1: Process the stream incrementally using an async for loop.
async for chunk in reader:
print(f"Next chunk: {chunk}")
# Option 2: Get the entire text after the stream completes.
text = await reader.read_all()
print(f"Received text: {text}")
room.register_text_stream_handler(
"my-topic",
handle_text_stream
)
As the coding in Room.py, the handler is called without async context.
Here is example handler. My code shows error like "handle_text_stream is not awaited."
As the coding in
Room.py
, the handler is called without async context.The text was updated successfully, but these errors were encountered: