VoiceSDK  5.0.2
Classes | Typedefs | Functions
verify_c_api.h File Reference
#include <voicesdk/core/core_c_api.h>

Go to the source code of this file.

Classes

struct  VoiceSdkVerifyResult
 Voice verification result. More...
 
struct  VoiceSdkVerifyStreamResult
 
struct  VoiceSdkVerifyStreamResultArray
 

Typedefs

typedef struct VoiceSdkVerifyResult VoiceSdkVerifyResult
 Voice verification result. More...
 
typedef struct VoiceSdkVerifyStreamResult VoiceSdkVerifyStreamResult
 
typedef struct VoiceSdkVerifyStreamResultArray VoiceSdkVerifyStreamResultArray
 
typedef struct VoiceSdkVoiceTemplateFactory VoiceSdkVoiceTemplateFactory
 Factory for creating and merging voice templates. More...
 
typedef struct VoiceSdkVoiceTemplateMatcher VoiceSdkVoiceTemplateMatcher
 
typedef struct VoiceSdkVoiceVerifyStream VoiceSdkVoiceVerifyStream
 
typedef struct VoiceSdkVoiceVerifyStreamOpus VoiceSdkVoiceVerifyStreamOpus
 

Functions

VOICE_SDK_API VoiceSdkVoiceTemplateFactoryVoiceSdkVoiceTemplateFactoryCreate (const char *init_path, char **error_msg)
 Creates VoiceSdkVoiceTemplateFactory. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateVoiceSdkVoiceTemplateFactoryCreateVoiceTemplateWavFile (const VoiceSdkVoiceTemplateFactory *factory, const char *wav_path, VoiceSdkChannelType channel_type, char **error_msg)
 Creates a voice template from the WAV file. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateVoiceSdkVoiceTemplateFactoryCreateVoiceTemplateAudioFile (const VoiceSdkVoiceTemplateFactory *factory, const char *audio_path, VoiceSdkChannelType channel_type, char **error_msg)
 Creates a voice template from the audio file. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateVoiceSdkVoiceTemplateFactoryCreateVoiceTemplateFloatSamples (const VoiceSdkVoiceTemplateFactory *factory, const float *float_samples, size_t num_samples, size_t sample_rate, VoiceSdkChannelType channel_type, char **error_msg)
 Creates a voice template from the float audio samples. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateVoiceSdkVoiceTemplateFactoryCreateVoiceTemplateSamples (const VoiceSdkVoiceTemplateFactory *factory, const int16_t *samples, size_t num_samples, size_t sample_rate, VoiceSdkChannelType channel_type, char **error_msg)
 Creates a voice template from the PCM16 audio samples. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateVoiceSdkVoiceTemplateFactoryCreateVoiceTemplateBytes (const VoiceSdkVoiceTemplateFactory *factory, const uint8_t *bytes, size_t num_bytes, size_t sample_rate, VoiceSdkChannelType channel_type, char **error_msg)
 Creates a voice template from the byte representation of PCM16 audio samples. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateVoiceSdkVoiceTemplateFactoryMergeVoiceTemplates (const VoiceSdkVoiceTemplateFactory *factory, VoiceSdkVoiceTemplate **voice_templates, size_t num_voice_templates, char **error_msg)
 Merges multiple voice templates of a single speaker to a union voice template. More...
 
VOICE_SDK_API const char * VoiceSdkVoiceTemplateFactoryGetInitDataId (const VoiceSdkVoiceTemplateFactory *factory, char **error_msg)
 Returns ID of the init data which was used to create the factory. More...
 
VOICE_SDK_API bool VoiceSdkVoiceTemplateFactoryGetMinimumAudioSampleRate (const VoiceSdkVoiceTemplateFactory *factory, size_t *sample_rate, char **error_msg)
 Returns minimum supported input audio sampling frequency in Hz. More...
 
VOICE_SDK_API void VoiceSdkVoiceTemplateFactoryRelease (VoiceSdkVoiceTemplateFactory *factory)
 Releases VoiceSdkVoiceTemplateFactory. More...
 
