A Bengaluru techie has built an AI-powered device to deter public smoking by detecting smokers in real time and playing audio clips to shame or alert them. The Raspberry Pi-based system uses YOLOv8 and MediaPipe and has gone viral on social media.
In an unusual blend of humour and artificial intelligence, a techie from Bengaluru has developed an AI-powered device aimed at discouraging public smoking. Frustrated by people smoking in public spaces despite restrictions, the developer created a smart system that detects smokers in real time and plays audio clips to embarrass or alert them. The project, which combines computer vision and audio generation tools, has now gone viral on social media, drawing praise for its creativity and innovation.

“I Hate Public Smoking”: The Idea Behind the Device
The techie, identified as Pankaj, shared details of his project on X, explaining the motivation behind it.
"I HATE people smoking around me in public. So I built a device that plays audio of a baby coughing and Granny abusing in the local language whenever it detects someone smoking nearby. It does person detection, spots a cigarette in hand, and detects smoking gesture. all in real-time," he wrote on X.
Technology Behind the Project
Pankaj revealed that the system uses YOLOv8 and MediaPipe for real-time person detection and gesture recognition, along with fine-tuning for improved accuracy. The device runs on a Raspberry Pi, making it compact and portable.
For audio generation, he used Bulbul v3 and selected the Kavya voice for a heavier tone. He further enhanced the sound using pitch shift, speed adjustments, and compression in Python to create a more intense effect.
He also mentioned his earlier experimentation with document intelligence tools in another project, where he used Sarvam-M to identify Indian dish names from wedding buffet labels. He stated that it performed better than GPT-4o in understanding Hindi and regional dish names.
Tested in Public
According to Pankaj, the prototype was tested at a bus stand, where one individual reportedly became confused after hearing the coughing and scolding audio and eventually put out his cigarette.
He clarified that the demo was conducted using public photos and did not feature real individuals for privacy reasons. He is currently working on a 3D-printed prototype to convert the concept into a small standalone device.
How Did Social Media React?
One user commented: “Amazing creativity and product.”
Second user commented: “I love how you summarise things in your writing along with your projects.”
Third user commented: “That could be a great implementation at lest to places that have signs with no smoking area and people still do.”
The innovative device has sparked discussions online about the role of artificial intelligence in promoting public discipline and addressing everyday civic issues. Although still in its early stages, the Bengaluru techie’s anti-smoking gadget demonstrates how emerging technologies can be used creatively to influence behaviour in public spaces.


