Install the AFX SDK#

The Audio Effects SDK for Linux consists of the following components:

  • The core SDK package, which contains the base SDK library, headers, dependent libraries, and scripts for downloading feature packages and sample applications. You can download the core SDK package from NGC (from the SDK resource page).

  • Feature packages, which contain the model library and GPU specific model files for effects. You can download feature packages from NGC (from the model page) or use the feature download script included in the core SDK package.

  • Optional sample applications, which demonstrate how the core SDK and feature packages can be used. You can download the sample applications from GitHub or use the sample package download script included in the core SDK package.

To install the Audio Effects SDK, you must install both the base SDK and one or more feature packages.

Install the Core SDK Package#

To install the Core SDK package, extract the contents of the Audio Effects SDK archive to the required location on your computer. For example, use the following command:

tar xvf --one-top-level Audio_Effects_SDK.tar.gz

Before using the SDK, you must download and install one or more feature packages.

Obtaining SDK Feature Packages#

An SDK feature package consists of the effect library and the effect model file. Feature packages are hosted on NGC; you must download and unzip them before use.

You can download SDK feature packages directly from the NGC website or by using the download script included in the core SDK package.

Note

If the machine on which the SDK is to be deployed is not granted access to NGC (because of firewall or airgap rules), you can download feature packages to another machine and then transfer them to the target machine. The machine used for downloading feature packages does not require GPUs.

To download feature packages from the NGC website:

  1. Refer to the NGC SDK collection for the required feature (under Entities > Models). The feature page contains both the library for the effect and the models.

  2. Download the effect library corresponding to the SDK version. For example, if the SDK version is 2.0.0, download the files under version 2.0.0-lib.

  3. Extract the file under this version under the features folder in the SDK (for example, features/denoiser). After extraction, this folder should contain include files (under includes) and the feature libraries (under libs).

  4. Download the model files corresponding to the target machine GPU, SDK version, and sample rate. For example, if the SDK version is 2.0.0, the 16kHz effect is required, and the target GPU is A100 (SM 80), download the models for version 2.0.0-16k-sm80.

  5. Extract the model files under the models folder of the feature in a folder corresponding to the target machine GPU. For example, if the feature is denoiser (has feature libraries already extracted under features/denoiser) and the model files correspond to L40 GPU (SM 89), place the model files under features/denoiser/models/sm_89).

After you install the feature, the folder structure should look similar to the following structure:

$ tree Audio_Effects_SDK/features/
Audio_Effects_SDK/features/
├── README.md
├── denoiser
│   ├── include
│   │   └── denoiser.h
│   ├── lib
│   │   ├── libnv_audiofx_denoiser.so -> libnv_audiofx_denoiser.so.2
│   │   ├── libnv_audiofx_denoiser.so.2 -> libnv_audiofx_denoiser.so.2.0.0
│   │   └── libnv_audiofx_denoiser.so.2.0.0
│   └── models
│       └── sm_89
│           ├── denoiser_16k.trtpkg
│           ├── denoiser_16k_6656.trtpkg
│           ├── denoiser_48k.trtpkg
│           ├── denoiser_48k_6656.trtpkg
│           ├── denoiser_v2_16k.trtpkg
│           ├── denoiser_v2_16k_7680.trtpkg
│           ├── denoiser_v2_48k.trtpkg
│           └── denoiser_v2_48k_3840.trtpkg

The download script included in the core SDK packages automates the preceding steps. To download the feature package by using the download script:

  1. Obtain an NGC API key from the NGC website. For details, refer to the NGC User Guide.

  2. Obtain the NGC organization and team from the SDK download page. For example, if the SDK is present at https://catalog.ngc.nvidia.com/orgs/nvidia/teams/maxine/resources/maxine_linux_audio_effects_sdk, the NGC organization is nvidia and the NGC team is maxine.

  3. Unzip the SDK tarball and navigate to the features folder.

  4. Download the features by using the following commands:

    # Set the NGC API key
    
    export NGC_API_KEY="<replace with API key>"
    
    # Download models
    
    # Syntax: ./download_features.sh [--gpu <GPU> --ngc-org <NGC org> --ngc-team <NGC team> --effects effect1,effect2,effect3]
    
    # GPU can be any of the following values:
    # t4, a100, a10, a2, a16, a30, a40, l4, l40, h100, b100, b200, or rtx_pro_6000.
    # If not specified, the GPU is automatically detected.
    
    # '--effects' specifies the list of effects to be downloaded.
    # If not specified, all effects are downloaded (excluding Early Access effects).
    # To see the full list of effects supported, run './download_features.sh --help'.
    
    # For example, the following command downloads all feature packages for the automatically detected GPU (excluding Early Access features).
    
    ./download_features.sh
    
    # To download all feature packages for the automatically detected GPU including Early Access features:
    
    ./download_features.sh --effects aec-16k,aec-48k,dereverb-16k,dereverb-48k,dereverb_denoiser-16k,dereverb_denoiser-48k,denoiser-16k,denoiser-48k,superres-8k_to_16k,superres-16k_to_48k,studio_voice-16k,studio_voice-48k,speaker_focus-16k,speaker_focus-48k,voice_font
    
    # To download all feature packages for T4 (and override the automatically detected GPU):
    
    ./download_features.sh --gpu t4
    
    # To download just the Superresolution and AEC features for T4:
    
    ./download_features.sh --gpu t4 --effects superres-16k_to_48k,superres-8k_to_16k,aec-16k,aec-48k
    

For Older Drivers, Use CUDA Forward-Compatible Upgrade#

Applications can use the SDK with older drivers (470/535/550) by using the CUDA Forward-Compatible upgrade path. (For more information, refer to Forward Compatibility.)

To use older supported drivers with the SDK, download the user-mode CUDA libraries (libcuda.so.*) and the JIT compiler libraries for PTX files (libnvidia-ptxjitcompiler.so.*) from one of the following locations:

  • The CUDA 12.8 Toolkit/datacenter drivers.

  • The CUDA network repositories (cuda-compat-12-8).

Before you run any applications using the SDK, ensure that LD_LIBRARY_PATH contains the location of these libraries.

For example, to use the CUDA network repository on an Ubuntu 18.04 system with older drivers:

  1. Go to CUDA Toolkit 12.8.1 Downloads.

    1. Under Operating System, click Linux.

    2. Under Distribution, click Ubuntu.

    3. Under Installer Type, click deb (network).

    4. To add the CUDA repository to the system, follow the steps under Installation Instructions.

  2. Update the apt repository cache:

    $ sudo apt-get update
    
  3. Install the compatibility package:

    $ sudo apt-get install -y cuda-compat-12-8
    

    The command in this step installs the compatibility package libraries under /usr/local/cuda-12.8/compat.

  4. When you run the SDK applications, append this path to LD_LIBRARY_PATH:

    # Add path to LD_LIBRARY_PATH
    
    # Note: This command works only for the current terminal session. Add to ~/.bashrc or similar to make this permanent.
    # For more details, refer to your distribution's documentation.
    
    $ export LD_LIBRARY_PATH=/usr/local/cuda-12.8/compat:$LD_LIBRARY_PATH
    # Run application
    $ ./run_effects.sh -e denoiser -s 48
    

    For more information, refer to Forward Compatibility.