@@ -266,8 +266,7 @@ message RecognitionConfig {
266266
267267 // The number of channels in the input audio data.
268268 // ONLY set this for MULTI-CHANNEL recognition.
269- // Valid values for LINEAR16 and FLAC are `1`-`8`.
270- // Valid values for OGG_OPUS are '1'-'254'.
269+ // Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
271270 // Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
272271 // If `0` or omitted, defaults to one channel (mono).
273272 // Note: We only recognize the first channel by default.
@@ -679,6 +678,13 @@ message RecognizeResponse {
679678
680679 // When available, billed audio seconds for the corresponding request.
681680 google.protobuf.Duration total_billed_time = 3 ;
681+
682+ // Provides information on adaptation behavior in response
683+ SpeechAdaptationInfo speech_adaptation_info = 7 ;
684+
685+ // The ID associated with the request. This is a unique ID specific only to
686+ // the given request.
687+ int64 request_id = 8 ;
682688}
683689
684690// The only message returned to the client by the `LongRunningRecognize` method.
@@ -699,6 +705,13 @@ message LongRunningRecognizeResponse {
699705
700706 // If the transcript output fails this field contains the relevant error.
701707 google.rpc.Status output_error = 7 ;
708+
709+ // Provides information on speech adaptation behavior in response
710+ SpeechAdaptationInfo speech_adaptation_info = 8 ;
711+
712+ // The ID associated with the request. This is a unique ID specific only to
713+ // the given request.
714+ int64 request_id = 9 ;
702715}
703716
704717// Describes the progress of a long-running `LongRunningRecognize` call. It is
@@ -804,6 +817,13 @@ message StreamingRecognizeResponse {
804817 // When available, billed audio seconds for the stream.
805818 // Set only if this is the last response in the stream.
806819 google.protobuf.Duration total_billed_time = 5 ;
820+
821+ // Provides information on adaptation behavior in response
822+ SpeechAdaptationInfo speech_adaptation_info = 9 ;
823+
824+ // The ID associated with the request. This is a unique ID specific only to
825+ // the given request.
826+ int64 request_id = 10 ;
807827}
808828
809829// A streaming speech recognition result corresponding to a portion of the audio
@@ -927,3 +947,14 @@ message WordInfo {
927947 // top alternative.
928948 int32 speaker_tag = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
929949}
950+
951+ // Information on speech adaptation use in results
952+ message SpeechAdaptationInfo {
953+ // Whether there was a timeout when applying speech adaptation. If true,
954+ // adaptation had no effect in the response transcript.
955+ bool adaptation_timeout = 1 ;
956+
957+ // If set, returns a message specifying which part of the speech adaptation
958+ // request timed out.
959+ string timeout_message = 4 ;
960+ }
0 commit comments