/Windows-appsample-annotated-audio

A mini-app sample that demonstrates audio, ink, and OneDrive data roaming scenarios. This sample records audio, while allowing the synchronized capture of ink annotations, so that you can later recall what was being discussed at the time a note was taken.

Primary LanguageC#MIT LicenseMIT

page_type languages products statusNotificationTargets
sample
csharp
windows
windows-uwp
codefirst@microsoft.com

Annotated Audio app sample

A mini-app sample that demonstrates audio, ink, and OneDrive data roaming scenarios. This sample records audio while allowing the synchronized capture of ink annotations so that you can later recall what was being discussed at the time a note was taken.

Note - This sample is targeted and tested for Windows 10, version 2004 (10.0; Build 19041), and Visual Studio 2019. If you prefer, you can use project properties to retarget the project(s) to Windows 10, version 1903 (10.0; Build 18362).

When playing recorded audio, ink strokes are highlighted when the recording reaches the time when the strokes were made. Tapping on an ink stroke begins audio playback from the time that stroke was made.

Playing back audio and highlighting strokes as they were made

Features

This app showcases the following Universal Windows Platform (UWP) features.

  • Web Authentication and HttpClient to interface with the OneDrive REST API and enable roaming large amounts of data (images, audio recordings, etc.)
  • Windows Ink platform to capture audio annotations and serialize ink strokes for later recall.
  • MediaCapture to record audio in segments.
  • MediaPlaback and Playlists to playback previously captured audio segments.
  • DataCue to associate ink strokes with audio.
  • Zip Compression to package audio, ink strokes, and other metadata into a single compressed file.

Run the sample

You must associate the app sample with the Store before you can run it (see instructions below).

Note: This sample assumes you have an internet connection. Also, the platform target currently defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.

Install the correct OS and tools

  • Windows 10. Minimum: Windows 10, version 1809 (10.0; Build 17763), also known as the Windows 10 October 2018 Update.
  • Windows 10 SDK. Minimum: Windows SDK version 10.0.17763.0 (Windows 10, version 1809).
  • Visual Studio 2019 (or Visual Studio 2017). You can use the free Visual Studio Community Edition to build and run Windows Universal Platform (UWP) apps.

To get the latest updates to Windows and the development tools, and to help shape their development, join the Windows Insider Program.

Associate the app sample with the Store

This sample uses the WebAuthentication APIs that require store association. To associate the app with the Store, right click the project in Visual Studio and select Store -> Associate App with the Store. Then follow the instructions in the wizard.

Important Note You don't need to submit the app to the Store, just associate it with your account.

Navigating the sample

This sample uses the MVVM design pattern, where the XAML code binds to several properties and commands. Below is a guide to help you navigate the code.

View and ViewModel

SessionPicker.xaml and SessionPicker.xaml.cs

This page defines the UI for managing user sessions and is bound to the SessionPickerViewModel.

SessionViewer.xaml and SessionViewer.xaml.cs.

This page defines the UI for users to record and playback sessions. It is bound to SessionViewModel.cs.

Important feature components

The following classes contain the code for key sample features.

  • AudioRecordingManager.cs. This class contains the code that enables audio recording.
  • AudioPlaybackManager.cs. This class conatins the code that enables audio playback, data cues, and playlists.
  • OneDriveManager.cs. This class contains the code that enables web authentication and interaction with OneDrive using the REST API.
  • SessionViewModel.cs. This class is a ViewModel that contains all the core inking functionality.
  • Session.cs. This class is a model that represents a Session and contains core ZIP compression functionality.

Related documentation