VOICE_SDK_API VoiceSdkVoiceTemplateMatcherVoiceSdkVoiceTemplateMatcherCreate (const char *init_path, char **error_msg)
 Creates VoiceSdkVoiceTemplateMatcher. More...
 
VOICE_SDK_API bool VoiceSdkVoiceTemplateMatcherMatchVoiceTemplates (const VoiceSdkVoiceTemplateMatcher *matcher, const VoiceSdkVoiceTemplate *template1, const VoiceSdkVoiceTemplate *template2, VoiceSdkVerifyResult *verify_result, char **error_msg)
 Matches two voice templates one-to-one. More...
 
VOICE_SDK_API const char * VoiceSdkVoiceTemplateMatcherGetInitDataId (const VoiceSdkVoiceTemplateMatcher *matcher, char **error_msg)
 Returns ID of the init data which was used to create the matcher. More...
 
VOICE_SDK_API void VoiceSdkVoiceTemplateMatcherRelease (VoiceSdkVoiceTemplateMatcher *matcher)
 Releases VoiceSdkVoiceTemplateMatcher. More...
 
VOICE_SDK_API VoiceSdkVoiceVerifyStreamVoiceSdkVoiceVerifyStreamCreate (const VoiceSdkVoiceTemplateFactory *factory, const VoiceSdkVoiceTemplateMatcher *matcher, const VoiceSdkVoiceTemplate *const *voice_templates, size_t num_templates, size_t sample_rate, size_t audio_context_length_seconds, float window_length_seconds, char **error_msg)
 Creates VoiceSdkVoiceVerifyStream. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamReset (const VoiceSdkVoiceVerifyStream *verify_stream, char **error_msg)
 Resets stream's state. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamAddFloatSamples (const VoiceSdkVoiceVerifyStream *verify_stream, const float *float_samples, size_t num_samples, char **error_msg)
 Adds audio samples to process. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamAddSamples (const VoiceSdkVoiceVerifyStream *verify_stream, const int16_t *samples, size_t num_samples, char **error_msg)
 Adds audio samples to process. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamAddBytes (const VoiceSdkVoiceVerifyStream *verify_stream, const uint8_t *bytes, size_t num_bytes, char **error_msg)
 Adds audio samples to process. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamFinalize (const VoiceSdkVoiceVerifyStream *verify_stream, char **error_msg)
 Finalizes input audio stream to process remaining audio. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamHasVerifyResults (const VoiceSdkVoiceVerifyStream *verify_stream, bool *has_results, char **error_msg)
 Checks if there are available verification results in output queue. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamGetVerifyResult (const VoiceSdkVoiceVerifyStream *verify_stream, VoiceSdkVerifyStreamResultArray *verify_stream_result_array, char **error_msg)
 Retrieves verification result from output queue containing one verify stream result for each reference template. Use VoiceSdkVoiceVerifyStreamHasVerifyResults to know if there are available results. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamGetVerifyResultForOneTemplate (const VoiceSdkVoiceVerifyStream *verify_stream, VoiceSdkVerifyStreamResult *verify_stream_result, char **error_msg)
 Retrieves verification result from output queue consisting of single verify stream result corresponding to the zeroth reference template. Suitable for the case when the only one reference template was specified. Use VoiceSdkVoiceVerifyStreamHasVerifyResults to know if there are available results. More...
 
VOICE_SDK_API void VoiceSdkVoiceVerifyStreamRelease (VoiceSdkVoiceVerifyStream *verify_stream)
 Releases VoiceSdkVoiceVerifyStream. More...
 
