O'Reilly logo

Learning Microsoft Cognitive Services - Second Edition by Leif Larsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Letting the smart-house know your mood

We now have a video from the web camera available for our use. To be able to analyze emotions from it, we first need to add the Emotion API NuGet client package. Find and install the Microsoft.ProjectOxford.Emotion NuGet client package to the application.

If you have not already done so, sign up for an API key for the Emotion API here: https://portal.azure.com.

Next we want to add a new private member, which will be used to access the API features:

    private EmotionServiceClient _emotionServiceClient; 

This should be assigned in the constructor. As with the FaceServiceClient, we create a new object of this type in the MainViewModel.cs and pass it in through the constructor.

In the FrameGrabber class, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required