Skip to main content
All functions on this page are from C SDK 0.24.0, core 0.24.0. Include 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

Returns a borrowed, null-terminated core SDK version string. It has static lifetime: do not modify or free it. This function has no arguments or error return.

aic_get_compatible_model_version

Returns the model file format version accepted by this core build: 7 for 0.24.0. This is not a model product version. No arguments or error return.

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

Releases 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

Returns the borrowed, null-terminated UTF-8 model ID for 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

Writes the native model sample rate in Hz to 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

Writes the model hop size converted to the requested 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. C API index · C examples · Compatibility

Example: read model metadata

This helper loads a model and returns its native rate. It does not create a licensed processing session.