Voice Methods - C++
Load a voice
You can load a voice to process the incoming audio passing as argument the name of the desired voice in this method:
1 |
VmError result=VoicemodSDK::LoadVoice("VOICE_NAME_HERE"); |
If you pass an empty string, the engine processes the audio without applying any effect.
Get presets names
You can get a full list of all the names of the voices using this method:
1 |
VoicemodSDK::GetPresetsNames(presets, numberofpresets); |
The presets variable is a pointer to char* (char**) that has to be initialized with a number of elements at its first dimension equal to the number of presets. The numberofpresets variable contains the number of available presets, and it can be obtained with this API call:
1 |
int numberofpresets=VoicemodSDK::GetNumberOfPresets(); |
Current voice
If you need to know which voice is being applied , you can call GetCurrentVoice method:
1 |
const char* currentvoice=VoicemodSDK::GetCurrentVoice(); |
Set backgrounds enabled
You can manage the background sounds of each voice calling this API method:
1 |
VoicemodSDK::SetBackgroundSoundsEnabled(enabled); |
The enabled boolean variable indicates is the background is enabled (true) or not (false);