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::AnalyzerPair

Owns a Collector and Analyzer created together. The members are move-only, so the pair is move-only too. Its implicit destructor destroys both members. The wrapper supplies a static factory, not a public default factory. Use a Tyto analysis model.

aic::AnalyzerPair::create

Creates the pair from an analysis model and SDK key or supported bearer token in license_key. The analyzer retains model data. Check the result before taking the pair. Errors include ModelTypeUnsupported, license errors and InternalError. The collector still needs initialization. There is no OtelConfig argument: this creation path disables optional OTel export; SDK session requirements remain separate.

aic::Collector

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.

aic::Collector::initialize

Sets the host rate (8,000–192,000 Hz), positive mono block size and fixed/variable mode. Fixed input must match the block size; variable input cannot exceed it. Returns Success, AudioConfigUnsupported or NullPointer. Failure leaves the collector uninitialized. Initializes buffers outside the callback; do not reinitialize concurrently with collection.

aic::Collector::buffer

Collects audio_len mono float32 samples from audio, without modifying caller input. Returns Success, NullPointer, NotInitialized or AudioConfigMismatch. Collection updates the analysis window; it does not return scores. One thread may collect while another runs the paired analyzer. Serialize calls on the collector itself.

aic::Analyzer

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.

aic::Analyzer::reset

Requests a reset of the paired collection pipeline. The next collection call clears stream state; analysis while reset is pending uses an empty padded window. Returns Success or NullPointer. Coordinate boundaries between unrelated recordings; audio configuration remains in place.

aic::Analyzer::analyze_buffered

Analyzes the latest fixed-size feature snapshot. Early windows are silence-padded; repeated calls without new input can score the same window. On success, returns all seven fields. On failure, error identifies ProcessingNotAllowed, InternalError or NullPointer and value is zero-initialized; those zeros are not valid scores. Analyze off the audio thread and serialize analyzer calls. The paired collector may continue feeding on another thread.

aic::Analyzer::terminate_session

Requests asynchronous session termination. Returns Success or NullPointer; no-op when no session exists. Does not destroy the pair or prove backend acknowledgment. Stop application analysis and destroy both objects when finished. On native targets, terminating the final active session may wait for the shared telemetry tasks to finish. Call it outside the audio callback.

aic::Analyzer::update_bearer_token

Uses token.c_str() to replace local JWT-form credentials. The original credential must also be JWT-form. Returns Success, LicenseFormatInvalid, other license errors or TokenUpdateUnsupported (and NullPointer for an invalid handle). Run on a control thread. Success is local replacement, not backend acknowledgment.

aic::AnalysisResult

A value struct returned inside Result<AnalysisResult>. Read it only after ok() succeeds. All seven fields are float. Default initialization does not initialize built-in fields; value initialization with {} zeros them. Neither form proves an analysis ran.
Read Tyto dimensions before choosing thresholds. Model scores are estimates, not a measured word error rate. C++ API index · Released analysis example

Example: check before reading a score

Run this helper off the audio thread with an analyzer whose paired collector has been initialized and fed.