@@ -762,9 +762,9 @@ message ExplicitDecodingConfig {
762762 AudioEncoding encoding = 1 [(google.api.field_behavior ) = REQUIRED ];
763763
764764 // Optional. Sample rate in Hertz of the audio data sent for recognition.
765- // Valid values are: 8000-48000. 16000 is optimal. For best results, set the
766- // sampling rate of the audio source to 16000 Hz. If that's not possible, use
767- // the native sample rate of the audio source (instead of re-sampling ).
765+ // Valid values are: 8000-48000, and 16000 is optimal. For best results, set
766+ // the sampling rate of the audio source to 16000 Hz. If that's not possible,
767+ // use the native sample rate of the audio source (instead of resampling ).
768768 // Note that this field is marked as OPTIONAL for backward compatibility
769769 // reasons. It is (and has always been) effectively REQUIRED.
770770 int32 sample_rate_hertz = 2 [(google.api.field_behavior ) = OPTIONAL ];
@@ -921,6 +921,21 @@ message SpeechAdaptation {
921921 repeated CustomClass custom_classes = 2 ;
922922}
923923
924+ // Denoiser config. May not be supported for all models and may
925+ // have no effect.
926+ message DenoiserConfig {
927+ // Denoise audio before sending to the transcription model.
928+ bool denoise_audio = 1 ;
929+
930+ // Signal-to-Noise Ratio (SNR) threshold for the denoiser. Here SNR means the
931+ // loudness of the speech signal. Audio with an SNR below this threshold,
932+ // meaning the speech is too quiet, will be prevented from being sent to the
933+ // transcription model.
934+ //
935+ // If snr_threshold=0, no filtering will be applied.
936+ float snr_threshold = 2 ;
937+ }
938+
924939// Provides information to the Recognizer that specifies how to process the
925940// recognition request.
926941message RecognitionConfig {
@@ -977,6 +992,10 @@ message RecognitionConfig {
977992 // the given audio to the desired language for supported models.
978993 TranslationConfig translation_config = 15
979994 [(google.api.field_behavior ) = OPTIONAL ];
995+
996+ // Optional. Optional denoiser config. May not be supported for all models
997+ // and may have no effect.
998+ DenoiserConfig denoiser_config = 16 [(google.api.field_behavior ) = OPTIONAL ];
980999}
9811000
9821001// Request message for the
0 commit comments