Installation
Use a C11 compiler, CMake 3.24 or later and a supported macOS, Linux or Windows platform. Linux uses the GNU libc distribution; see the compatibility matrix. On Windows, run build commands in a Visual Studio developer terminal with the C++ build tools installed. Create an empty project directory:sdk/include/aic.h and sdk/lib/. Choose the archive for your compiler’s target architecture when cross-compiling. Release 0.24.0 includes all distributions.
Quickstart
Prepare the key, model and input
Generate an SDK key on the developer platform. Set it in the terminal where you will run the program. Keep it out of source control and shared logs.YOUR_SDK_KEY with your key. This pins a format-7 build of quail-vf-2.2-l-16khz. Quail Voice Focus isolates the primary speaker for speech-to-text (STT) input. Downloading the model in advance does not remove SDK key authorization requirements; see authentication.
Download the noisy speech fixture and save it as input.wav in this project directory. It contains 56,080 mono PCM16 samples at 16 kHz (3.505 seconds). The fixture guide includes attribution, checksums and the aligned clean reference.
For your own recording, export mono, 16 kHz, signed 16-bit PCM WAV, at most 60 seconds long. Renaming a file does not convert it.
Add WAV file handling
The example uses dr_wav 0.14.4 for file I/O. Download its pinned single header into the project directory:audio_file.h alongside dr_wav.h. It checks input format and length, reads float samples and writes a 32-bit float WAV.
audio_file.h
Save the program
Save asquickstart.c:
quickstart.c
Build and run
Save this complete project asCMakeLists.txt:
CMakeLists.txt
aic-c-quickstart:
input.wav and model.aicmodel:
Check the result
A successful run exits with code zero, prints the native SDK version and resolved model ID, then reportsProcessed N samples at 16000 Hz; wrote enhanced.wav, where N is your input’s sample count (56080 for the supplied fixture). Open enhanced.wav in your audio editor: it should be mono, 16 kHz and the same duration as input.wav. The output is a 32-bit float WAV; the input is PCM16.
The program pads the final block, flushes the delayed tail and removes the initial processing delay, preserving the original sample count. File writes are checked; discard any incomplete file if writing fails.
Listen to both files and compare them with the same STT settings to evaluate quality.
Recover from an error
The CMake build uses the shared SDK library. Keep
sdk/lib in place for this tutorial. On Windows, it copies aic.dll beside the executable; keep that DLL with your application. See the C binding guide for deployment and static linking.
Adapt this example
Keep one processor per stream and process blocks in order. Reset its context on a discontinuity or before unrelated audio. Downmix stereo or use a processor per channel. See audio format and streams and state. The helper reads a short recording into memory. For long files and live audio, use bounded buffers and keep file I/O, model loading and session teardown outside the audio callback. For human-listening enhancement, evaluate Rook Multi Speaker.Integration behavior
Model creation, initialization and teardown allocate resources or may block. Run them outside the real-time audio callback. Keep input/output buffer storage alive throughout each synchronous processing call.
Link and deploy
The tutorial uses a shared library to keep the build configuration small. Ship the matchinglibaic.so, libaic.dylib or aic.dll with your application and configure the platform’s loader path. A successful local build does not ensure a relocated application can find its library.
Static archives are also available in the same release. Static linking requires platform system libraries; on Windows, select the archive matching the MSVC runtime flavor. Follow the release’s build guidance rather than mixing headers and binaries from different SDK versions.
For voice activity detection (VAD) or Tyto analysis, use the dedicated VAD or analyzer APIs and their corresponding model types. See the released examples. Historical examples under docs/0.24.0 describe that release; check compatibility when upgrading.