YobeSDK  0.2.0
Yobe::IDListener Struct Referenceabstract

The main class for utilizing the Yobe IDListener functionality. More...

#include <yobe_id_listener.hpp>

Public Member Functions

 IDListener (const IDListener &)=delete
 
 IDListener (IDListener &&) noexcept=default
 
IDListeneroperator= (const IDListener &)=delete
 
IDListeneroperator= (IDListener &&) noexcept=default
 
virtual Status Init (const char *license, const char *init_data_path)=0
 Initializes the internals of the IDListener. More...
 
virtual Status Init (const char *license, const char *init_data_path, VoiceTarget voice_target, OutputTarget output_voice_target)=0
 Initializes the internals of the IDListener with additional options. More...
 
virtual Status Deinit ()=0
 Cleans up the internals of the IDListener. More...
 
virtual Status GetStatus () const =0
 Retrieves the current status of the IDListener. More...
 
virtual VoiceTarget GetVoiceTarget () const =0
 Retrieves the current voice target status. More...
 
virtual OutputTarget GetOutputTarget () const =0
 Retrieves the current output voice target status. More...
 
virtual Status SelectUser (std::shared_ptr< BiometricTemplate > voice_print)=0
 Selects the user based on their biometric template. More...
 
virtual BiometricSensitivity GetBioSensitivity () const =0
 Retrieves the sensitivity level for biometric template matching. More...
 
virtual void SetBioSensitivity (BiometricSensitivity sensitivity_level)=0
 Set the sensitivity level for biometric template matching. More...
 
virtual std::shared_ptr< BiometricTemplateMergeUserTemplates (const std::vector< std::shared_ptr< BiometricTemplate >> &template_list) const =0
 Merge multiple BiometricTemplate containing voice data from the same user into one template. More...
 
virtual std::shared_ptr< BiometricTemplateRegisterTemplate (const double *samples, uint32_t sample_count) const =0
 Creates a biometric template from an audio buffer. More...
 
virtual std::shared_ptr< BiometricTemplateRegisterTemplate (const std::string &wave_file) const =0
 Creates a BiometricTemplate from a wave file containing speech data. More...
 
virtual Status ProcessBuffer (const int16_t *in_samples, std::vector< int16_t > &out_samples, uint32_t in_sample_count)=0
 ProcessBuffer processes a two-channel interleaved audio buffer and writes the processed audio to out_samples. More...
 
virtual Status ProcessBuffer (const double *in_samples, std::vector< double > &out_samples, uint32_t in_sample_count)=0
 ProcessBuffer processes a two-channel interleaved audio buffer and writes the processed audio to out_samples. More...
 

Detailed Description

The main class for utilizing the Yobe IDListener functionality.

The IDListener class provides methods for initializing, deinitializing, and processing voice templates. It also provides methods for changing and retrieving the sensitivity level for biometric template matching.

Member Function Documentation

◆ Init() [1/2]

virtual Status Yobe::IDListener::Init ( const char *  license,
const char *  init_data_path 
)
pure virtual

Initializes the internals of the IDListener.

Parameters
[in]licenseThe license provided to you by Yobe.
[in]init_data_pathThe path to data needed to initialize the IDListener.
Returns
The status of the IDListener after initialization

◆ Init() [2/2]

virtual Status Yobe::IDListener::Init ( const char *  license,
const char *  init_data_path,
VoiceTarget  voice_target,
OutputTarget  output_voice_target 
)
pure virtual

Initializes the internals of the IDListener with additional options.

Parameters
[in]licenseThe license provided to you by Yobe.
[in]init_data_pathThe path to data needed to initialize the IDListener.
[in]voice_targetThe near or far voice target.
[in]output_voice_targetIndicates either the ASR output or Muting output. [See Details in document]
Returns
The status of the IDListener after initialization.

◆ Deinit()

virtual Status Yobe::IDListener::Deinit ( )
pure virtual

Cleans up the internals of the IDListener.

Returns
The status of the IDListener after deinitialization.

◆ GetStatus()

virtual Status Yobe::IDListener::GetStatus ( ) const
pure virtual

Retrieves the current status of the IDListener.

Returns
The current status of the IDListener.

◆ GetVoiceTarget()

virtual VoiceTarget Yobe::IDListener::GetVoiceTarget ( ) const
pure virtual

