YobeSDK  0.2.1
yobe_lib_util.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "sdk_build_defs.hpp"
10 
11 #include <cstdint>
12 #include <functional>
13 
15 namespace Yobe {
16 
20  LOWEST,
21 
23  LOW,
24 
26  MEDIUM,
27 
29  HIGH,
30 
32  HIGHEST,
33 };
34 
36 enum class VoiceTarget {
38  NEAR_FIELD,
39 
41  FAR_FIELD,
42 };
43 
44 
47 enum class OutputTarget {
49  YOBE_ASR,
50 
52  YOBE_MUTE,
53 };
54 
56 enum class Status : int16_t {
58  YOBE_UNKNOWN = -1,
59 
61  YOBE_OK = 0,
62 
64  YOBE_ERROR = 1,
65 
67  ALREADY_INIT = 2,
68 
70  NEEDS_MORE_DATA = 3,
71 
73  INVALID_LICENSE = 4,
74 
76  SESSION_EXPIRE = 5,
77 
79  YOBE_STOPPED = 6,
80 
82  HANDLE_INVALID = 7,
83 
85  ENROLLING = 8
86 };
87 
89 namespace Info {
90 
95 YOBE_SDK_API const char* LibraryVersion();
96 
102 YOBE_SDK_API const char* StdError(Status status);
103 
108 YOBE_SDK_API double AudioBufferTime();
109 
114 YOBE_SDK_API uint32_t OutputBufferSize();
115 
121 YOBE_SDK_API uint32_t InputBufferSize();
122 
128 YOBE_SDK_API int32_t OutputChannels();
129 
135 YOBE_SDK_API int32_t InputChannels();
136 
144 YOBE_SDK_API uint32_t SamplingRate(bool output_sampling_rate = true);
145 
150 YOBE_SDK_API void RegisterCallback(std::function<void(const char*)> log_callback);
151 
152 } // namespace Info
153 } // 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:56
@ 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...
VoiceTarget
These enums are used to specify whether the target voice is near or far from the microphone.
Definition: yobe_lib_util.hpp:36
@ NEAR_FIELD
The target voice is near field (less than 2 feet).
@ FAR_FIELD
The target voice is far field (3 feet or more).
BiometricSensitivity
The level of sensitivity to use for biometric 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.
OutputTarget
The enumeration is used to define the output target of LATTE algorithm. The output or sink target can...
Definition: yobe_lib_util.hpp:47
@ YOBE_MUTE
The output or sink is for muting applications.
@ YOBE_ASR
The output or sink is for Automatic Speech Recognition (ASR) applications.