aic.h and link the matching native library. Start with the C integration guide.
The pointer and error contract applies to every signature below. Error names in prose omit the AIC_ERROR_CODE_ prefix. There are no default C arguments; optional pointers are stated explicitly.
AicOtelConfig
Passing
NULL as the entire config uses environment defaults. Supplying {false, NULL, 0} explicitly disables OTel even if the environment enables it. See OpenTelemetry and SDK telemetry.
aic_get_sdk_version
aic_get_compatible_model_version
aic_model_create_from_file
model is a writable output slot; file_path is a null-terminated UTF-8 path. On success, the slot receives an owned handle. The file is memory-mapped: keep it present and unchanged until the model and every processor, VAD or analyzer derived from it are destroyed. Errors include NULL_POINTER, FILE_PATH_INVALID, FILE_SYSTEM_ERROR, MODEL_INVALID, MODEL_VERSION_UNSUPPORTED and MODEL_DATA_UNALIGNED. Model loading allocates and performs file I/O.
aic_model_create_from_buffer
model is a writable output slot. buffer points to buffer_len bytes of complete model data, aligned to 64 bytes. Loading borrows the bytes without copying or taking ownership. Keep the allocation alive and unchanged until the model and all derived objects are destroyed, even if you destroy the model handle first. Errors include NULL_POINTER, MODEL_INVALID, MODEL_VERSION_UNSUPPORTED and MODEL_DATA_UNALIGNED. Allocates the handle and parses model metadata.
aic_model_destroy
model; NULL is a no-op. Do not use the handle afterward. Derived processors, VADs and analyzers retain the underlying model through reference counting. A borrowed buffer still belongs to the caller and must outlive those objects. Stop all users of this handle before destroying it. No return value.
aic_model_get_id
model, or NULL for a null handle. The string belongs to the model handle and becomes invalid when that handle is destroyed. Copy it if you need it afterward; do not free or modify it.
aic_model_get_optimal_sample_rate
sample_rate. model and the writable output pointer must be non-null. Returns SUCCESS or NULL_POINTER. This is a metadata query, not initialization.
aic_model_get_optimal_block_size
sample_rate in Hz into block_size, measured in mono samples. model and the writable output pointer must be non-null. Returns SUCCESS or NULL_POINTER; this query does not validate whether the requested rate is supported. Validate rates during initialization. The native rate and optimal block size avoid unnecessary resampling and block buffering.