Skip Navigation

Emotion

Analyse faces to detect a range of feelings and personalise your app's responses.

Recognise emotions in images

The Emotion API takes a facial expression in an image as an input and returns the confidence across a set of emotions for each face in the image, as well as bounding box for the face, using the Face API. If a user has already called the Face API, they can submit the face rectangle as an optional input.

The emotions detected are anger, contempt, disgust, fear, happiness, neutral, sadness and surprise. These emotions are understood to be cross-culturally and universally communicated with particular facial expressions.

See it in action

Anger 0.00001
Contempt 0.00012
Disgust 0.00003
Fear 0.00059
Happiness 0.06631
Neutral 0.00555
Sadness 0.00001
Surprise 0.92739
Detection result:
1 faces detected

JSON:
[ { "faceRectangle": { "top": 141, "left": 130, "width": 162, "height": 162 }, "scores": { "anger": 9.29041E-06, "contempt": 0.000118981574, "disgust": 3.15619363E-05, "fear": 0.000589638, "happiness": 0.06630674, "neutral": 0.00555004273, "sadness": 7.44669524E-06, "surprise": 0.9273863 } } ]

Want to build this?

Recognise emotions in video

You can use the Emotion API to track how a person or a crowd responds to your content over time. The emotions detected are anger, contempt, disgust, fear, happiness, neutral, sadness and surprise.

Recognise emotions in video by extracting frames of a video and then sending those frames to the API. Get results faster and quickly start coding using our sample on GitHub.

Learn More

See it in action

Want to build this?

Explore the Cognitive Services APIs

Computer Vision

Distill actionable information from images

Face

Detect, identify, analyse, organise, and tag faces in photos

Video Indexer PREVIEW

Unlock video insights

Content Moderator

Automated image, text and video moderation

Custom Vision PREVIEW

Easily customise your own state-of-the-art computer vision models for your unique use case

Text Analytics

Easily evaluate sentiment and topics to understand what users want

Translator Text

Easily conduct machine translation with a simple REST API call

Bing Spell Check

Detect and correct spelling mistakes in your app

Content Moderator

Automated image, text and video moderation

Language Understanding

Teach your apps to understand commands from your users

Bing Speech

Convert speech to text and back again to understand user intent

Speaker Recognition PREVIEW

Use speech to identify and verify individual speakers

Translator Speech

Easily conduct real-time speech translation with a simple REST API call

Custom Speech PREVIEW

Overcome speech recognition barriers like speaking style, background noise and vocabulary

Speech Services PREVIEW

Unified speech services for speech-to-text, text-to-speech and speech translation

QnA Maker

Distill information into conversational, easy-to-navigate answers

Ready to supercharge your app?