Class VoiceTemplateConverter

java.lang.Object
net.idrnd.voicesdk.common.VoiceSdkNativePeer
net.idrnd.voicesdk.core.VoiceTemplateConverter
All Implemented Interfaces:
AutoCloseable

public class VoiceTemplateConverter extends VoiceSdkNativePeer
Converts VoiceTemplate from one configuration to another.

This class serves as gateway to native Voice SDK implementation and allocates resources on native heap. To release the allocated memory, AutoCloseable.close() method should be invoked when the instance is no longer needed.

Any method that delegates to native call may throw VoiceSdkEngineException

See Also:
  • Constructor Details

    • VoiceTemplateConverter

      public VoiceTemplateConverter(String initDataPath)
      Sole constructor. Initializes the converter object and allocates the native resources.
      Parameters:
      initDataPath - full path to the directory with SDK data
      Throws:
      VoiceSdkEngineException - wraps native exceptions
  • Method Details

    • convertVoiceTemplate

      public VoiceTemplate convertVoiceTemplate(VoiceTemplate voiceTemplate)
      Converts voice template from one configuration to another. Template init data ID should be the same as the input init data ID of the converter instance
      Parameters:
      voiceTemplate - VoiceTemplate to be converted
      Returns:
      VoiceTemplate
      Throws:
      VoiceSdkEngineException - wraps native exceptions
    • getInputInitDataId

      public String getInputInitDataId()
      Returns init data ID that voice template to be converted should have
      Returns:
      A string containing init data ID of the voice template to be converted
    • getOutputInitDataId

      public String getOutputInitDataId()
      Returns init data ID that converted voice template will have
      Returns:
      A string containing init data ID of the converted voice template