Retrieves the current voice target status.

Returns
The current voice target status.

◆ GetOutputTarget()

virtual OutputTarget Yobe::IDListener::GetOutputTarget ( ) const
pure virtual

Retrieves the current output voice target status.

Returns
The current output voice target status. This target is either for ASR or Mute applications.

◆ SelectUser()

virtual Status Yobe::IDListener::SelectUser ( std::shared_ptr< BiometricTemplate voice_print)
pure virtual

Selects the user based on their biometric template.

Parameters
[in]voice_printThe biometric template of the user.
Returns
the status of the IDListener.

◆ GetBioSensitivity()

virtual BiometricSensitivity Yobe::IDListener::GetBioSensitivity ( ) const
pure virtual

Retrieves the sensitivity level for biometric template matching.

Returns
The sensitivity level of biometric template matching.

◆ SetBioSensitivity()

virtual void Yobe::IDListener::SetBioSensitivity ( BiometricSensitivity  sensitivity_level)
pure virtual

Set the sensitivity level for biometric template matching.

Parameters
sensitivity_levelThe sensitivity level to be set.

◆ MergeUserTemplates()

virtual std::shared_ptr<BiometricTemplate> Yobe::IDListener::MergeUserTemplates ( const std::vector< std::shared_ptr< BiometricTemplate >> &  template_list) const
pure virtual

Merge multiple BiometricTemplate containing voice data from the same user into one template.

Parameters
[in]template_listA list of voice templates containing voice data from the same user.
Returns
This function returns a single combined template. If there is an error during the merge process, this function will throw an exception or return an error code.

◆ RegisterTemplate() [1/2]

virtual std::shared_ptr<BiometricTemplate> Yobe::IDListener::RegisterTemplate ( const double *  samples,
uint32_t  sample_count 
) const
pure virtual

Creates a biometric template from an audio buffer.

This function creates a biometric template from an audio buffer containing voice data. The resulting template can be used in either the MergeUserTemplates or VerifyTemplate functions to compare the user's voice against a reference template or to merge multiple templates into a single one.

Parameters
[in]samplesPointer to the audio buffer containing the voice data.
[in]sample_countThe number of samples in the audio buffer.
Returns
If successful, this function returns a shared pointer to a new BiometricTemplate object that can be used in subsequent operations. If there is an error, this function returns a null pointer.

◆ RegisterTemplate() [2/2]

virtual std::shared_ptr<BiometricTemplate> Yobe::IDListener::RegisterTemplate ( const std::string &  wave_file) const
pure virtual

Creates a BiometricTemplate from a wave file containing speech data.

Parameters
[in]wave_fileThe path to the wave file containing speech data.
Returns
A shared pointer to a BiometricTemplate to be used in the MergeUserTemplates or VerifyTemplate functions. If an error occurs, this function will return a nullptr.

◆ ProcessBuffer() [1/2]

virtual Status Yobe::IDListener::ProcessBuffer ( const int16_t *  in_samples,
std::vector< int16_t > &  out_samples,
uint32_t  in_sample_count 
)
pure virtual

ProcessBuffer processes a two-channel interleaved audio buffer and writes the processed audio to out_samples.

Parameters
[in]in_samplesPointer to the input audio buffer.
[out]out_samplesPointer to a pre-allocated buffer for the processed audio.
[in]in_sample_countNumber of audio samples in the input buffer.
Returns
The status of the IDListener.
Note
If the buffer size is not correct, the function will return NEEDS_MORE_DATA error code.
In case of any error, the function will return ERR and out_samples will be empty.

◆ ProcessBuffer() [2/2]

virtual Status Yobe::IDListener::ProcessBuffer ( const double *  in_samples,
std::vector< double > &  out_samples,
uint32_t  in_sample_count 
)
pure virtual

ProcessBuffer processes a two-channel interleaved audio buffer and writes the processed audio to out_samples.

Parameters
[in]in_samplesPointer to the input audio buffer.
[out]out_samplesPointer to a pre-allocated buffer for the processed audio.
[in]in_sample_countNumber of audio samples in the input buffer.
Returns
The status of the IDListener.
Note
If the buffer size is not correct, the function will return NEEDS_MORE_DATA error code.
In case of any error, the function will return ERR and out_samples will be empty.

The documentation for this struct was generated from the following file: