Chain Multiple Effects#
The effects_demo sample application also provides config files in which
multiple effects are run in a chain. For more information, see Create a Chained Audio Effect.
For example, the following command runs the 16-kHz to 48-kHz Superresolution effect followed by the 48-kHz Denoiser effect on input audio:
effects_demo.exe -c superres16kto48k_denoise48k_chain_cfg.txt
To run effects in a chain, the configuration file uses syntax similar to the syntax used when running single effects, with the following changes:
effect <effect>
Specifies the effects in sequence to be used for chaining. For more information about possible chaining combinations, see Create a Chained Audio Effect.
Note
Chaining effects only support combinations of the Superres and the Denoiser/Dereverb/Combined Denoiser+Dereverb effect and Denoiser + Speaker Focus. Other effect chains are not supported. If combining the Denoiser effect and Dereverb effect, use the combined Denoiser+Dereverb model. For more information, see About the Noise Removal/Background Noise Suppression Effect.
model <model-file-1,model-file-2>
Specifies the path of the model files in sequence that will be used in the sample application, for example,
superres_16kto48k.trtpkg,denoiser_48k.trtpkg.
intensity_ratio <intensity-ratio-1,intensity-ratio-2>
Specifies the intensity ratio for the effects. The value of this parameter ranges from
0.0fto1.0f, where a higher value indicates a stronger suppression of noise/reverb. A value of0.0fis equivalent to a passthrough of input audio.
Use the Helper Script to Chain Multiple Effects#
Users can modify the sample config/batch files provided with the SDK and
use these files with effect_demo.exe. If the effect is to be applied on
custom input files, the files can be placed in the input sample folder
that corresponds to the effect/sample rate. Running the helper script
will apply the effect on these inputs, and the processed audio outputs
will be placed in the output folder corresponding to the effect/output
sample rate.
For example, to apply the Background Noise Removal effect on custom
48kHz files, copy the files to input_files/denoiser/48k and run
run_effects_demo.bat. The processed outputs will be generated in
output_files/denoiser/48k.
To apply the Background Noise Removal (Denoiser effect) + Superres
effect on 16k files, copy the files in input_files/chaining/denoiser/16k
folder and use run_effects_demo.bat. The outputs will be generated in
output_files/chaining/denoiser16k_superres16kto48k.
Chained effects can be run with the helper script using the following command:
run_effects_demo.bat -g <architecture> -e <effect_1> -isr <in_sr_1> -osr <out_sr_1> -e2 <effect_2> -isr2 <in_sr_2> -osr2 <out_sr_2>
architecture: GPU Supported Architecture. Supported values areturing,ampere,ada, andblackwell.effect_1: 1st Effect to be applied. Supported values aredenoiser,dereverb,dereverb_denoiser, andsuperres.in_sr_1: Input Sample Rate for 1st effect. Supported values are8k,16k, and48k.out_sr_1: Output Sample Rate for 1st effect. Supported values are16kand48k.effect_2: 2nd Effect to be applied. Supported values aredenoiser,dereverb,dereverb_denoiser, andsuperres.in_sr_2: Input Sample Rate for 2nd effect. Supported values are8k,16k, and48k.out_sr_2: Output Sample Rate for 2nd effect. Supported values are16kand48k.
For next steps, refer to Use the Audio Effects SDK in Applications.