Skip to main content
C++ wrapper 0.24.0, core 0.24.0, C++11 or newer. Include 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

Loads and memory-maps the UTF-8 path 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

Borrows 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

Returns a copy of the model ID. Unlike the C pointer getter, this string remains valid independently of the model. A null underlying handle returns an empty string. Copying can allocate.

aic::Model::get_optimal_sample_rate

Returns the native sample rate in Hz. The wrapper asserts that the C call succeeded; it does not return an error object. Use a valid, successfully created model. In assertion-disabled builds, the initialized fallback value is zero if the C call fails.

aic::Model::get_optimal_block_size

Returns the model hop size converted to 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

Stores the arguments without validating them. Validation happens when you initialize a processor, VAD or collector. This constructor is not a default constructor: the rate and block size are required.

aic::OtelConfig

aic::OtelConfig::OtelConfig

Stores the arguments. Passing no config pointer to a factory preserves environment defaults; passing an 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

Returns a copied core SDK version string. It wraps aic_get_sdk_version; a null C result would produce an empty string. No arguments.

aic::get_compatible_model_version

Returns the accepted model file format version, 7 for core 0.24.0. This is not the model product version. No arguments.

Example: pass configuration fields explicitly

Use a successfully created processor. ProcessorConfig stores values; initialize validates them.