@ai-coustics/aic-sdk 0.24.0, Core SDK 0.24.0. API index · Node.js quickstart.
Model
Read-only model weights. Use Model.fromFile; there is no public constructor. Enhancement, VAD and analysis models are different types. A model can supply multiple independent compatible objects. Those objects retain the weights after this handle is disposed. The file stays memory-mapped until the last dependent object is released; do not change or delete it meanwhile.
Model.fromFile
path names a local .aicmodel file. Loads it synchronously and returns a new handle. Throws for an invalid path, filesystem failure, corrupt model or incompatible format. It does not download the model. Keep the file unchanged while any object retains it.
Model.dispose
Model has been disposed; existing processors, VADs and analyzers retain their own model reference. Static factories remain callable.
Model.download
modelId is the exact catalog ID; downloadDir is the destination directory, created if needed. Returns a promise for the local path. Work runs on the libuv pool. The downloader resolves a compatible artifact through its manifest/cache and verifies the checksum of an existing file before reuse. It can fetch or refresh metadata and replace an invalid cached file. It can reject for an unknown/incompatible ID, network, checksum or filesystem failure. For a deployment that must load without downloads, provision the file first and use fromFile.
Model.getId
Model.getOptimalSampleRate
Model.getOptimalBlockSize
sampleRate is the intended whole-number input rate in Hz. Returns the corresponding optimal mono block length in samples as a JavaScript number. This query does not validate an entire audio configuration; initialize does. Throws after disposal.
OtelConfig
A TypeScript object interface, not a JavaScript constructor. Accepted by Processor, ProcessorAsync, Vad and VadAsync. Supplying it overrides environment-based OpenTelemetry settings for that instance. Analyzer has no otelConfig argument in this release. This configuration does not replace SDK authentication or usage reporting.
OtelConfig.enable
OtelConfig.sessionId
OtelConfig.exportIntervalMs
0 requests the SDK default of 60,000 ms. The wrapper passes a 32-bit unsigned integer to the SDK.
getCompatibleModelVersion
getVersion
Example
Save asinspect-model.cjs and run node inspect-model.cjs path/to/model.aicmodel after installing the pinned package. This local inspection needs no SDK key. The output identifies the actual model and its native geometry.
inspect-model.cjs