The main class for utilizing the Yobe IDListener functionality.
More...
#include <yobe_id_listener.hpp>
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.
◆ 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] | license | The license provided to you by Yobe. |
[in] | init_data_path | The 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] | license | The license provided to you by Yobe. |
[in] | init_data_path | The path to data needed to initialize the IDListener. |
[in] | voice_target | The near or far voice target. |
[in] | output_voice_target | Indicates 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 |
◆ 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()
Selects the user based on their biometric template.
- Parameters
-
[in] | voice_print | The biometric template of the user. |
- Returns
- the status of the IDListener.
◆ GetBioSensitivity()
Retrieves the sensitivity level for biometric template matching.
- Returns
- The sensitivity level of biometric template matching.
◆ SetBioSensitivity()
Set the sensitivity level for biometric template matching.
- Parameters
-
sensitivity_level | The sensitivity level to be set. |
◆ MergeUserTemplates()
Merge multiple BiometricTemplate containing voice data from the same user into one template.
- Parameters
-
[in] | template_list | A 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] | samples | Pointer to the audio buffer containing the voice data. |
[in] | sample_count | The 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_file | The 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_samples | Pointer to the input audio buffer. |
[out] | out_samples | Pointer to a pre-allocated buffer for the processed audio. |
[in] | in_sample_count | Number 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_samples | Pointer to the input audio buffer. |
[out] | out_samples | Pointer to a pre-allocated buffer for the processed audio. |
[in] | in_sample_count | Number 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: