Universal Windows Platform (UWP) sample app that shows usage of speech, Cortana, ink, and camera through a family note sharing scenario.
C#
Latest commit 5b06af4 Nov 9, 2016 @KarlErickson KarlErickson added UWP boilerplate

README.md

FamilyNotes sample

A mini-app that explores different input modalities and scenarios of user awareness. A bulletin-board app that allows family members to leave notes for each other on a common PC/tablet just like they would on a bulletin board. Using text, speech, ink, or pictures, a user can create a note and tag it for another user. Later when that other user approaches the PC/Tablet, the app uses imaging APIs and the Microsoft Cognitive Services (Face API) to detect their presence and display the notes that have been left for them, effectively filtering based on facial recognition. While the app is open, users can naturally interact with it using speech (“Add note for Bob”). If the app isn’t open, a user can easily launch it and interact with it using Cortana.

This sample runs on the Universal Windows Platform (UWP).

Using Ink, Voice, and Face Recognition in a UWP Video

Be aware that the image understanding capabilities of the FamilyNotes app use Microsoft Cognitive Services. Microsoft will receive the images and other data that you upload (via this app) for service improvement purposes. To report abuse of the Microsoft Face APIs to Microsoft, please visit the Microsoft Cognitive Services website at www.microsoft.com/cognitive-services, and use the “Report Abuse” link at the bottom of the page to contact Microsoft. For more information about Microsoft privacy policies please see the privacy statement here: http://go.microsoft.com/fwlink/?LinkId=521839.

FamilyNotes MainPage

Features

The FamilyNotes app demonstrates:

Universal Windows Platform development

This sample requires Visual Studio 2015 and the Windows Software Development Kit (SDK) for Windows 10.

Get a free copy of Visual Studio 2015 Community Edition with support for building Universal Windows apps

Additionally, to be informed of the latest updates to Windows and the development tools, join the Windows Insider Program.

Running the sample

The default project is FamilyNotes and you can Start Debugging (F5) or Start Without Debugging (Ctrl+F5) to try it out. The app will run in the emulator or on physical devices, though functionality related to speech and face recognition is dependent on hardware support and the app has not yet been designed for a phone layout.

Requirements

  • User filtering by facial recognition requires:
    • A front-facing camera or USB webcam.
    • A subscription key for the Microsoft Face API. For information about getting a free trial key, see the Microsoft Cognitive Services site.
    • A user created with a profile picture for your phase, or an user you want to be recognized.
      Note: The Microsoft Face API subscription key must be entered in the Settings menu of the app before facial recognition can be used. The settings menu is opened by clicking the gear button on the apps command bar.
  • Speech recognition requires:
    • A microphone and the appropriate settings enabled on the local machine.
  • Cortana requires:
    • The app must be launched once to register the Cortana voice commands for subsequent activation through Cortana.
    • The Cortana voice command phrase list is updated dynamically whenever a family member is added or removed.

Articles

The FamilyNotes app illustrates a number of platform features. For more detailed articles about those features and their use within the app, see the following articles.

Also, some additional discussion and information about the sample is available on the Windows Developer blog in the following posts.

Code at a glance

If you are interested in code snippets and don’t want to browse or run the full sample, check out the following files for examples of some highlighted features:

  • Settings.cs : Downloads the Bing image of the day and allows for app config such as storing the developer key for the Microsoft Face API.
  • BindableInkCanvas.cs : An InkCanvas control with a bindable InkStrokeContainer.
  • Utils.cs : Delete a directory and its contents.
  • App.xaml.cs : Saves/loads the people and their notes. Demonstrates serialization and how to handle saving multiple InkStrokeContainers to a stream.
  • AddPersonContentDialog.xaml.cs : Contains the add person dialog, which has an option to take a snapshot for a user when adding him or her. This picture is taken using the CameraCaptureUI.
  • UserPresence.cs : Contains the code that is responsible for taking pictures in the background. These pictures are then used for user identification.
  • FacialSimilarity.cs : Contains the code used to interact with the Microsoft Face APIs for the purpose of comparing a dynamically captured user image against a list of known users to obtain the most likely user present.

See also

Microsoft Cognitive Services
Microsoft Cognitive Services samples
Cortana interactions
Cortana voice command sample
Pen and stylus interactions
Simple ink sample
Complex ink sample
Speech recognition and synthesis sample