> This page is for NVIDIA Background Noise Removal on Holoscan for Media, version 2.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 2.0.0 (Latest) (default): https://docs.nvidia.com/nim/maxine/bnr-h4m/2.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/maxine/llms.txt.

# Advanced Usage

## Set Startup Denoising Strength

Use `intensityRatio` to set the denoising strength used when the BNR NIM pod starts:

```yaml
intensityRatio: 0.75
```

For the operator custom resource, use the string form:

```yaml
parameters:
  intensityRatio: "0.75"
```

Allowed values are from `0.0` to `1.0`, where `0.0` applies no suppression and `1.0` applies maximum suppression.

## Update Denoising Strength at Runtime

The startup value is set with `intensityRatio`, but the running BNR NIM can also update the denoising strength dynamically through the NIM HTTP API. The service chart exposes this API on the `<appName>-endpoint` service's `nim-http` port, which defaults to `8000`.

```bash
NIM_API=http://<appName>-endpoint:8000
```

For external access with `service.type: NodePort`, use the node address and the assigned or configured NodePort for the `nim-http` Service port. The default `nim-http` NodePort is `32516`:

```bash
NIM_API=http://<node-ip>:32516
```

Set the runtime intensity to `0.5`:

```bash
curl -s -X POST "${NIM_API}/intensity_ratio" \
  -H 'Content-Type: application/json' \
  -d '{"intensity": 0.5}'
```

A successful response shows the applied intensity and a status message:

```json
{
  "intensity": 0.5,
  "status": "success"
}
```

Read the current runtime intensity:

```bash
curl -s "${NIM_API}/intensity_ratio"
```

A successful response returns the current intensity:

```json
{
  "intensity": 0.5,
  "status": "success"
}
```

<Note>
Runtime updates are applied shortly after the `set` call succeeds and do not require redeploying the chart. They do not change the startup default used after pod restart; to change that default, update `intensityRatio` in Helm values or `parameters.intensityRatio` in the operator custom resource.
</Note>

## Use the 16 kHz Model

To use the 16 kHz model, set the following value:

```yaml
model:
  type: v2-16k
```

For the operator custom resource:

```yaml
parameters:
  modelType: v2-16k
inputs:
  audio_input:
    format:
      audio:
        sample_rate: 16000
        channel_count: 1
        sample_depth: 24
        media_type: "audio/L24"
outputs:
  audio_output:
    format:
      audio:
        sample_rate: 16000
        channel_count: 1
        sample_depth: 24
        media_type: "audio/L24"
```

## Provide Custom Sender Media

The demo chart sender can mount a PVC containing a custom `.ts` input file:

```yaml
sender:
  inputAssets:
    audioFile: /workspace/assets/custom-bnr-audio.ts
  inputData:
    pvc:
      enabled: true
      claimName: bnr-sender-input-data
```

## Static ST 2110 Multicast

For fixed ST 2110 networks, set explicit input and output addresses:

```yaml
input:
  audio:
    sessionName: audio_in
    localInterfaceName: net1
    hostIp: "234.5.8.9"
    hostPort: 5003
    hostNumSubnetBits: 24

output:
  audio:
    sessionName: audio_out
    localInterfaceName: net1
    hostIp: "234.5.8.9"
    hostPort: 5004
    hostNumSubnetBits: 24
```

## Override Scheduler

The chart defaults are designed for Holoscan for Media clusters that use topology-aware scheduling. On clusters without `topo-aware-scheduler`, override the scheduler:

```bash
helm upgrade --install bnr-h4m-sample \
  nvidia-bnr-h4m-sample-2.0.0.tgz \
  --set global.schedulerName=default-scheduler
```