pipecat-ai / pipecat

Open Source framework for voice and multimodal conversational AI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If the user turns off the camera, the UserImageRequestFrame becomes useless

linyubupa opened this issue · comments

If the user turns off the camera, the UserImageRequestFrame becomes useless, causing the entire pipeline to hang due to the absence of an ImageRawFrame. Do you have any suggestions to solve this issue

how can I know user's camera is off

That's a good one.... If you are using DailyTransport we need to expose on_participant_updated. Then you can add a handler for it and check the state of the microphone. So, participant["media"]["camera"]["state"]

https://reference-python.daily.co/types.html#participant
https://reference-python.daily.co/types.html#participantmedia