Type Definitions#
This section describes the type definitions used in the AFX SDK.
NvAFX_EffectSelector#
This type definition provides selector strings for the various audio effect types:
typedef const char* NvAFX_EffectSelector;
The currently supported selectors are:
NVAFX_EFFECT_DENOISER : "denoiser"
Denoiser audio effect (see About the Noise Removal/Background Noise Suppression Effect).
NVAFX_EFFECT_DEREVERB : "dereverb"
De-reverb effect (see About the Room Echo Removal/Room Echo Cancellation Effect).
NVAFX_EFFECT_DEREVERB_DENOISER : "dereverb_denoiser"
Combined De-reverb and Denoiser effects (see About the Noise Removal/Background Noise Suppression Effect).
NVAFX_EFFECT_AEC : "aec"
Acoustic Echo Cancellation (AEC) effect (see About the Acoustic Echo Cancellation Effect).
NVAFX_EFFECT_SUPERRES : “superres”
Audio Super-resolution effect (see About the Audio Super-Resolution Effect).
NVAFX_EFFECT_STUDIO_VOICE_HIGH_QUALITY : "studio_voice_high_quality"
Studio Voice High Quality effect (see About the Studio Voice Effect).
NVAFX_EFFECT_STUDIO_VOICE_LOW_LATENCY : "studio_voice_low_latency"
Studio Voice Low Latency effect (see About the Studio Voice Effect).
NVAFX_EFFECT_SPEAKER_FOCUS
Speaker Separation effect (see About the Speaker Focus Effect).
NVAFX_EFFECT_VOICE_FONT_HIGH_QUALITY : “voice_font_high_quality”
Voice Font High Quality effect (for more details, see About the Voice Font Effect).
NVAFX_EFFECT_VOICE_FONT_LOW_LATENCY : “voice_font_low_latency”
Voice Font High Quality effect (for more details, see About the Voice Font Effect).
NVAFX_CHAINED_EFFECT_DENOISER_16k_SUPERRES_16k_TO_48k
Chained effect (Denoiser 16k + Superres 16k to 48k)
NVAFX_CHAINED_EFFECT_DEREVERB_16k_SUPERRES_16k_TO_48k
Chained effect (Dereverb 16k + Superres 16k to 48k)
NVAFX_CHAINED_EFFECT_DEREVERB_DENOISER_16k_SUPERRES_16k_TO_48k
Chained effect (Dereverb+Denoiser 16k + Superres 16k to 48k)
NVAFX_CHAINED_EFFECT_SUPERRES_8k_TO_16k_DENOISER_16k
Chained effect (Superres 8k to 16k + Denoiser 16k)
NVAFX_CHAINED_EFFECT_SUPERRES_8k_TO_16k_DEREVERB_16k
Chained effect (Superres 8k to 16k + Dereverb 16k)
NVAFX_CHAINED_EFFECT_SUPERRES_8k_TO_16k_DEREVERB_DENOISER_16k
Chained effect (Superres 8k to 16k + Dereverb+Denoiser 16k)
NVAFX_CHAINED_EFFECT_DENOISER_16k_SPEAKER_FOCUS_16k
Chained effect (Denoiser 16k + Speaker Focus 16k)
NVAFX_CHAINED_EFFECT_DENOISER_48k_SPEAKER_FOCUS_48k
Chained effect (Denoiser 48k + Speaker Focus 48k)
NvAFX_ParameterSelector#
This type definition provides selector strings for audio effect parameters:
typedef const char* NvAFX_ParameterSelector;
The currently supported selectors are:
NVAFX_PARAM_MODEL_PATH : "model_path"
A character string that specifies the path to the model file for the audio effect.
NVAFX_PARAM_REFERENCE_MODEL_PATH : "reference_model_path" (Voice Font, Windows only)
A character string that specifies the path to the reference model file for the audio effect.
NVAFX_PARAM_INPUT_SAMPLE_RATE : "input_sample_rate"
An unsigned integer that specifies the input audio sample rate for the audio effect.
NVAFX_PARAM_OUTPUT_SAMPLE_RATE : "output_sample_rate"
An unsigned integer that specifies the output audio sample rate for the audio effect.
NVAFX_PARAM_NUM_INPUT_CHANNELS : "num_input_channels"
An unsigned integer that specifies the number of audio channels for the Audio effect.
NVAFX_PARAM_NUM_OUTPUT_CHANNELS : "num_output_channels"
An unsigned integer that specifies the number of output audio channels for the Audio effect.
NVAFX_PARAM_NUM_STREAMS : "num_streams"
An unsigned integer that specifies the number of audio streams to be processed by the audio effect.
NVAFX_PARAM_INTENSITY_RATIO : "intensity_ratio"
A float value that specifies the factor that ranges from
0.0to1.0. Setting the factor to0.0is identical to a pass through, and a value of1.0provides the maximum possible impact of the effect.
NVAFX_PARAM_EFFECT_VERSION : "effect_version"
An integer value that specifies which version of the effect will be used. Supported only on the Denoiser model (BNR 2.0).
NVAFX_PARAM_REFERENCE_AUDIO : "reference_audio" (Voice Font only)
A float array that specifies the reference audio for the Voice Font audio effect.
NVAFX_PARAM_REFERENCE_NUM_SAMPLES_PER_INPUT_FRAME : "reference_num_samples_per_input_frame" (Voice Font only)
Number of samples per frame required for setting reference audio.
NVAFX_PARAM_NUM_SAMPLES_PER_INPUT_FRAME : "num_samples_per_input_frame"
An unsigned integer that specifies the number of samples per input frame per audio stream for the audio effect.
NVAFX_PARAM_NUM_SAMPLES_PER_OUTPUT_FRAME : "num_samples_per_output_frame"
An unsigned integer that specifies the number of samples per output frame per audio stream for the audio effect.
NVAFX_PARAM_SUPPORTED_NUM_SAMPLES_PER_FRAME : "supported_num_samples_per_frame"
A list of U32 values specifying the supported values for number of samples per frame. This value can be queried before model load after the input sample rate is set.
Linux SDK only:
NVAFX_PARAM_ACTIVE_STREAMS : "active_streams"
A list of NvAFX_Bool values that specify whether the corresponding stream is active.
NVAFX_PARAM_CHAINED_EFFECT_GPU_LIST : "chained_effect_gpu_list"
A list of U32 values specifying the GPUs to be used in chained effects. Each effect in the chain will use the corresponding GPU from the list.
Windows SDK Only:
NVAFX_PARAM_USER_CUDA_CONTEXT : "user_cuda_context"
An unsigned integer value that allows SDK users to disable SDK internal context management. To disable internal context management, set this value to 1. This value cannot be changed after the model is loaded for that particular session.
NVAFX_PARAM_DISABLE_CUDA_GRAPH : "disable_cuda_graph"
An unsigned integer value that specifies whether to enable CUDA graphs (enabled by default).
To disable CUDA graphs, set this value to
1.To enable CUDA graphs, set this value to
0.For more information about CUDA Graphs, refer to Getting Started with CUDA Graphs.
Note:
NVAFX_PARAM_USE_DEFAULT_GPUandNVAFX_PARAM_USER_CUDA_CONTEXTcannot be used at the same time.The following selectors have been deprecated:
NVAFX_PARAM_NUM_CHANNELS:"num_channels"
NVAFX_PARAM_SAMPLE_RATE:"sample_rate"
NVAFX_PARAM_NUM_SAMPLES_PER_FRAME:"num_samples_per_frame"
NvAFX_Handle#
An opaque handle that is associated with an instance of an audio effect:
typedef void* NvAFX_Handle;
NvAFX_Bool#
This type definition is set to NVAFX_TRUE to represent true, else
NVAFX_FALSE to represent false:
typedef char NvAFX_Bool;
Logging_cb_t#
A callback function type that is used in the NvAFX_InitializeLogger API:
typedef void(*logging_cb_t)(LoggingSeverity level, const char* log,
void* userdata); (Linux Only)
typedef void(*logging_cb_t)(void* user_data, const char* msg); (Windows Only)
LoggingSeverity#
Levels of LoggingSeverity used in the NvAFX_InitializeLogger API. Refer to NvAFX_InitializeLogger for more information:
typedef enum LoggingSeverity_t {
LOG_LEVEL_FATAL, (Windows Only)
LOG_LEVEL_ERROR,
LOG_LEVEL_WARNING,
LOG_LEVEL_INFO,
} LoggingSeverity
LoggingTarget#
Logging target used in NvAFX_InitializeLogger API. Refer to NvAFX_InitializeLogger for more information:
typedef enum LoggingTarget_t
{
LOG_TARGET_NONE = 0x0,
LOG_TARGET_STDERR = 0x1,
LOG_TARGET_FILE = 0x2,
LOG_TARGET_CALLBACK = 0x4,
} LoggingTarget;