> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ai-coustics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Quickstart

> Real-time speech enhancement with Quail and Rook on the ai-coustics SDK.

This tutorial will get you started using our SDK with your preferred language bindings.

<Steps>
  <Step title="Get an SDK License">
    Self-service SDK Keys can be generated on [the developer platform](https://developers.ai-coustics.com).

    <Info title="Telemetry">
      These keys are configured to authorize with our backend and collect telemetry.
    </Info>

    <Info>
      To use the SDK without telemetry, please contact us directly to obtain a special offline license that operates without any online authentication.
    </Info>
  </Step>

  <Step title="Select a Model">
    Models can be either downloaded by the SDK using a model ID (e.g. `quail-l-8khz`) or manually at [artifacts.ai-coustics.io](https://artifacts.ai-coustics.io).
  </Step>

  <Step title="Pick your language">
    <Tabs>
      <Tab title="Python" icon="Python">
        ## Installation

        Add our SDK to your Python application with native NumPy support.

        Install with [uv](https://docs.astral.sh/uv/):

        ```bash theme={null}
        uv add aic-sdk
        ```

        Or with pip:

        ```bash theme={null}
        pip install aic-sdk
        ```

        ## Quickstart

        Run with [uv](https://docs.astral.sh/uv/):

        ```bash theme={null}
        uv run quickstart.py
        ```

        ```python theme={null}
        # /// script
        # requires-python = ">=3.10,<3.14"
        # dependencies = [
        #   "aic-sdk",
        #   "numpy"
        # ]
        # ///

        # quickstart.py

        import aic_sdk as aic
        import numpy as np
        import os

        # Get your license key from the environment variable
        license_key = os.environ["AIC_SDK_LICENSE"]

        # Download and load a model (or download manually at https://artifacts.ai-coustics.io/)
        model_path = aic.Model.download("quail-vf-2.1-l-16khz", "./models")
        model = aic.Model.from_file(model_path)

        # Get optimal configuration
        config = aic.ProcessorConfig.optimal(model, num_channels=2)

        # Create and initialize processor in one step
        processor = aic.Processor(model, license_key, config)

        # Process audio (2D NumPy array: channels × frames)
        audio_buffer = np.zeros((config.num_channels, config.num_frames), dtype=np.float32)
        processed = processor.process(audio_buffer)
        ```
      </Tab>

      <Tab title="Node.js" icon="Node">
        ## Installation

        Integrate our SDK into your Node.js application with our native bindings.

        ```bash theme={null}
        npm install @ai-coustics/aic-sdk
        ```

        ## Quickstart

        ```javascript theme={null}
        const { Model, Processor } = require("@ai-coustics/aic-sdk");

        // Get your license key from the environment variable
        const licenseKey = process.env.AIC_SDK_LICENSE;

        // Download and load a model (or download manually at https://artifacts.ai-coustics.io/)
        const modelPath = Model.download("quail-vf-2.1-l-16khz", "./models");
        const model = Model.fromFile(modelPath);

        // Get optimal configuration
        const sampleRate = model.getOptimalSampleRate();
        const numFrames = model.getOptimalNumFrames(sampleRate);
        const numChannels = 2;

        // Create and initialize processor
        const processor = new Processor(model, licenseKey);
        processor.initialize(sampleRate, numChannels, numFrames, false);

        // Process audio (Float32Array, interleaved: [L0, R0, L1, R1, ...])
        const audioBuffer = new Float32Array(numChannels * numFrames);
        processor.processInterleaved(audioBuffer);
        ```
      </Tab>

      <Tab title="Rust" icon="Rust">
        ## Installation

        Add to your project:

        ```sh theme={null}
        cargo add aic-sdk --features "download-lib"
        ```

        ## Quickstart

        ```rs theme={null}
        use aic_sdk::{include_model, ProcessorConfig, Model, Processor};

        // Embed model at compile time (or use Model::from_file to load at runtime)
        static MODEL: &'static [u8] = include_model!("/path/to/model.aicmodel");

        fn main() -> Result<(), Box<dyn std::error::Error>> {
            // Get your license key from the environment variable
            let license_key = std::env::var("AIC_SDK_LICENSE")?;

            // Load the embedded model (or download manually at https://artifacts.ai-coustics.io/)
            let model = Model::from_buffer(MODEL)?;

            // Get optimal configuration based on the selected model
            let config = ProcessorConfig::optimal(&model).with_num_channels(2);

            // Create a processor and initialize it
            let mut processor = Processor::new(&model, &license_key)?.with_config(&config)?;

            // Process audio (interleaved: channels × frames)
            let mut audio_buffer = vec![0.0f32; config.num_channels as usize * config.num_frames];
            processor.process_interleaved(&mut audio_buffer)?;

            Ok(())
        }
        ```
      </Tab>

      <Tab title="C++">
        ## Installation

        The easiest way to integrate the SDK into your C++ project is using CMake FetchContent. This will automatically download the source code and libraries, then link them to your project.

        ```cmake theme={null}
        include(FetchContent)

        set(AIC_SDK_ALLOW_DOWNLOAD ON CACHE BOOL "Allow C SDK download at configure time")

        FetchContent_Declare(
            aic_sdk
            GIT_REPOSITORY https://github.com/ai-coustics/aic-sdk-cpp.git
            GIT_TAG        0.21.0
            GIT_SHALLOW    TRUE
        )
        FetchContent_MakeAvailable(aic_sdk)

        target_link_libraries(my_app PRIVATE aic-sdk)
        ```

        ## Quickstart

        ```cpp theme={null}
        #include "aic.hpp"

        #include <vector>
        #include <cstdlib>

        int main() {
            // Get your license key from the environment variable
            const char* license_key = std::getenv("AIC_SDK_LICENSE");

            // Load a model from file (download models at https://artifacts.ai-coustics.io/)
            auto model = aic::Model::create_from_file("./models/model.aicmodel").take();

            // Create configuration with model's optimal settings
            auto sample_rate = model.get_optimal_sample_rate();
            auto num_frames = model.get_optimal_num_frames(sample_rate);
            aic::ProcessorConfig config(sample_rate, num_frames, 2);  // 2 channels (stereo)

            // Create and initialize processor
            auto processor = aic::Processor::create(model, license_key).take();
            processor.initialize(config.sample_rate, config.num_channels, config.num_frames,
                                 config.allow_variable_frames);

            // Process audio (planar layout: separate buffer per channel)
            std::vector<float> left(config.num_frames, 0.0f);
            std::vector<float> right(config.num_frames, 0.0f);
            std::vector<float*> audio = {left.data(), right.data()};
            processor.process_planar(audio.data(), config.num_channels, config.num_frames);

            return 0;
        }
        ```
      </Tab>

      <Tab title="C">
        ## Installation

        Download the SDK binaries from the [releases page](https://github.com/ai-coustics/aic-sdk-c/releases). We provide:

        * **Static libraries** (`.a`, `.lib`) for linking directly into your application
        * **Dynamic libraries** (`.so`, `.dll`, `.dylib`) for runtime loading
        * **Multiple platforms**: Linux, Windows, macOS
        * **Multiple architectures**: x86\_64, ARM64

        ## Quickstart

        ```c theme={null}
        #include <stdlib.h>
        #include "aic.h"

        int main() {
            // Get your license key from the environment variable
            const char* license_key = getenv("AIC_SDK_LICENSE");

            // Download and load a model (or download manually at https://artifacts.ai-coustics.io/)
            struct AicModel* model = NULL;
            aic_model_create_from_file(&model, "path/to/model.aicmodel");

            // Create processor with license key
            struct AicProcessor* processor = NULL;
            aic_processor_create(&processor, model, license_key, NULL);

            // Get optimal configuration
            uint32_t sample_rate;
            size_t num_frames;
            aic_model_get_optimal_sample_rate(model, &sample_rate);
            aic_model_get_optimal_num_frames(model, sample_rate, &num_frames);

            // Initialize processor with optimal settings
            aic_processor_initialize(processor, sample_rate, 2, num_frames, false);

            // Process audio (planar layout: separate buffers per channel)
            float* audio_left = (float*) calloc(num_frames, sizeof(float));
            float* audio_right = (float*) calloc(num_frames, sizeof(float));
            float* audio_planar[2] = {audio_left, audio_right};
            aic_processor_process_planar(processor, audio_planar, 2, num_frames);

            // Cleanup
            free(audio_left);
            free(audio_right);
            aic_processor_destroy(processor);
            aic_model_destroy(model);
            return 0;
        }
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Find out more">
    <CardGroup cols={2}>
      <Card title="Models Overview" icon="cubes" href="/reference/sdk/models">
        Explore the different SDK and API models available and their use cases.
      </Card>

      <Card title="All SDK Language Bindings" icon="code" href="/reference/sdk/language-bindings">
        Discover all available SDK bindings for various programming languages.
      </Card>

      <Card title="AirTen Runtime" icon="feather-pointed" href="https://ai-coustics.com/2025/07/24/meet-airten-the-fastest-audio-real-time-runtime-period/">
        Our Rust-based, no\_std, ultra-fast runtime embedded in the SDK.
      </Card>

      <Card title="Performance" icon="gauge" href="/reference/concepts/performance">
        Learn more about the SDK's runtime performance.
      </Card>

      <Card title="SDK Playground" icon="play" href="https://developers.ai-coustics.com/dashboard/sdk/playground">
        Compare transcripts and WER with and without Quail Voice Focus in our Developer Platform.
      </Card>

      <Card title="Hugging Face Demo" icon="face-smile" href="https://huggingface.co/spaces/ai-coustics/VoiceFocus">
        Try Quail Voice Focus without an account on HuggingFace.
      </Card>
    </CardGroup>
  </Step>
</Steps>
