Getting Started with Windows C# SDK

Welcome to our Windows SDK documentation for C#.

 

Add SDK to your project

Visual Studio 2017 IDE
The Voicemod Windows SDK is distributed with one file:

  • VoicemodSDKDotNET.dll

You need to modify the configuration properties of your C# project to get our SDK integrated following the next steps:

  1. First, you have to include the dll file to the project. To do so, right-click References -> Add Reference. Then, Browse until the directory of the dll and select VoicemodSDKDotNET.dll.
  2. Into your object files, you need to add a using statement, in order to have access to the SDK’s namespace. Thus, on top of your cs file, add the following line:
  3. Start using the SDK!

Moreover, you have the VoicemodSDKDotNET.xml and VoicemodSDKDotNET.pdb files.Their purpose is to have additional documentation and debug information. They are automatically included when adding the dll reference.

 

Initialize and Destroy the SDK

Our C# SDK uses the VoicemodSDKDotNET namespace to access all methods.
As your first API call, you have to call InitEngine method with your own Client Key and your own application bundle id like this:

The BundleId is a string that is set up during development, usually in the form of com.company-name.windows-app-name
The ClientKey is a string generated by our system and unique for each developer.
You need to pass a delegate as third parameter to be asynchronously notified if the session checking fails because of the state of your license. The callback will be only notified if the client key checking fails. Luckily, we created the type ErrorCallback for you to use.

This element can be used the following way:

Your method has to have the following prototype:

Before closing your application, as last API call, you have to free resources related with the SDK calling DestroyEngine method:

 

Get session status

You can periodically track the checking of your client key calling this API method:

This API call informs you through a SessionStatus variable type about the state of the validation of your client key and if the engine is processing the input audio or not.

 

Processing Modes

Depending on your needs we have created two different ways to use our Audio Engine.

The Stand-alone Audio Processing is in case you already have an audio capture process and you just need the Audio Engine to pass the audio data to be transform with our voices and have access to the audio data transformed.

This mode is not recommended for C#, since it uses pointers and is more time intensive. Moreover, we did this part for you!

The Live Processing is in case you are starting from scratch and you want our Audio Engine to capture and render audio through the input device, transform the audio with our voices and send back the audio to the output device.