YobeSDK  0.3.0
yobe_lib_util.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "sdk_build_defs.h"
10 
11 #include <cstdint>
12 #include <functional>
13 
15 namespace Yobe {
16 
18 enum class IDSensitivity {
20  LOWEST,
21 
23  LOW,
24 
26  MEDIUM,
27 
29  HIGH,
30 
32  HIGHEST,
33 };
34 
37 enum class OutputGain {
39  LOWEST,
40 
42  LOW,
43 
45  MEDIUM,
46 
48  HIGH,
49 
51  HIGHEST,
52 };
53 
55 enum class MicOrientation {
57  BROAD_SIDE = 0,
58 
60  END_FIRE = 15,
61 };
62 
64 enum class VoiceTarget {
66  NEAR_FIELD,
67 
69  FAR_FIELD,
70 };
71 
74 enum class OutputBufferType {
77 
79  YOBE_FIXED,
80 };
81 
83 enum class Status : int16_t {
85  YOBE_UNKNOWN = -1,
86 
88  YOBE_OK = 0,
89 
91  YOBE_ERROR = 1,
92 
94  ALREADY_INIT = 2,
95 
97  NEEDS_MORE_DATA = 3,
98 
100  INVALID_LICENSE = 4,
101 
103  SESSION_EXPIRE = 5,
104 
106  YOBE_STOPPED = 6,
107 
109  HANDLE_INVALID = 7,
110 
112  ENROLLING = 8
113 };
114 
116 namespace Info {
117 
122 YOBE_SDK_API const char* LibraryVersion();
123 
129 YOBE_SDK_API const char* StdError(Status status);
130 
135 YOBE_SDK_API double AudioBufferTime();
136 
141 YOBE_SDK_API uint32_t OutputBufferSize();
142 
148 YOBE_SDK_API uint32_t InputBufferSize();
149 
155 YOBE_SDK_API int32_t OutputChannels();
156 
162 YOBE_SDK_API int32_t InputChannels();
163 
171 YOBE_SDK_API uint32_t SamplingRate(bool output_sampling_rate = true);
172 
177 YOBE_SDK_API void RegisterCallback(std::function<void(const char*)> log_callback);
178 
179 } // namespace Info
180 } // namespace Yobe
YOBE_SDK_API int32_t InputChannels()
Returns the number of input channels required for processing.
YOBE_SDK_API double AudioBufferTime()
Returns the processing audio buffer length in seconds.
YOBE_SDK_API void RegisterCallback(std::function< void(const char *)> log_callback)
Registers a callback function to receive Yobe logging information.
YOBE_SDK_API const char * LibraryVersion()
Returns the version of Yobe's library in the format: <Major>.<Interim>.<Minor>
YOBE_SDK_API uint32_t OutputBufferSize()
Returns the output buffer size in samples.
YOBE_SDK_API uint32_t InputBufferSize()
Returns the input buffer size in samples.
YOBE_SDK_API const char * StdError(Status status)
Translates a Yobe Status code into a more readable string.
YOBE_SDK_API uint32_t SamplingRate(bool output_sampling_rate=true)
Returns the expected sampling rate of the input/output buffers.
YOBE_SDK_API int32_t OutputChannels()
Returns the number of processing output channels.
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
@ ALREADY_INIT
The library has already been started.
@ YOBE_STOPPED
This means that the engine successfully stopped.
@ YOBE_UNKNOWN
An unknown error has occurred.
@ YOBE_OK
The function executed successfully.
@ INVALID_LICENSE
The license is invalid.
@ HANDLE_INVALID
This means that the engine has not been initialized.
@ SESSION_EXPIRE
This means the Yobe session timing has expired.
@ YOBE_ERROR
A known error occurred in the function.
@ NEEDS_MORE_DATA
The algorithm needs more data before it can start processing the audio.
@ ENROLLING
This means the last buffer was processed while the IDListener was configured for enrolling a new Biom...
OutputGain
This enumeration is used to define the fixed output gain for Yobe's processed buffer....
Definition: yobe_lib_util.hpp:37
@ LOW
The output gain low level.
@ LOWEST
The output gain lowest level.
@ HIGH
The output gain HIGH level.
@ MEDIUM
The output gain medium level.
@ HIGHEST
The output gain HIGHTEST level. This can be.
OutputBufferType
This is used to define the OutputBufferType of LATTE algorithm. To learn which applies to your applic...
Definition: yobe_lib_util.hpp:74
@ YOBE_VARIABLE
This allow the output buffer to change sizes.
@ YOBE_FIXED
This guarantees that the output buffer will always be the same size.
MicOrientation
This enum allows the algorithm to know how your microphones are oriented. [See Details in doxygen doc...
Definition: yobe_lib_util.hpp:55
@ BROAD_SIDE
This orientation has the target voice perpendicular to the line connecting the two microphones.
@ END_FIRE
This orientation has the target voice parallel to the line connecting the two microphones (ideally th...
VoiceTarget
This is used to specify whether the target voice is near or far from the microphone.
Definition: yobe_lib_util.hpp:64
@ NEAR_FIELD
The target voice is near field (less than 2 feet).
@ FAR_FIELD
The target voice is far field (3 feet or more).
IDSensitivity
The level of sensitivity to use for ID template matching.
Definition: yobe_lib_util.hpp:18
@ LOW
Use a low matching threshold.
@ LOWEST
Use the lowest matching threshold, but with a higher likelihood of false detections.
@ HIGH
Use a high matching threshold.
@ MEDIUM
Use a medium matching threshold.
@ HIGHEST
Use the highest matching threshold, with the lowest likelihood of false detections.