Run the Sample Application#

To run the application, in a Command Prompt window, enter the following command:

effects_demo.exe -c <config-file>

<config-file> specifies the path of the effect sample configuration file, such as denoise48k_cfg_turing.txt. The sample config file is created when you run the scripts present in the script folder.

Configurations for other effects can be generated on the fly using run_effects_demo.bat. For more information, see readme.txt in the samples/effects_demo folder.

The sample application also includes the following sample Windows batch/config files for the 48k denoiser model:

run_denoiser_48k.bat -g <architecture>

The following example runs the effects_demo.exe sample application:

effects_demo.exe -c denoise48k_cfg_<architecture>.txt

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 a particular effect. Supported only for denoiser effect. For example, 1 executes BNR 1.0 and 2 executes BNR 2.0. For a complete list of supported effects, refer to the introduction.

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.

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.

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.

reference_model <reference-model-file>

Specifies the path of the reference model file that will be used in the sample application, for example, voice_font_reference.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.

This reference model is only for the Voice Font effect. The single model supports both 16-kHz and 48-kHz sample rates.

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/effets_demo/input_files.

reference_wav <reference-audio-file>

(Voice Font only) Specifies the path of the reference audio .wav file to use with the Voice Font effect, for example, voice_font_reference.wav.

input_farend_wav <input-farend-audio-file>

(AEC only) Specifies the path of the farend input audio .wav file to use, for example, farend_48k.wav.

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

By default, the parameter is disabled. 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 effect_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 the readme.txt file in samples/effects_demo folder for further details.

Run an effect by using the following command:

run_effects_demo.bat -g <architecture> -e <effect> -isr <input_sr> -osr <output_sr> -ir <intensity_ratio> -ev <effect_version> -vad <enable_vad>
  • architecture: GPU architecture. Supported values are turing, ampere, ada, and blackwell.

  • effect: Effect to be applied. Some of the supported values are denoiser, dereverb, dereverb_denoiser, aec, 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.

For example, to run the 16-kHz AEC effect on ada, use:

run_effects_demo.bat -g ada -e aec -isr 16k -osr 16k