// NVIDIA Maxine BNR (Background Noise Removal) gRPC service definition.
// Based on NIM BNR API: bidirectional streaming for real-time audio denoising.
// Container: nvcr.io/nim/nvidia/maxine-bnr:latest (port 8001)

syntax = "proto3";

package nvidia.maxine.bnr.v1;

service MaxineBNR {
    // Bidirectional streaming: send audio chunks, receive denoised chunks.
    // First request must be EnhanceAudioConfig, then audio_stream_data chunks.
    rpc EnhanceAudio(stream EnhanceAudioRequest) returns (stream EnhanceAudioResponse) {}
}

message EnhanceAudioConfig {
    optional float intensity_ratio = 1;  // 0.0 (off) to 1.0 (max denoising)
}

message EnhanceAudioRequest {
    oneof stream_input {
        bytes audio_stream_data = 1;     // float32 PCM samples (48kHz mono)
        EnhanceAudioConfig config = 2;   // configuration (send first)
    }
}

message EnhanceAudioResponse {
    oneof stream_output {
        bytes audio_stream_data = 1;     // float32 denoised PCM samples
        EnhanceAudioConfig config = 2;   // echoed configuration
    }
}
