The Far-CAFE (Conversational Audio Front-End) variant within the Yobe SDK is meant for situations where a person is talking far from a device while there are noise sources (including other voices) much closer to the device. The job of Far-CAFE is to extract the voice of the far-field person while pushing the near-field noise sources further into the auditory background. A typical use case would be a person talking to an appliance (that is making its own noise) from afar.
Place the provided libraries and header files in a location that can be discovered by your application's build system.
CAFE's main functionality is accessed via the Yobe::BioListener class.
Yobe::Create::NewBioListener is used to obtain a shared pointer to a new Yobe::BioListener instance. The instance must then be initialized using the license provided by Yobe, as well as two configuration arguments: the Microphone Orientation and the Output Buffer Type.
Audio data is passed into the Yobe::BioListener one buffer at a time. See Audio Buffers for more details on their format. As seen in the method signatures for the Yobe::BioListener::ProcessBuffer functions, the audio can be encoded as Double or PCM 16-bit Integer. The output buffer size can also vary from call to call.
out_buffer
in the above example now contains the processed version of the audio that is contained in input_buffer
. An example of what to do with this out_buffer
is to append its contents to a stream or larger buffer.
Note: You can find the library's built in buffer size using Yobe::Info::InputBufferSize.
To ensure BioListener is properly deinitialized, simply call Yobe::BioListener::Deinit.