5 #include <voicesdk/core/core_c_api.h>
54 typedef struct VoiceSdkVoiceTemplateFactory VoiceSdkVoiceTemplateFactory;
63 VoiceSdkVoiceTemplateFactory* VoiceSdkVoiceTemplateFactoryCreate(
const char* init_path,
char** error_msg);
75 VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateWavFile(
76 const VoiceSdkVoiceTemplateFactory* factory,
const char* wav_path, VoiceSdkChannelType channel_type,
88 VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateAudioFile(
89 const VoiceSdkVoiceTemplateFactory* factory,
const char* audio_path, VoiceSdkChannelType channel_type,
103 VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateFloatSamples(
104 const VoiceSdkVoiceTemplateFactory* factory,
const float* float_samples,
size_t num_samples,
size_t sample_rate,
105 VoiceSdkChannelType channel_type,
char** error_msg);
118 VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateSamples(
119 const VoiceSdkVoiceTemplateFactory* factory,
const int16_t* samples,
size_t num_samples,
size_t sample_rate,
120 VoiceSdkChannelType channel_type,
char** error_msg);
133 VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateBytes(
const VoiceSdkVoiceTemplateFactory* factory,
134 const uint8_t* bytes,
size_t num_bytes,
136 VoiceSdkChannelType channel_type,
148 VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryMergeVoiceTemplates(
const VoiceSdkVoiceTemplateFactory* factory,
149 VoiceSdkVoiceTemplate** voice_templates,
150 size_t num_voice_templates,
char** error_msg);
159 const char* VoiceSdkVoiceTemplateFactoryGetInitDataId(
const VoiceSdkVoiceTemplateFactory* factory,
char** error_msg);
169 bool VoiceSdkVoiceTemplateFactoryGetMinimumAudioSampleRate(
const VoiceSdkVoiceTemplateFactory* factory,
170 size_t* sample_rate,
char** error_msg);
177 void VoiceSdkVoiceTemplateFactoryRelease(VoiceSdkVoiceTemplateFactory* factory);
182 typedef struct VoiceSdkVoiceTemplateMatcher VoiceSdkVoiceTemplateMatcher;
191 VoiceSdkVoiceTemplateMatcher* VoiceSdkVoiceTemplateMatcherCreate(
const char* init_path,
char** error_msg);
203 bool VoiceSdkVoiceTemplateMatcherMatchVoiceTemplates(
const VoiceSdkVoiceTemplateMatcher* matcher,
204 const VoiceSdkVoiceTemplate* template1,
205 const VoiceSdkVoiceTemplate* template2,
215 const char* VoiceSdkVoiceTemplateMatcherGetInitDataId(
const VoiceSdkVoiceTemplateMatcher* matcher,
char** error_msg);
222 void VoiceSdkVoiceTemplateMatcherRelease(VoiceSdkVoiceTemplateMatcher* matcher);
227 typedef struct VoiceSdkVoiceVerifyStream VoiceSdkVoiceVerifyStream;
244 VoiceSdkVoiceVerifyStream* VoiceSdkVoiceVerifyStreamCreate(
const VoiceSdkVoiceTemplateFactory* factory,
245 const VoiceSdkVoiceTemplateMatcher* matcher,
246 const VoiceSdkVoiceTemplate*
const* voice_templates,
247 size_t num_templates,
size_t sample_rate,
248 size_t audio_context_length_seconds,
249 float window_length_seconds,
char** error_msg);
258 bool VoiceSdkVoiceVerifyStreamReset(
const VoiceSdkVoiceVerifyStream* verify_stream,
char** error_msg);
269 bool VoiceSdkVoiceVerifyStreamAddFloatSamples(
const VoiceSdkVoiceVerifyStream* verify_stream,
270 const float* float_samples,
size_t num_samples,
char** error_msg);
281 bool VoiceSdkVoiceVerifyStreamAddSamples(
const VoiceSdkVoiceVerifyStream* verify_stream,
const int16_t* samples,
282 size_t num_samples,
char** error_msg);
293 bool VoiceSdkVoiceVerifyStreamAddBytes(
const VoiceSdkVoiceVerifyStream* verify_stream,
const uint8_t* bytes,
294 size_t num_bytes,
char** error_msg);
303 bool VoiceSdkVoiceVerifyStreamFinalize(
const VoiceSdkVoiceVerifyStream* verify_stream,
char** error_msg);
313 bool VoiceSdkVoiceVerifyStreamHasVerifyResults(
const VoiceSdkVoiceVerifyStream* verify_stream,
bool* has_results,
326 bool VoiceSdkVoiceVerifyStreamGetVerifyResult(
const VoiceSdkVoiceVerifyStream* verify_stream,
342 bool VoiceSdkVoiceVerifyStreamGetVerifyResultForOneTemplate(
const VoiceSdkVoiceVerifyStream* verify_stream,
351 void VoiceSdkVoiceVerifyStreamRelease(VoiceSdkVoiceVerifyStream* verify_stream);
356 typedef struct VoiceSdkVoiceVerifyStreamOpus VoiceSdkVoiceVerifyStreamOpus;
370 VoiceSdkVoiceVerifyStreamOpus* VoiceSdkVoiceVerifyStreamOpusCreate(
const VoiceSdkVoiceTemplateFactory* factory,
371 const VoiceSdkVoiceTemplateMatcher* matcher,
372 const VoiceSdkVoiceTemplate* voice_template,
374 size_t audio_context_length_seconds,
384 bool VoiceSdkVoiceVerifyStreamOpusReset(
const VoiceSdkVoiceVerifyStreamOpus* verify_stream,
char** error_msg);
396 bool VoiceSdkVoiceVerifyStreamOpusAddPacket(
const VoiceSdkVoiceVerifyStreamOpus* verify_stream,
const uint8_t* bytes,
397 size_t num_bytes,
char** error_msg);
405 bool VoiceSdkVoiceVerifyStreamOpusFinalize(
const VoiceSdkVoiceVerifyStreamOpus* verify_stream,
char** error_msg);
415 bool VoiceSdkVoiceVerifyStreamOpusHasVerifyResults(
const VoiceSdkVoiceVerifyStreamOpus* verify_stream,
416 bool* has_results,
char** error_msg);
426 bool VoiceSdkVoiceVerifyStreamOpusGetVerifyResult(
const VoiceSdkVoiceVerifyStreamOpus* verify_stream,
434 void VoiceSdkVoiceVerifyStreamOpusRelease(VoiceSdkVoiceVerifyStreamOpus* verify_stream);
Definition: core_c_api.h:73
Voice verification result.
Definition: verify_c_api.h:14
float probability
Voice matching probability from 0 to 1, should be used for making a biometrics authentication decisio...
Definition: verify_c_api.h:23
float score
Raw verification score, intended to be used for evaluation and data-wise calibration.
Definition: verify_c_api.h:18
Definition: verify_c_api.h:38
VoiceSdkVerifyStreamResult * data
Array of voice verification results. Use VoiceSdkVerifyStreamResultArrayDataRelease for deallocation.
Definition: verify_c_api.h:43
size_t size
Number of elements in array.
Definition: verify_c_api.h:48
Definition: verify_c_api.h:26
VoiceSdkAudioInterval audio_interval
Audio interval covered by the verification result.
Definition: verify_c_api.h:35
VoiceSdkVerifyResult verify_result
Voice verification result.
Definition: verify_c_api.h:30