VOICE_SDK_API VoiceSdkVoiceVerifyStreamOpusVoiceSdkVoiceVerifyStreamOpusCreate (const VoiceSdkVoiceTemplateFactory *factory, const VoiceSdkVoiceTemplateMatcher *matcher, const VoiceSdkVoiceTemplate *voice_template, size_t sample_rate, size_t audio_context_length_seconds, char **error_msg)
 Creates VoiceSdkVoiceVerifyStreamOpus. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusReset (const VoiceSdkVoiceVerifyStreamOpus *verify_stream, char **error_msg)
 Resets stream's state. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusAddPacket (const VoiceSdkVoiceVerifyStreamOpus *verify_stream, const uint8_t *bytes, size_t num_bytes, char **error_msg)
 Adds Opus packet to process. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusFinalize (const VoiceSdkVoiceVerifyStreamOpus *verify_stream, char **error_msg)
 Finalizes input audio stream to process remaining audio. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusHasVerifyResults (const VoiceSdkVoiceVerifyStreamOpus *verify_stream, bool *has_results, char **error_msg)
 Checks if there are available verification results in output queue. More...
 
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusGetVerifyResult (const VoiceSdkVoiceVerifyStreamOpus *verify_stream, VoiceSdkVerifyStreamResult *verify_stream_result, char **error_msg)
 Retrieves verification result from output queue. More...
 
VOICE_SDK_API void VoiceSdkVoiceVerifyStreamOpusRelease (VoiceSdkVoiceVerifyStreamOpus *verify_stream)
 Releases VoiceSdkVoiceVerifyStreamOpus. More...
 
VOICE_SDK_API void VoiceSdkVerifyStreamResultArrayDataRelease (const VoiceSdkVerifyStreamResultArray *array)
 Releases data array pointer within VoiceSdkVerifyStreamResultArray. Deallocation of array itself should be handled manually. More...
 

Typedef Documentation

◆ VoiceSdkVerifyResult

Voice verification result.

◆ VoiceSdkVerifyStreamResult

◆ VoiceSdkVerifyStreamResultArray

◆ VoiceSdkVoiceTemplateFactory

Factory for creating and merging voice templates.

◆ VoiceSdkVoiceTemplateMatcher

Matches voice templates one-to-one.

◆ VoiceSdkVoiceVerifyStream

Continuous voice verification using audio stream.

◆ VoiceSdkVoiceVerifyStreamOpus

Continuous voice verification using Opus audio stream.

Function Documentation

◆ VoiceSdkVerifyStreamResultArrayDataRelease()

VOICE_SDK_API void VoiceSdkVerifyStreamResultArrayDataRelease ( const VoiceSdkVerifyStreamResultArray array)

Releases data array pointer within VoiceSdkVerifyStreamResultArray. Deallocation of array itself should be handled manually.

Parameters
[in]arraypointer to VoiceSdkVerifyStreamResultArray for which data field is deallocated

◆ VoiceSdkVoiceTemplateFactoryCreate()

VOICE_SDK_API VoiceSdkVoiceTemplateFactory* VoiceSdkVoiceTemplateFactoryCreate ( const char *  init_path,
char **  error_msg 
)

Creates VoiceSdkVoiceTemplateFactory.

Parameters
[in]init_pathpath to the init data folder
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplateFactory* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateAudioFile()

VOICE_SDK_API VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateAudioFile ( const VoiceSdkVoiceTemplateFactory factory,
const char *  audio_path,
VoiceSdkChannelType  channel_type,
char **  error_msg 
)

Creates a voice template from the audio file.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]audio_pathpath to an audio file
[in]channel_typeaudio record channel type
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplate* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateBytes()

VOICE_SDK_API VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateBytes ( const VoiceSdkVoiceTemplateFactory factory,
const uint8_t *  bytes,
size_t  num_bytes,
size_t  sample_rate,
VoiceSdkChannelType  channel_type,
char **  error_msg 
)

Creates a voice template from the byte representation of PCM16 audio samples.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]bytesbuffer containing byte representation of PCM16 audio samples
[in]num_bytesnumber of bytes
[in]sample_rateaudio sampling rate in hz
[in]channel_typeaudio record channel type
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplate* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateFloatSamples()

VOICE_SDK_API VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateFloatSamples ( const VoiceSdkVoiceTemplateFactory factory,
const float *  float_samples,
size_t  num_samples,
size_t  sample_rate,
VoiceSdkChannelType  channel_type,
char **  error_msg 
)

Creates a voice template from the float audio samples.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]float_samplesbuffer containing normalized (from -1 to 1) float audio samples
[in]num_samplesnumber of audio samples
[in]sample_rateaudio sampling rate in hz
[in]channel_typeaudio record channel type
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplate* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateSamples()

VOICE_SDK_API VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateSamples ( const VoiceSdkVoiceTemplateFactory factory,
const int16_t *  samples,
size_t  num_samples,
size_t  sample_rate,
VoiceSdkChannelType  channel_type,
char **  error_msg 
)

Creates a voice template from the PCM16 audio samples.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]samplesbuffer containing PCM16 audio samples
[in]num_samplesnumber of audio samples
[in]sample_rateaudio sampling rate in hz
[in]channel_typeaudio record channel type
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplate* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateWavFile()

VOICE_SDK_API VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateWavFile ( const VoiceSdkVoiceTemplateFactory factory,
const char *  wav_path,
VoiceSdkChannelType  channel_type,
char **  error_msg 
)

Creates a voice template from the WAV file.

Deprecated:
Use VoiceSdkVoiceTemplateFactoryCreateVoiceTemplateAudioFile instead
Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]wav_pathpath to a wav file
[in]channel_typeaudio record channel type
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplate* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryGetInitDataId()

VOICE_SDK_API const char* VoiceSdkVoiceTemplateFactoryGetInitDataId ( const VoiceSdkVoiceTemplateFactory factory,
char **  error_msg 
)

Returns ID of the init data which was used to create the factory.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[out]error_msgoutput error message
Returns
char* or NULL in case of any errors. You don't need to free the returned string.

◆ VoiceSdkVoiceTemplateFactoryGetMinimumAudioSampleRate()

VOICE_SDK_API bool VoiceSdkVoiceTemplateFactoryGetMinimumAudioSampleRate ( const VoiceSdkVoiceTemplateFactory factory,
size_t *  sample_rate,
char **  error_msg 
)

Returns minimum supported input audio sampling frequency in Hz.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[out]sample_rateaudio sampling rate in hz
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceTemplateFactoryMergeVoiceTemplates()

VOICE_SDK_API VoiceSdkVoiceTemplate* VoiceSdkVoiceTemplateFactoryMergeVoiceTemplates ( const VoiceSdkVoiceTemplateFactory factory,
VoiceSdkVoiceTemplate **  voice_templates,
size_t  num_voice_templates,
char **  error_msg 
)

Merges multiple voice templates of a single speaker to a union voice template.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]voice_templatesarray of a single speaker voice templates
[in]num_voice_templatesnumber of templates
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplate* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateFactoryRelease()

VOICE_SDK_API void VoiceSdkVoiceTemplateFactoryRelease ( VoiceSdkVoiceTemplateFactory factory)

Releases VoiceSdkVoiceTemplateFactory.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory

◆ VoiceSdkVoiceTemplateMatcherCreate()

VOICE_SDK_API VoiceSdkVoiceTemplateMatcher* VoiceSdkVoiceTemplateMatcherCreate ( const char *  init_path,
char **  error_msg 
)

Creates VoiceSdkVoiceTemplateMatcher.

Parameters
[in]init_pathpath to the init data folder
[out]error_msgoutput error message
Returns
VoiceSdkVoiceTemplateMatcher* or NULL in case of any errors

◆ VoiceSdkVoiceTemplateMatcherGetInitDataId()

VOICE_SDK_API const char* VoiceSdkVoiceTemplateMatcherGetInitDataId ( const VoiceSdkVoiceTemplateMatcher matcher,
char **  error_msg 
)

Returns ID of the init data which was used to create the matcher.

Parameters
[in]matcherpointer to VoiceSdkVoiceTemplateMatcher
[out]error_msgoutput error message
Returns
char* or NULL in case of any errors. You don't need to free the returned string.

◆ VoiceSdkVoiceTemplateMatcherMatchVoiceTemplates()

VOICE_SDK_API bool VoiceSdkVoiceTemplateMatcherMatchVoiceTemplates ( const VoiceSdkVoiceTemplateMatcher matcher,
const VoiceSdkVoiceTemplate template1,
const VoiceSdkVoiceTemplate template2,
VoiceSdkVerifyResult verify_result,
char **  error_msg 
)

Matches two voice templates one-to-one.

Parameters
[in]matcherpointer to VoiceSdkVoiceTemplateMatcher
[in]template1pointer to first VoiceSdkVoiceTemplate
[in]template2pointer to second VoiceSdkVoiceTemplate
[out]verify_resultpointer to preallocated structure instance of VoiceSdkVerifyResult
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceTemplateMatcherRelease()

VOICE_SDK_API void VoiceSdkVoiceTemplateMatcherRelease ( VoiceSdkVoiceTemplateMatcher matcher)

Releases VoiceSdkVoiceTemplateMatcher.

Parameters
[in]matcherpointer to VoiceSdkVoiceTemplateMatcher

◆ VoiceSdkVoiceVerifyStreamAddBytes()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamAddBytes ( const VoiceSdkVoiceVerifyStream verify_stream,
const uint8_t *  bytes,
size_t  num_bytes,
char **  error_msg 
)

Adds audio samples to process.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[in]bytesbuffer containing byte representation of PCM16 audio samples
[in]num_bytesnumber of bytes
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamAddFloatSamples()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamAddFloatSamples ( const VoiceSdkVoiceVerifyStream verify_stream,
const float *  float_samples,
size_t  num_samples,
char **  error_msg 
)

Adds audio samples to process.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[in]float_samplesbuffer containing normalized (from -1 to 1) float audio samples
[in]num_samplesnumber of audio samples
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamAddSamples()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamAddSamples ( const VoiceSdkVoiceVerifyStream verify_stream,
const int16_t *  samples,
size_t  num_samples,
char **  error_msg 
)

Adds audio samples to process.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[in]samplesbuffer containing PCM16 audio samples
[in]num_samplesnumber of audio samples
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamCreate()

VOICE_SDK_API VoiceSdkVoiceVerifyStream* VoiceSdkVoiceVerifyStreamCreate ( const VoiceSdkVoiceTemplateFactory factory,
const VoiceSdkVoiceTemplateMatcher matcher,
const VoiceSdkVoiceTemplate *const *  voice_templates,
size_t  num_templates,
size_t  sample_rate,
size_t  audio_context_length_seconds,
float  window_length_seconds,
char **  error_msg 
)

Creates VoiceSdkVoiceVerifyStream.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]matcherpointer to VoiceSdkVoiceTemplateMatcher
[in]voice_templatesarray of reference voice templates to match with
[in]num_templatesnumber of reference voice templates
[in]sample_rateinput audio stream sampling frequency in Hz
[in]audio_context_length_secondslength of audio context for voice verification, must be at least window_length_seconds seconds
[in]window_length_secondslength of audio window passed to the template creation during stream processing, must be at least 0.5 seconds
[out]error_msgoutput error message
Returns
VoiceSdkVoiceVerifyStream* or NULL in case of any errors

◆ VoiceSdkVoiceVerifyStreamFinalize()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamFinalize ( const VoiceSdkVoiceVerifyStream verify_stream,
char **  error_msg 
)

Finalizes input audio stream to process remaining audio.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamGetVerifyResult()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamGetVerifyResult ( const VoiceSdkVoiceVerifyStream verify_stream,
VoiceSdkVerifyStreamResultArray verify_stream_result_array,
char **  error_msg 
)

Retrieves verification result from output queue containing one verify stream result for each reference template. Use VoiceSdkVoiceVerifyStreamHasVerifyResults to know if there are available results.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[out]verify_stream_result_arraypointer to preallocated instance of VoiceSdkVerifyStreamResultArray
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamGetVerifyResultForOneTemplate()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamGetVerifyResultForOneTemplate ( const VoiceSdkVoiceVerifyStream verify_stream,
VoiceSdkVerifyStreamResult verify_stream_result,
char **  error_msg 
)

Retrieves verification result from output queue consisting of single verify stream result corresponding to the zeroth reference template. Suitable for the case when the only one reference template was specified. Use VoiceSdkVoiceVerifyStreamHasVerifyResults to know if there are available results.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[out]verify_stream_result_arraypointer to preallocated instance of VoiceSdkVerifyStreamResult
[out]error_msgoutput error message
Note
Behaves the same as VoiceSdkVoiceVerifyStreamGetVerifyResult in IDVoice < 3.13, if only one reference template was set
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamHasVerifyResults()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamHasVerifyResults ( const VoiceSdkVoiceVerifyStream verify_stream,
bool *  has_results,
char **  error_msg 
)

Checks if there are available verification results in output queue.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[out]has_resultstrue is there are results available, false otherwise
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamOpusAddPacket()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusAddPacket ( const VoiceSdkVoiceVerifyStreamOpus verify_stream,
const uint8_t *  bytes,
size_t  num_bytes,
char **  error_msg 
)

Adds Opus packet to process.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStreamOpus
[in]bytesbuffer containing single Opus packet. It is expected that packet contains data for single mono stream
[in]num_bytesnumber of bytes
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamOpusCreate()

VOICE_SDK_API VoiceSdkVoiceVerifyStreamOpus* VoiceSdkVoiceVerifyStreamOpusCreate ( const VoiceSdkVoiceTemplateFactory factory,
const VoiceSdkVoiceTemplateMatcher matcher,
const VoiceSdkVoiceTemplate voice_template,
size_t  sample_rate,
size_t  audio_context_length_seconds,
char **  error_msg 
)

Creates VoiceSdkVoiceVerifyStreamOpus.

Parameters
[in]factorypointer to VoiceSdkVoiceTemplateFactory
[in]matcherpointer to VoiceSdkVoiceTemplateMatcher
[in]voice_templatereference voice template to match with
[in]sample_rateinput audio stream sampling frequency in Hz. Must be one of 8000, 12000, 16000, 24000 or 48000
[in]audio_context_length_secondslength of audio context for voice verification, must be at least 3 seconds
[out]error_msgoutput error message
Returns
VoiceSdkVoiceVerifyStreamOpus* or NULL in case of any errors

◆ VoiceSdkVoiceVerifyStreamOpusFinalize()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusFinalize ( const VoiceSdkVoiceVerifyStreamOpus verify_stream,
char **  error_msg 
)

Finalizes input audio stream to process remaining audio.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStreamOpus
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamOpusGetVerifyResult()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusGetVerifyResult ( const VoiceSdkVoiceVerifyStreamOpus verify_stream,
VoiceSdkVerifyStreamResult verify_stream_result,
char **  error_msg 
)

Retrieves verification result from output queue.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStreamOpus
[out]verify_stream_resultpointer to preallocated structure instance of VoiceSdkVerifyStreamResult
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamOpusHasVerifyResults()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusHasVerifyResults ( const VoiceSdkVoiceVerifyStreamOpus verify_stream,
bool *  has_results,
char **  error_msg 
)

Checks if there are available verification results in output queue.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStreamOpus
[out]has_resultstrue is there are results available, false otherwise
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamOpusRelease()

VOICE_SDK_API void VoiceSdkVoiceVerifyStreamOpusRelease ( VoiceSdkVoiceVerifyStreamOpus verify_stream)

Releases VoiceSdkVoiceVerifyStreamOpus.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStreamOpus

◆ VoiceSdkVoiceVerifyStreamOpusReset()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusReset ( const VoiceSdkVoiceVerifyStreamOpus verify_stream,
char **  error_msg 
)

Resets stream's state.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStreamOpus
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors

◆ VoiceSdkVoiceVerifyStreamRelease()

VOICE_SDK_API void VoiceSdkVoiceVerifyStreamRelease ( VoiceSdkVoiceVerifyStream verify_stream)

Releases VoiceSdkVoiceVerifyStream.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream

◆ VoiceSdkVoiceVerifyStreamReset()

VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamReset ( const VoiceSdkVoiceVerifyStream verify_stream,
char **  error_msg 
)

Resets stream's state.

Parameters
[in]verify_streampointer to VoiceSdkVoiceVerifyStream
[out]error_msgoutput error message
Return values
trueif the invocation was successful, false in case of any errors