YobeSDK 0.3.2
 
Loading...
Searching...
No Matches
Yobe::BioListener Struct Referenceabstract

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

#include <yobe_bio_listener.hpp>

Public Member Functions

 BioListener (const BioListener &)=delete
 
 BioListener (BioListener &&) noexcept=default
 
BioListeneroperator= (const BioListener &)=delete
 
BioListeneroperator= (BioListener &&) noexcept=default
 
virtual Status Init (const char *license, MicOrientation mic_orientation, VoiceTarget voice_target)=0
 Initializes the Yobe BioListener algorithm for a specific voice target.
 
virtual Status Deinit ()=0
 Cleans up the internals of the Yobe BioListener algorithm.
 
virtual Status GetStatus () const =0
 Gets the current status of the Yobe BioListener algorithm.
 
virtual MicOrientation GetMicOrientation () const =0
 Gets the microphone orientation of the Yobe BioListener.
 
virtual VoiceTarget GetVoiceTarget () const =0
 Gets the voice target status for the Yobe BioListener algorithm.
 
virtual void SetOutputGain (Yobe::OutputGain gain)=0
 Set the output gain for the processed output.
 
virtual Yobe::OutputGain GetOutputGain () const =0
 Get the output gain for the processed output.
 
virtual Status ProcessBuffer (const int16_t *in_samples, int16_t *out_samples, uint32_t in_sample_count, uint32_t *out_sample_count)=0
 ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio.
 
virtual Status ProcessBuffer (const double *in_samples, double *out_samples, uint32_t in_sample_count, uint32_t *out_sample_count)=0
 ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio.
 

Detailed Description

The main class for utilizing the Yobe BioListener functionality.

This class provides an interface to use the Yobe BioListener algorithm for processing audio samples. The algorithm analyzes the audio to detect biological signals and can be used to determine the presence of a human voice.

Member Function Documentation

◆ Init()

virtual Status Yobe::BioListener::Init ( const char *  license,
MicOrientation  mic_orientation,
VoiceTarget  voice_target 
)
pure virtual

Initializes the Yobe BioListener algorithm for a specific voice target.

This function initializes the internals of the Yobe BioListener algorithm for a specific voice target. It takes a license and a voice target as parameters. If the initialization fails, the returned status will indicate the cause of failure.

Parameters
[in]licenseA license provided by Yobe.
[in]mic_orientationThis parameter defines the microphones orientation with respect to the target voice.
[in]voice_targetThe near or far voice target.
Returns
The status of the Yobe BioListener algorithm after initialization.

◆ Deinit()

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

Cleans up the internals of the Yobe BioListener algorithm.

This function deinitializes the internals of the Yobe BioListener algorithm. If the deinitialization fails, the returned status will indicate the cause of failure.

Returns
The status of the Yobe BioListener algorithm after deinitialization.

◆ GetStatus()

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

Gets the current status of the Yobe BioListener algorithm.

This function returns a status code indicating the current status of the Yobe BioListener algorithm.

Returns
The current status of the Yobe BioListener algorithm.

◆ GetMicOrientation()

virtual MicOrientation Yobe::BioListener::GetMicOrientation ( ) const
pure virtual

Gets the microphone orientation of the Yobe BioListener.

This function returns the microphone orientation for the Yobe BioListener.

Returns
The microphone orientation for the Yobe BioListener.

◆ GetVoiceTarget()

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

Gets the voice target status for the Yobe BioListener algorithm.

This function returns the voice target status for the Yobe BioListener algorithm.

Returns
The voice target status for the Yobe BioListener algorithm.

◆ SetOutputGain()

virtual void Yobe::BioListener::SetOutputGain ( Yobe::OutputGain  gain)
pure virtual

Set the output gain for the processed output.

This API provides user ability to setup fixed gain for the processed audio buffer. The default gain set upped by the SDK is MEDIUM.

Returns
None

◆ GetOutputGain()

virtual Yobe::OutputGain Yobe::BioListener::GetOutputGain ( ) const
pure virtual

Get the output gain for the processed output.

This API provides user ability to get gain for the processed audio buffer. The default gain set upped by the SDK is MEDIUM.

Returns
OutputGain

◆ ProcessBuffer() [1/2]

virtual Status Yobe::BioListener::ProcessBuffer ( const int16_t *  in_samples,
int16_t *  out_samples,
uint32_t  in_sample_count,
uint32_t *  out_sample_count 
)
pure virtual

ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio.

This function takes two channel interleaved audio as input and applies processing to the audio. The processed audio is then written to the output buffer in interleaved format. The size of the output buffer should be pre-allocated to hold the processed audio samples.

Parameters
[in]in_samplesA pointer to the buffer containing the interleaved input audio samples.
[out]out_samplesA pre-allocated buffer for the interleaved processed audio samples.
[in]in_sample_countThe number of audio samples in the input buffer.
[in,out]out_sample_countA pointer to the number of audio samples in the output buffer. The actual number of processed audio samples will be written to this variable by the function.
Returns
The status of the Yobe BioListener library after processing the audio buffer.
Note
If the input buffer size is not the correct size, the library will return a NEEDS_MORE_DATA error code.
In case of any error, the value pointed to by out_sample_count will be set to 0.

◆ ProcessBuffer() [2/2]

virtual Status Yobe::BioListener::ProcessBuffer ( const double *  in_samples,
double *  out_samples,
uint32_t  in_sample_count,
uint32_t *  out_sample_count 
)
pure virtual

ProcessBuffer processes two channel interleaved audio and populates the output buffer with the processed audio.

This function takes two channel interleaved audio as input and applies processing to the audio. The processed audio is then written to the output buffer in interleaved format. The size of the output buffer should be pre-allocated to hold the processed audio samples.

Parameters
[in]in_samplesA pointer to the buffer containing the interleaved input audio samples.
[out]out_samplesA pre-allocated buffer for the interleaved processed audio samples.
[in]in_sample_countThe number of audio samples in the input buffer.
[in,out]out_sample_countA pointer to the number of audio samples in the output buffer. The actual number of processed audio samples will be written to this variable by the function.
Returns
The status of the Yobe BioListener library after processing the audio buffer.
Note
If the input buffer size is not the correct size, the library will return a NEEDS_MORE_DATA error code.
In case of any error, the value pointed to by out_sample_count will be set to 0.

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