Call Center SDK
1.11.3
|
Class for creating and merging voice templates. More...
#include <voicesdk/verify/verify.h>
Public Types | |
using | Ptr = std::shared_ptr< VoiceTemplateFactory > |
Public Member Functions | |
virtual VoiceTemplate::Ptr | createVoiceTemplate (const std::string &audioPath, const ChannelType &channelType=ChannelType::TEL) const =0 |
Creates a voice template from the given audio file. More... | |
virtual VoiceTemplate::Ptr | createVoiceTemplate (const float *floatSamples, size_t numSamples, size_t sampleRate, const ChannelType &channelType=ChannelType::TEL) const =0 |
Creates a voice template from the given float audio samples. More... | |
virtual VoiceTemplate::Ptr | createVoiceTemplate (const int16_t *pcm16Samples, size_t numSamples, size_t sampleRate, const ChannelType &channelType=ChannelType::TEL) const =0 |
Creates a voice template from the given PCM16 audio samples. More... | |
virtual VoiceTemplate::Ptr | createVoiceTemplate (const uint8_t *pcm16Bytes, size_t numBytes, size_t sampleRate, const ChannelType &channelType=ChannelType::TEL) const =0 |
Creates a voice template from the given byte representation of PCM16 audio samples. More... | |
virtual std::vector< VoiceTemplate::Ptr > | createVoiceTemplateBatch (const std::vector< VerifyFileBatchElement > &input_batch) const =0 |
Creates a voice template from the given batch of WAV files. More... | |
virtual std::vector< VoiceTemplate::Ptr > | createVoiceTemplateBatch (const std::vector< VerifySamplesBatchElement< float >> &input_batch) const =0 |
Creates a voice template from the given batch of float audio samples. More... | |
virtual std::vector< VoiceTemplate::Ptr > | createVoiceTemplateBatch (const std::vector< VerifySamplesBatchElement< int16_t >> &input_batch) const =0 |
Creates a voice template from the given batch of PCM16 audio samples. More... | |
virtual std::vector< VoiceTemplate::Ptr > | createVoiceTemplateBatch (const std::vector< VerifySamplesBatchElement< uint8_t >> &input_batch) const =0 |
Creates a voice template from the given batch of byte representation PCM16 audio samples. More... | |
virtual VoiceTemplate::Ptr | mergeVoiceTemplates (const std::vector< VoiceTemplate::Ptr > &voiceTemplates) const =0 |
Merges multiple voice templates of a single speaker to a union voice template. More... | |
virtual const std::string & | getInitDataId () const =0 |
Returns ID of the init data, which was used to create the factory. More... | |
virtual const size_t & | getMinimumAudioSampleRate () const =0 |
Returns minimum supported input audio sampling frequency in Hz. More... | |
Static Public Member Functions | |
static Ptr | create (const std::string &initPath) |
Factory method. More... | |
Class for creating and merging voice templates.
|
static |
Factory method.
initPath | Path to the init data folder |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given float audio samples.
floatSamples | A buffer containing normalized (from -1 to 1) float audio samples |
numSamples | Number of audio samples |
sampleRate | Audio sampling rate in Hz |
channelType | Audio record channel type |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given PCM16 audio samples.
pcm16Samples | A buffer containing PCM16 audio samples |
numSamples | Number of audio samples |
sampleRate | Audio sampling rate in Hz |
channelType | Audio record channel type |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given audio file.
audioPath | Path to audio file |
channelType | Audio record channel type |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given byte representation of PCM16 audio samples.
pcm16Bytes | A buffer containing byte representation of PCM16 audio samples |
numBytes | Number of bytes |
sampleRate | Audio sampling rate in Hz |
channelType | Audio record channel type |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given batch of WAV files.
input_batch | A vector of VerifyFileBatchElement |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given batch of float audio samples.
input_batch | A vector of VerifySamplesBatchElement<float> |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given batch of PCM16 audio samples.
input_batch | A vector of VerifySamplesBatchElement<int16_t> |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Creates a voice template from the given batch of byte representation PCM16 audio samples.
input_batch | A vector of VerifySamplesBatchElement<uint8_t> |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Returns ID of the init data, which was used to create the factory.
|
pure virtual |
Returns minimum supported input audio sampling frequency in Hz.
|
pure virtual |
Merges multiple voice templates of a single speaker to a union voice template.
voiceTemplates | vector of speaker's voice templates |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |