Skip to main content
C SDK 0.24.0, core 0.24.0. The declarations are in aic.h.

Pointer and error contract

Initialize handle output slots to NULL. Creation writes an output only on success; failure does not promise to clear the slot. Check the return code before using outputs. Do not pass an already owned handle as an output slot without first managing its lifetime. Non-null pointers must still point to valid storage of the declared type and size. Null checks do not make dangling, misaligned or undersized pointers safe. Pass only declared enum values. Output storage must be writable and unaliased for the call. Strings are null-terminated; paths and credentials require UTF-8. Audio length is a count of mono float32 samples, not bytes. Do not mutate, destroy or call a mutable processing object concurrently. Shared context parameter reads/writes and reset requests can run alongside processing while both handles remain valid. They do not make destruction concurrent-safe. Use one stateful object per stream. Create, initialize, update credentials and destroy outside the audio callback; run analysis off the callback too.

AicErrorCode

Every member below is prefixed with AIC_ERROR_CODE_ in C. Error-returning functions use this enum, with success equal to zero. A void destroy function and the direct metadata getters do not return it.

Opaque handles

Do not allocate these structs yourself or read their layout. Each factory returns an owned handle; use the matching destroy function exactly once. A NULL argument to a destroy function is a no-op. AicModel can also be created from a buffer. Derived objects retain the model data, but the caller must keep any borrowed buffer or mapped file valid. Context handles retain shared controls and can outlive their source object; they do not keep processing audio after its destruction.

AicAnalysisResult

Caller-owned value storage. aic_analyzer_analyze_buffered writes it on success. All fields are float; no field has a C default. Read the Tyto dimension interpretation before setting application thresholds. Scores are model estimates, not a measured word error rate or a guarantee about downstream behavior. C API index · OpenTelemetry configuration · Troubleshooting

Example: initialize output handles

This helper leaves the output slot null when loading fails. It is an application convention; the SDK factory itself does not clear an existing slot.