Microsoft was granted a patent last week by the United States Patent and Trademark Office for a pair of glasses that can detect a wearer’s emotional response to what they’re looking at.

In patent talk, the thing is called a wearable emotion detection and feedback system.

If you are watching TV and suddenly soccer comes on, your posture may change and you may smile. The system will be able to identify a change in your emotional state.

“During interactions, the device, recognizes emotional states in subjects by comparing detected sensor input against a database of human/primate gestures/expressions, posture, and speech,” the patent reads. “Feedback is provided to the wearer after interpretation of the sensor input.”

Once the database determines the emotional response, various kinds of corresponding content can be pushed into the user’s view.

It can work the other way, too. If the wearer is looking at a person through the glasses, the emotional state of that person can be detected, either by their posture or facial expression.

So if the wearer is giving a speech, say, and the glasses detect that audience members look bored, the specs my suggest a joke for the speaker to insert into the speech.