YobeSDK 0.3.2
 
Loading...
Searching...
No Matches
yobe_id_listener.hpp
Go to the documentation of this file.
1
10#pragma once
11
12#include "sdk_build_defs.h"
13#include "yobe_id_template.hpp"
14#include "yobe_lib_util.hpp"
15
16#include <memory>
17#include <vector>
18
19namespace Yobe {
26struct YOBE_SDK_API IDListener {
27 virtual ~IDListener() = default;
28
29 IDListener() = default;
30 IDListener(const IDListener&) = delete;
31 IDListener(IDListener&&) noexcept = default;
32
33 IDListener& operator=(const IDListener&) = delete;
34 IDListener& operator=(IDListener&&) noexcept = default;
35
45 virtual Status Init(const char* license, const char* init_data_path, MicOrientation mic_orientation, OutputBufferType output_voice_target) = 0;
46
52 virtual Status Deinit() = 0;
53
59 virtual Status GetStatus() const = 0;
60
66 virtual MicOrientation GetMicOrientation() const = 0;
67
73 virtual VoiceTarget GetVoiceTarget() const = 0;
74
81
90 virtual void SetOutputGain(Yobe::OutputGain gain) = 0;
91
100 virtual Yobe::OutputGain GetOutputGain() const = 0;
101
102
109 virtual Status SelectUser(std::shared_ptr<IDTemplate> voice_print) = 0;
110
116 virtual IDSensitivity GetIDSensitivity() const = 0;
117
123 virtual void SetIDSensitivity(IDSensitivity sensitivity_level) = 0;
124
132 virtual std::shared_ptr<IDTemplate> MergeUserTemplates(
133 const std::vector<std::shared_ptr<IDTemplate>>& template_list) const = 0;
134
148 virtual std::shared_ptr<IDTemplate> RegisterTemplate(const double* samples, uint32_t sample_count) const = 0;
149
164 virtual Status ProcessBuffer(const int16_t* in_samples, std::vector<int16_t>& out_samples,
165 uint32_t in_sample_count, bool& is_user_verify) = 0;
166
168 virtual Status ProcessBuffer(const double* in_samples, std::vector<double>& out_samples,
169 uint32_t in_sample_count, bool& is_user_verify) = 0;
170
177
184};
185} // namespace Yobe
186
Contains all Yobe-related functions and structures.
Definition yobe_bio_listener.hpp:12
Status
Yobe status codes that give information on internal state.
Definition yobe_lib_util.hpp:83
OutputGain
This enumeration is used to define the fixed output gain for Yobe's processed buffer....
Definition yobe_lib_util.hpp:37
OutputBufferType
This is used to define the OutputBufferType of LATTE algorithm. To learn which applies to your applic...
Definition yobe_lib_util.hpp:74
MicOrientation
This enum allows the algorithm to know how your microphones are oriented. [See Details in doxygen doc...
Definition yobe_lib_util.hpp:55
VoiceTarget
This is used to specify whether the target voice is near or far from the microphone.
Definition yobe_lib_util.hpp:64
IDSensitivity
The level of sensitivity to use for ID template matching.
Definition yobe_lib_util.hpp:18
The main class for utilizing the Yobe IDListener functionality.
Definition yobe_id_listener.hpp:26
virtual Status ProcessBuffer(const int16_t *in_samples, std::vector< int16_t > &out_samples, uint32_t in_sample_count, bool &is_user_verify)=0
ProcessBuffer processes a two-channel interleaved audio buffer and writes the processed audio to out_...
virtual IDSensitivity GetIDSensitivity() const =0
Retrieves the sensitivity level for ID template matching.
virtual Status GetStatus() const =0
Retrieves the current status of the IDListener.
virtual Yobe::Status StartEnrollment()=0
StartEnrollment configures the IDListener for enrolling a new user through registering their voice in...
virtual std::shared_ptr< IDTemplate > MergeUserTemplates(const std::vector< std::shared_ptr< IDTemplate > > &template_list) const =0
Merge multiple IDTemplate containing voice data from the same user into one template.
virtual Status SelectUser(std::shared_ptr< IDTemplate > voice_print)=0
Selects the user based on their biometric template.
virtual Status Deinit()=0
Cleans up the internals of the IDListener.
virtual MicOrientation GetMicOrientation() const =0
Retrieves the current microphone orientation.
virtual std::shared_ptr< IDTemplate > RegisterTemplate(const double *samples, uint32_t sample_count) const =0
Creates a ID template from an audio buffer.
virtual void SetOutputGain(Yobe::OutputGain gain)=0
Set the output gain for the processed output.
virtual Status Init(const char *license, const char *init_data_path, MicOrientation mic_orientation, OutputBufferType output_voice_target)=0
Initializes the internals of the IDListener with additional options.
virtual Status ProcessBuffer(const double *in_samples, std::vector< double > &out_samples, uint32_t in_sample_count, bool &is_user_verify)=0
ProcessBuffer processes a two-channel interleaved audio buffer and writes the processed audio to out_...
virtual Yobe::Status StopEnrollment()=0
StopEnrollment configures the IDListener for normal processing.
virtual OutputBufferType GetOutputBufferType() const =0
Retrieves the current output buffer type.
virtual VoiceTarget GetVoiceTarget() const =0
Retrieves the current voice target status.
virtual void SetIDSensitivity(IDSensitivity sensitivity_level)=0
Set the sensitivity level for ID template matching.
virtual Yobe::OutputGain GetOutputGain() const =0
Get the output gain for the processed output.