VoiceSDK
5.0.2
|
#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 VoiceSdkVoiceTemplateFactory * | VoiceSdkVoiceTemplateFactoryCreate (const char *init_path, char **error_msg) |
Creates VoiceSdkVoiceTemplateFactory. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. 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 VoiceSdkVoiceTemplateMatcher * | VoiceSdkVoiceTemplateMatcherCreate (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 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. 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 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. 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 struct VoiceSdkVerifyResult VoiceSdkVerifyResult |
Voice verification result.
typedef struct VoiceSdkVerifyStreamResult VoiceSdkVerifyStreamResult |
typedef struct VoiceSdkVerifyStreamResultArray VoiceSdkVerifyStreamResultArray |
typedef struct VoiceSdkVoiceTemplateFactory VoiceSdkVoiceTemplateFactory |
Factory for creating and merging voice templates.
typedef struct VoiceSdkVoiceTemplateMatcher VoiceSdkVoiceTemplateMatcher |
Matches voice templates one-to-one.
typedef struct VoiceSdkVoiceVerifyStream VoiceSdkVoiceVerifyStream |
Continuous voice verification using audio stream.
typedef struct VoiceSdkVoiceVerifyStreamOpus VoiceSdkVoiceVerifyStreamOpus |
Continuous voice verification using Opus audio stream.
VOICE_SDK_API void VoiceSdkVerifyStreamResultArrayDataRelease | ( | const VoiceSdkVerifyStreamResultArray * | array | ) |
Releases data array pointer within VoiceSdkVerifyStreamResultArray. Deallocation of array itself should be handled manually.
[in] | array | pointer to VoiceSdkVerifyStreamResultArray for which data field is deallocated |
VOICE_SDK_API VoiceSdkVoiceTemplateFactory* VoiceSdkVoiceTemplateFactoryCreate | ( | const char * | init_path, |
char ** | error_msg | ||
) |
Creates VoiceSdkVoiceTemplateFactory.
[in] | init_path | path to the init data folder |
[out] | error_msg | output error message |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | audio_path | path to an audio file |
[in] | channel_type | audio record channel type |
[out] | error_msg | output error message |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | bytes | buffer containing byte representation of PCM16 audio samples |
[in] | num_bytes | number of bytes |
[in] | sample_rate | audio sampling rate in hz |
[in] | channel_type | audio record channel type |
[out] | error_msg | output error message |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | float_samples | buffer containing normalized (from -1 to 1) float audio samples |
[in] | num_samples | number of audio samples |
[in] | sample_rate | audio sampling rate in hz |
[in] | channel_type | audio record channel type |
[out] | error_msg | output error message |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | samples | buffer containing PCM16 audio samples |
[in] | num_samples | number of audio samples |
[in] | sample_rate | audio sampling rate in hz |
[in] | channel_type | audio record channel type |
[out] | error_msg | output error message |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | wav_path | path to a wav file |
[in] | channel_type | audio record channel type |
[out] | error_msg | output error message |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[out] | error_msg | output error message |
VOICE_SDK_API bool VoiceSdkVoiceTemplateFactoryGetMinimumAudioSampleRate | ( | const VoiceSdkVoiceTemplateFactory * | factory, |
size_t * | sample_rate, | ||
char ** | error_msg | ||
) |
Returns minimum supported input audio sampling frequency in Hz.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[out] | sample_rate | audio sampling rate in hz |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | voice_templates | array of a single speaker voice templates |
[in] | num_voice_templates | number of templates |
[out] | error_msg | output error message |
VOICE_SDK_API void VoiceSdkVoiceTemplateFactoryRelease | ( | VoiceSdkVoiceTemplateFactory * | factory | ) |
Releases VoiceSdkVoiceTemplateFactory.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
VOICE_SDK_API VoiceSdkVoiceTemplateMatcher* VoiceSdkVoiceTemplateMatcherCreate | ( | const char * | init_path, |
char ** | error_msg | ||
) |
Creates VoiceSdkVoiceTemplateMatcher.
[in] | init_path | path to the init data folder |
[out] | error_msg | output error message |
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.
[in] | matcher | pointer to VoiceSdkVoiceTemplateMatcher |
[out] | error_msg | output error message |
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.
[in] | matcher | pointer to VoiceSdkVoiceTemplateMatcher |
[in] | template1 | pointer to first VoiceSdkVoiceTemplate |
[in] | template2 | pointer to second VoiceSdkVoiceTemplate |
[out] | verify_result | pointer to preallocated structure instance of VoiceSdkVerifyResult |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
VOICE_SDK_API void VoiceSdkVoiceTemplateMatcherRelease | ( | VoiceSdkVoiceTemplateMatcher * | matcher | ) |
Releases VoiceSdkVoiceTemplateMatcher.
[in] | matcher | pointer to VoiceSdkVoiceTemplateMatcher |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[in] | bytes | buffer containing byte representation of PCM16 audio samples |
[in] | num_bytes | number of bytes |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[in] | float_samples | buffer containing normalized (from -1 to 1) float audio samples |
[in] | num_samples | number of audio samples |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[in] | samples | buffer containing PCM16 audio samples |
[in] | num_samples | number of audio samples |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | matcher | pointer to VoiceSdkVoiceTemplateMatcher |
[in] | voice_templates | array of reference voice templates to match with |
[in] | num_templates | number of reference voice templates |
[in] | sample_rate | input audio stream sampling frequency in Hz |
[in] | audio_context_length_seconds | length of audio context for voice verification, must be at least window_length_seconds seconds |
[in] | window_length_seconds | length of audio window passed to the template creation during stream processing, must be at least 0.5 seconds |
[out] | error_msg | output error message |
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamFinalize | ( | const VoiceSdkVoiceVerifyStream * | verify_stream, |
char ** | error_msg | ||
) |
Finalizes input audio stream to process remaining audio.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[out] | verify_stream_result_array | pointer to preallocated instance of VoiceSdkVerifyStreamResultArray |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[out] | verify_stream_result_array | pointer to preallocated instance of VoiceSdkVerifyStreamResult |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[out] | has_results | true is there are results available, false otherwise |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStreamOpus |
[in] | bytes | buffer containing single Opus packet. It is expected that packet contains data for single mono stream |
[in] | num_bytes | number of bytes |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | factory | pointer to VoiceSdkVoiceTemplateFactory |
[in] | matcher | pointer to VoiceSdkVoiceTemplateMatcher |
[in] | voice_template | reference voice template to match with |
[in] | sample_rate | input audio stream sampling frequency in Hz. Must be one of 8000, 12000, 16000, 24000 or 48000 |
[in] | audio_context_length_seconds | length of audio context for voice verification, must be at least 3 seconds |
[out] | error_msg | output error message |
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusFinalize | ( | const VoiceSdkVoiceVerifyStreamOpus * | verify_stream, |
char ** | error_msg | ||
) |
Finalizes input audio stream to process remaining audio.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStreamOpus |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusGetVerifyResult | ( | const VoiceSdkVoiceVerifyStreamOpus * | verify_stream, |
VoiceSdkVerifyStreamResult * | verify_stream_result, | ||
char ** | error_msg | ||
) |
Retrieves verification result from output queue.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStreamOpus |
[out] | verify_stream_result | pointer to preallocated structure instance of VoiceSdkVerifyStreamResult |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
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.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStreamOpus |
[out] | has_results | true is there are results available, false otherwise |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
VOICE_SDK_API void VoiceSdkVoiceVerifyStreamOpusRelease | ( | VoiceSdkVoiceVerifyStreamOpus * | verify_stream | ) |
Releases VoiceSdkVoiceVerifyStreamOpus.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStreamOpus |
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamOpusReset | ( | const VoiceSdkVoiceVerifyStreamOpus * | verify_stream, |
char ** | error_msg | ||
) |
Resets stream's state.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStreamOpus |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |
VOICE_SDK_API void VoiceSdkVoiceVerifyStreamRelease | ( | VoiceSdkVoiceVerifyStream * | verify_stream | ) |
Releases VoiceSdkVoiceVerifyStream.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
VOICE_SDK_API bool VoiceSdkVoiceVerifyStreamReset | ( | const VoiceSdkVoiceVerifyStream * | verify_stream, |
char ** | error_msg | ||
) |
Resets stream's state.
[in] | verify_stream | pointer to VoiceSdkVoiceVerifyStream |
[out] | error_msg | output error message |
true | if the invocation was successful, false in case of any errors |