Microsoft Emotion API: Windows Client Library & Sample
This repo contains the Windows client library & sample for the Microsoft Emotion API, an offering within Microsoft Cognitive Services, formerly known as Project Oxford.
The Client Library
This client library is a thin C# client wrapper for the Microsoft Emotion API.
You can call the function ToRankedList from the Scores class, for example:
IEnumerable<KeyValuePair<string, float>> collection = myScores.ToRankedList();
This sample is a Windows WPF application to demonstrate the use of Microsoft Cognitive Services Emotion API. It demonstrates emotion API by specifying a URL or using a stream.
Build the sample
- Starting in the folder where you clone the repository (this folder)
- In a git command line tool, type
git submodule init(or do this through a UI)
- Pull in the shared Windows code by calling
git submodule update
- Start Microsoft Visual Studio 2015 and select
File > Open > Project/Solution.
- Go to
- Double-click the Visual Studio 2015 Solution (.sln) file EmotionAPI-WPF-Samples.
- Press Ctrl+Shift+B, or select
Build > Build Solution.
Run the sample
After the build is complete, press F5 to run the sample.
First, you must obtain a Emotion API subscription key by following the instructions on our website.
Locate the text edit box saying "Paste your subscription key here to start" on the top right corner. Paste your subscription key. You can choose to persist your subscription key in your machine by clicking "Save Key" button. When you want to delete the subscription key from the machine, click "Delete Key" to remove it from your machine.
Click on "Select Scenario" to use samples of different scenarios, and follow the instructions on screen.
Microsoft will receive the images you upload and may use them to improve Emotion API and related services. By submitting an image, you confirm you have consent from everyone in it.
We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.
You can reach out to us anytime with questions and suggestions using our communities below:
All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.
Sample images are licensed separately, please refer to LICENSE-IMAGE.
Developer Code of Conduct
Developers using Cognitive Services, including this client library & sample, are expected to follow the “Developer Code of Conduct for Microsoft Cognitive Services”, found at http://go.microsoft.com/fwlink/?LinkId=698895.