aic.hpp and link the matching wrapper/native libraries. Start with the C++ integration guide.
All names below are in namespace aic. Check Result and error handling before extracting a factory result. Ordinary C++ allocation or string operations can still throw; SDK status failures use the declared return values.
aic::Model
Owns one native handle. Its destructor releases that handle; do not destroy or move the object while another thread uses it. Construction/destruction can allocate or block, so keep them outside the audio callback. The default constructor and raw-handle constructor are private: use the documented factory.
Model bytes are shared internally with derived processors, VADs and analyzers. Destroying this wrapper does not release their model reference. Keep a mapped file or borrowed model buffer valid until every derived object has been destroyed.
aic::Model::create_from_file
file_path. Returns an owned model on success. Do not change or delete the file while the model or derived objects remain alive. Errors include FilePathInvalid, FileSystemError, ModelInvalid, ModelVersionUnsupported and ModelDataUnaligned. The factory forwards file_path.c_str() to C; embedded NUL characters terminate the path. Perform file I/O outside the audio callback.
aic::Model::create_from_buffer
buffer_len bytes at buffer, aligned to 64 bytes. It does not copy or own the allocation. Keep it alive and unchanged through the lifetimes of this model and every derived object. Returns a checked model or errors such as NullPointer, ModelInvalid, ModelVersionUnsupported or ModelDataUnaligned. Destroying a model does not free the caller’s buffer.
aic::Model::get_id
aic::Model::get_optimal_sample_rate
aic::Model::get_optimal_block_size
sample_rate in Hz, in mono samples. The query does not validate supported rates; initialization performs that check. The wrapper asserts on C errors and has a zero fallback in assertion-disabled builds. Keep the model valid.
aic::ProcessorConfig
Stores audio configuration values. This is a convenience value type; wrapper 0.24.0 has no initialize(ProcessorConfig) overload. Pass its three fields to the object’s three-argument initialize method.
aic::ProcessorConfig::ProcessorConfig
aic::OtelConfig
aic::OtelConfig::OtelConfig
OtelConfig{} explicitly disables optional OTel export. This does not disable SDK session telemetry. The struct does not own session_id; keep it valid through the factory call, which copies it.
See OpenTelemetry and SDK telemetry.
aic::get_sdk_version
aic_get_sdk_version; a null C result would produce an empty string. No arguments.
aic::get_compatible_model_version
Example: pass configuration fields explicitly
Use a successfully created processor.ProcessorConfig stores values; initialize validates them.