ai|coustics SDK 0.3.0
The ai|coustics speech enhancement SDK
|
Header file for the ai-coustics speech enhancement SDK. More...
#include <cstddef>
#include <cstdint>
Go to the source code of this file.
Typedefs | |
using | aic::LogCallback = void(*)(const char *, LogLevel) |
Enumerations | |
enum class | aic::LogLevel : uint32_t { Error = 1 , Warn , Debug , Info , Trace } |
Functions | |
uint32_t | aic::aic_log_init (LogCallback log_callback) |
Initializes the SDK logger. | |
AicModel * | aic::aic_new_model_s () |
Creates a new AicModel , using the machine learning model ModelS . | |
AicModel * | aic::aic_new_model_m () |
Creates a new AicModel , using the machine learning model ModelM . | |
AicModel * | aic::aic_new_model_l () |
Creates a new AicModel , using the machine learning model ModelL . | |
AicModel * | aic::aic_new_model_z () |
Creates a new AicModel , using the machine learning model ModelZ . | |
uint32_t | aic::aic_init (AicModel *model, size_t num_channels, size_t sample_rate, size_t num_frames) |
Initializes the audio processing settings for the AicModel. | |
uint32_t | aic::aic_process_interleaved (AicModel *model, float *buffer, size_t num_channels, size_t num_frames) |
Processes a buffer of interleaved audio data using the AicModel. | |
uint32_t | aic::aic_process_deinterleaved (AicModel *model, float *const *buffer, size_t num_channels, size_t num_frames) |
Processes a multi-channel buffer of audio data using the AicModel. | |
uint32_t | aic::aic_reset (AicModel *model) |
Processes a multi-channel buffer of audio data using the AicModel. | |
uint32_t | aic::aic_set_enhancement_strength (AicModel *model, float enhancement_strength) |
Sets the enhancement strength for the AicModel. | |
uint32_t | aic::aic_get_enhancement_strength (AicModel *model, float *enhancement_strength) |
Gets the current enhancement strength for the AicModel. | |
uint32_t | aic::aic_set_voice_gain (AicModel *model, float voice_gain) |
Sets the voice gain parameter of the AicModel. This is the gain that is added to the extracted voice before the mixback to the original signal is happening. | |
uint32_t | aic::aic_get_voice_gain (AicModel *model, float *voice_gain) |
Gets the current voice gain parameter of the AicModel. This is the gain that is added to the extracted voice before the mixback to the original signal is happening. | |
uint32_t | aic::aic_get_optimal_num_frames (AicModel *model, size_t *num_frames) |
Gets the optimal number of frames for the AicModel. This is the native number of frames of the model, that causes the lowest latency. | |
uint32_t | aic::aic_get_optimal_sample_rate (AicModel *model, size_t *sample_rate) |
Gets the optimal sample rate for the AicModel. This is the native sample rate of the model, that causes the lowest latency. | |
uint32_t | aic::aic_get_latency (AicModel *model, size_t *latency) |
Gets the current latency of the full process in samples. | |
void | aic::aic_free (AicModel *model) |
Frees the memory used by the AicModel. | |
Header file for the ai-coustics speech enhancement SDK.
This file contains the definitions and declarations for the ai-coustics speech enhancement SDK, including initialization, processing, and configuration functions. The ai-coustics SDK provides advanced machine learning models for speech enhancement, that can be used in audio streaming contexts.
Unauthorized copying, distribution, or modification of this file, via any medium, is strictly prohibited.
For inquiries, please contact: info@.nosp@m.ai-c.nosp@m.ousti.nosp@m.cs.c.nosp@m.om
using aic::LogCallback = typedef void(*)(const char*, LogLevel) |
The SDK will call this function to allow the user to receive logs. The first parameter is a pointer to the log message, and the second parameter is the level of that log.
|
strong |
Levels for the log callback.
void aic::aic_free | ( | AicModel * | model | ) |
Frees the memory used by the AicModel.
model | A pointer to the AicModel. |
uint32_t aic::aic_get_enhancement_strength | ( | AicModel * | model, |
float * | enhancement_strength | ||
) |
Gets the current enhancement strength for the AicModel.
model | A pointer to the AicModel. |
enhancement_strength | A pointer to the variable that will store the current strength. |
uint32_t aic::aic_get_latency | ( | AicModel * | model, |
size_t * | latency | ||
) |
Gets the current latency of the full process in samples.
model | A pointer to the AicModel. |
latency | A pointer to the variable that will store the latency value. |
uint32_t aic::aic_get_optimal_num_frames | ( | AicModel * | model, |
size_t * | num_frames | ||
) |
Gets the optimal number of frames for the AicModel. This is the native number of frames of the model, that causes the lowest latency.
model | A pointer to the AicModel. |
num_frames | A pointer to the variable that will store the optimal number of frames. |
uint32_t aic::aic_get_optimal_sample_rate | ( | AicModel * | model, |
size_t * | sample_rate | ||
) |
Gets the optimal sample rate for the AicModel. This is the native sample rate of the model, that causes the lowest latency.
model | A pointer to the AicModel. |
sample_rate | A pointer to the variable that will store the optimal sample rate. |
uint32_t aic::aic_get_voice_gain | ( | AicModel * | model, |
float * | voice_gain | ||
) |
Gets the current voice gain parameter of the AicModel. This is the gain that is added to the extracted voice before the mixback to the original signal is happening.
model | A pointer to the AicModel. |
voice_gain | A pointer to the variable that will store the voice gain parameter. |
uint32_t aic::aic_init | ( | AicModel * | model, |
size_t | num_channels, | ||
size_t | sample_rate, | ||
size_t | num_frames | ||
) |
Initializes the audio processing settings for the AicModel.
model | A pointer to the AicModel. |
num_channels | The number of audio channels being processed. |
sample_rate | The sample rate of the audio being processed. |
num_frames | The number of audio frames processed per callback. |
uint32_t aic::aic_log_init | ( | LogCallback | log_callback | ) |
Initializes the SDK logger.
log_callback | A callback function that the SDK will use to send log messages |
AicModel * aic::aic_new_model_l | ( | ) |
Creates a new AicModel
, using the machine learning model ModelL
.
AicModel
. AicModel * aic::aic_new_model_m | ( | ) |
Creates a new AicModel
, using the machine learning model ModelM
.
AicModel
. AicModel * aic::aic_new_model_s | ( | ) |
Creates a new AicModel
, using the machine learning model ModelS
.
AicModel
. AicModel * aic::aic_new_model_z | ( | ) |
Creates a new AicModel
, using the machine learning model ModelZ
.
AicModel
. uint32_t aic::aic_process_deinterleaved | ( | AicModel * | model, |
float *const * | buffer, | ||
size_t | num_channels, | ||
size_t | num_frames | ||
) |
Processes a multi-channel buffer of audio data using the AicModel.
model | A pointer to the AicModel. |
buffer | A pointer to the audio data. |
num_channels | The number of channels. |
num_frames | The number of audio frames in the buffer. |
uint32_t aic::aic_process_interleaved | ( | AicModel * | model, |
float * | buffer, | ||
size_t | num_channels, | ||
size_t | num_frames | ||
) |
Processes a buffer of interleaved audio data using the AicModel.
model | A pointer to the AicModel. |
buffer | A pointer to the audio data. |
num_channels | The number of channels. |
num_frames | The number of audio frames in the buffer. |
num_channels
* num_frames
long. uint32_t aic::aic_reset | ( | AicModel * | model | ) |
Processes a multi-channel buffer of audio data using the AicModel.
model | A pointer to the AicModel. |
buffer | A pointer to the audio data. |
num_channels | The number of channels. |
num_frames | The number of audio frames in the buffer. |
uint32_t aic::aic_set_enhancement_strength | ( | AicModel * | model, |
float | enhancement_strength | ||
) |
Sets the enhancement strength for the AicModel.
model | A pointer to the AicModel. |
enhancement_strength | Value between 0.0 and 1.0, where 0.0 is equal to a bypass and 1.0 is the maximum enhancement. |
uint32_t aic::aic_set_voice_gain | ( | AicModel * | model, |
float | voice_gain | ||
) |
Sets the voice gain parameter of the AicModel. This is the gain that is added to the extracted voice before the mixback to the original signal is happening.
model | A pointer to the AicModel. |
voice_gain | The voice gain parameter to set. |