Run the Sample Application#

To run the application directly from a Command Prompt window, use .\effects_demo.exe -c <config-file> and replace <config-file> with the path of an existing effect configuration file.

<config-file> specifies the path of an existing effect configuration file. The helper scripts create temporary configuration files in the sample application directory, run effects_demo.exe, and remove those files when processing completes.

Configurations for effects can be generated on the fly using run_effects_demo.bat. For more information, see samples\README.txt. After building, open samples\build\Release\scripts for x64 or samples\build-arm64\Release\scripts for NVIDIA N1X and run the helper from that build-produced directory.

The sample application also includes run_denoiser_48k.bat for the 48-kHz denoiser model. The following example generates its configuration and runs the effects_demo.exe sample application:

.\run_denoiser_48k.bat

The helper detects the GPU architecture on x64 and selects Blackwell on NVIDIA N1X. Use -g only to override detection on x64.

The config files contain the following parameters with one pair per line:

effect <effect>

Specifies the effect that will be applied, such as denoiser. For a complete list of supported effects, refer to the introduction.

effect_version <version> (Windows only)

Specifies the effect version for the denoiser. 1 executes BNR 1.0 and 2 executes BNR 2.0. Any other value is rejected with a nonzero exit code. Other effects use version 1 and reject an explicit non-1 value.

input_sample_rate <sample-rate>

Specifies the input sample rate for the model file that will be used in the sample application; for example, 16000 or 48000. The value must match both the loaded model’s input rate and the input WAV rate.

output_sample_rate <sample-rate>

Specifies the output sample rate for the model file that will be used in the sample application; for example, 16000 or 48000. The value must match the loaded model’s output rate.

On Windows x64 and NVIDIA N1X, effects_demo compares the configured rates with the loaded model before creating output. It also verifies the input WAV rate. A mismatch returns a nonzero exit code and does not produce an output WAV.

model <model-file>

Specifies the path of the model file that will be used in the sample application fetch from the core SDK package; for example, denoiser_48k.trtpkg.

Note

In the previous version of the SDK, the models were in the bin/models folder. In the core SDK package, the models are now in features/<feature>/models.

On NVIDIA N1X (ARM64), models are under features/<feature>/models/blackwell. The helper scripts select this directory automatically, so omit -g.

mic_profile_model <model-file>

(Studio Voice Low Latency only) Specifies the path to the microphone-profile companion model. This entry is required when mic_profile_id is 0 through 5.

mic_profile_id <profile-id>

(Studio Voice Low Latency only) Selects a microphone profile. The default, -1, disables microphone profiling. Values 0 through 5 select the profiles described in About the Studio Voice Effect.

Note

In the previous version of the SDK, the models were in the bin/models folder. In the core SDK package, the models are now in features/<feature>/models.

input_wav <input-audio-file>

Specifies the path of the noisy input audio .wav file to use, for example, noisy_48k.wav. The file should contain mono channel audio in signed 16-bit or 32-bit float format with a basic WAV header

Note

The sample inputs (present in folder samples/effects_demo in previous versions of the SDK) have been moved to samples/effects_demo/input_files.

Note

Sample input audio files are included with the sample application.

output_wav <output-audio-file>

Specifies the path of the file to which the applied effect audio output is to be written, for example, denoised_48k.wav.

Note

Only the .wav file format is supported.

intensity_ratio <intensity-ratio>

Specifies the effect intensity ratio. The value of this parameter ranges from 0.0f to 1.0f, where a higher value indicates a stronger suppression of noise/reverb. A value of 0.0f is equivalent to a passthrough of input audio.

real_time <enable>

Simulates real-time audio input, set to 1 to enable or 0 to disable (disabled by default). When this option is enabled each audio frame is passed to the SDK with a delay of 10 ms, similar to how audio is received from a physical device or stream.

enable_vad <enable>

Specifies whether to enable the Voice Activity Detection (VAD) algorithm:

  • 1 to enable

  • 0 to disable

Any other value is rejected with a nonzero exit code. The default is 1 for denoiser version 2 at 16 kHz and 0 otherwise; an explicitly supplied 0 is honored. When this option is enabled, the sample application passes each audio frame to the VAD algorithm to check voice activity, and zeros out the frames that do not have any activity.

Use the Helper Script to Run the Sample Application#

run_effects_demo.bat is a Windows batch file that can be used to run the sample application for various effects. This script generates a config file for the specified effect, the GPU, and sample inputs for that effect and runs effects_demo.exe on the sample files.

If the effect is to be applied to custom input files, the input files can be placed in the input sample folder that corresponds to the effect/sample rate. When you run the helper script, the effect is applied on the inputs, and the processed audio outputs will be placed in the output folder that corresponds to the effect/output sample rate.

For example, to apply the Background Noise Removal (Denoiser effect) on custom 48-kHz files, copy the files to input_files/denoiser/48k and run .\run_effects_demo.bat. Processed outputs will be generated in output_files/denoiser/48k. Refer to samples\README.txt for further details.

The full command syntax is .\run_effects_demo.bat -g <architecture> -e <effect> -isr <input_sr> -osr <output_sr> -ir <intensity_ratio> -ev <effect_version> -vad <enable_vad>. Replace each bracketed value with one of the following supported values:

  • architecture: GPU architecture. Supported values are turing, ampere, ada, and blackwell. On NVIDIA N1X (ARM64), omit -g; the script selects the blackwell Windows on Arm model directory automatically.

  • effect: Effect to be applied. Some of the supported values are denoiser, dereverb, dereverb_denoiser, and superres.

  • input_sr: Input sample rate for the effect. Supported values are 8k, 16k, and 48k.

  • output_sr: Output sample rate for the effect. Supported values are 16k and 48k.

  • effect_version: Denoiser version 1 or 2. Other values are rejected instead of being silently normalized.

  • enable_vad: 0 or 1. Other values are rejected. Omit this option to use the documented default.

The same argument and sample-rate validation applies to x64 and NVIDIA N1X.

For example, to run the 16-kHz Dereverb effect on the current GPU, use the following command:

.\run_effects_demo.bat -e dereverb -isr 16k -osr 16k

To run Studio Voice Low Latency with the Warm microphone profile on NVIDIA N1X, use the following command:

.\run_effects_demo.bat -e studio_voice_low_latency -isr 48k -osr 48k -mp 5