lively-terabyte-73999
08/14/2025, 7:33 AMtall-airline-16756
08/14/2025, 7:33 AMtall-airline-16756
08/14/2025, 7:33 AM"ignoring text stream with topic 'chat', no callback attached"
, pops up when a text stream comes in but there’s no handler set up to deal with it. To fix this, you just need to register a text stream handler using the register_text_stream_handler
method before the stream arrives.
Here’s how to do it:
1. Register the handler: Use room.register_text_stream_handler()
with the topic and your callback function.
2. Implement the callback: This function will take care of any incoming text streams for that topic.
Check out this Python example:
async def handle_text_stream(reader: TextStreamReader, participant_identity: str):
# Read all text from the stream
text = await reader.read_all()
print(f"Received text from {participant_identity}: {text}")
# Register the handler for the 'chat' topic
room.register_text_stream_handler('chat', handle_text_stream)
If you want a hand setting this up or run into any snags, just let me know—I’m here to help!