feat: Added new fields to facilitate debugging

* Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out).
* Added request_id to Speech response protos.

PiperOrigin-RevId: 492276727
pull/757/head
Google APIs 2 years ago committed by Copybara-Service
parent fcf8211658
commit 4c253358b1
  1. 35
      google/cloud/speech/v1p1beta1/cloud_speech.proto
  2. 1
      google/cloud/speech/v1p1beta1/speech_v1p1beta1.yaml

@ -266,8 +266,7 @@ message RecognitionConfig {
// The number of channels in the input audio data.
// ONLY set this for MULTI-CHANNEL recognition.
// Valid values for LINEAR16 and FLAC are `1`-`8`.
// Valid values for OGG_OPUS are '1'-'254'.
// Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
// Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
// If `0` or omitted, defaults to one channel (mono).
// Note: We only recognize the first channel by default.
@ -679,6 +678,13 @@ message RecognizeResponse {
// When available, billed audio seconds for the corresponding request.
google.protobuf.Duration total_billed_time = 3;
// Provides information on adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 7;
// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 8;
}
// The only message returned to the client by the `LongRunningRecognize` method.
@ -699,6 +705,13 @@ message LongRunningRecognizeResponse {
// If the transcript output fails this field contains the relevant error.
google.rpc.Status output_error = 7;
// Provides information on speech adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 8;
// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 9;
}
// Describes the progress of a long-running `LongRunningRecognize` call. It is
@ -804,6 +817,13 @@ message StreamingRecognizeResponse {
// When available, billed audio seconds for the stream.
// Set only if this is the last response in the stream.
google.protobuf.Duration total_billed_time = 5;
// Provides information on adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 9;
// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 10;
}
// A streaming speech recognition result corresponding to a portion of the audio
@ -927,3 +947,14 @@ message WordInfo {
// top alternative.
int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Information on speech adaptation use in results
message SpeechAdaptationInfo {
// Whether there was a timeout when applying speech adaptation. If true,
// adaptation had no effect in the response transcript.
bool adaptation_timeout = 1;
// If set, returns a message specifying which part of the speech adaptation
// request timed out.
string timeout_message = 4;
}

@ -6,6 +6,7 @@ title: Cloud Speech-to-Text API
apis:
- name: google.cloud.speech.v1p1beta1.Adaptation
- name: google.cloud.speech.v1p1beta1.Speech
- name: google.longrunning.Operations
types:
- name: google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata

Loading…
Cancel
Save