Yolov8 and object notification

I have been trying to create a notification for when a specific object is detected, which I was able to do using class id’s. However I want the notification to occur in real time and I have been unable to figure out how to get the notification and the algorithm to sink up in real time. Please let me know if anyone has any suggestions.