Last reviewed: 7/27/2024 10:42:27 AM

.NET UWP Applications

You can develop .NET UWP applications that manage voice marupkit using your favorite .NET UWP development tools. This includes development environments such as Microsoft Visual C# .NET and Microsoft Visual Basic .NET.

The following sections describe the steps for integrating VoiceMarkupKit with .NET UWP applications.

VoiceMarkupKit Assemblies

VoiceMarkupKit includes UWP compatible .NET assemblies to support your application's target framework.

To generate markup for Microsoft WindowsMedia synthesizers within a UWP application, add project references to the following nuget packages:

  • Select the application project in the Solution Explorer
  • Right-click the mouse and select the Manage Nuget Packages… menu item.
  • Enter Chant in the search bar.
  • Select the Chant.VoiceMarkupKit.WindowsMedia package and press the Install button.
  • Chant VoiceMarkupKit WindowsMedia package

To access the VoiceMarkupKit .NET classes within your application, add references to the VoiceMarkupKit assemblies in your code:


using System;
...
using Chant.VoiceMarkupKit.WindowsMedia;
using Chant.Shared.WindowsMedia;

Imports Chant.VoiceMarkupKit.WindowsMedia
Imports Chant.Shared.WindowsMedia
Public NotInheritable Class MainPage
...

Object Instantiation

Declare a global variable for the VoiceMarkupKit class, instantiate an instance, add the event handler, and set the credentials.


private NVoiceMarkupKit _VoiceMarkupKit = null;
private NW3CSSMLVoiceMarkup _W3CSSMLVoiceMarkup = null;
public MainPage()
{
    this.InitializeComponent();
    // Instantiate VoiceMarkupKit object
    _VoiceMarkupKit = new NVoiceMarkupKit();
    if (_VoiceMarkupKit != null)
    {
        // Set credentials
        _VoiceMarkupKit.SetCredentials("Credentials");
        // Create VoiceMarkup
        _W3CSSMLVoiceMarkup = _VoiceMarkupKit.CreateW3CSSMLVoiceMarkup();
    }
}

Public NotInheritable Class MainPage
    Inherits Page
    Dim _VoiceMarkupKit As NVoiceMarkupKit = Nothing
    Dim _W3CSSMLVoiceMarkup As NW3CSSMLVoiceMarkup = Nothing
    Public Sub New()
        Me.InitializeComponent()
        ' Instantiate VoiceMarkupKit object
        _VoiceMarkupKit = New NVoiceMarkupKit()
        If (_VoiceMarkupKit IsNot Nothing) Then
            ' Set credentials
            _VoiceMarkupKit.SetCredentials("Credentials")
            ' Create VoiceMarkups
            _W3CSSMLVoiceMarkup = _VoiceMarkupKit.CreateW3CSSMLVoiceMarkup()
        End If
    End Sub
End Class

Event Callbacks

There are no event callbacks in VoiceMarkupKit.

Development and Deployment Checklist

When developing and deploying UWP applications, you need to ensure you have a valid license. See the section License for more information about licensing Chant software.

Sample Projects

Microsoft Visual C++ sample projects that use nuget packages may be found in the following directory of the vssamples.zip download:

  • Chant\VoiceMarkupKit 10\UWP\cs and
  • Chant\VoiceMarkupKit 10\UWP\vb.