@@ -37,7 +37,8 @@ option objc_class_prefix = "GCS";
3737// Service that implements Google Cloud Speech API.
3838service Speech {
3939 option (google.api.default_host ) = "speech.googleapis.com" ;
40- option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
40+ option (google.api.oauth_scopes ) =
41+ "https://www.googleapis.com/auth/cloud-platform" ;
4142
4243 // Performs synchronous speech recognition: receive results after all audio
4344 // has been sent and processed.
@@ -55,7 +56,8 @@ service Speech {
5556 // a `LongRunningRecognizeResponse` message.
5657 // For more information on asynchronous speech recognition, see the
5758 // [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
58- rpc LongRunningRecognize (LongRunningRecognizeRequest ) returns (google.longrunning.Operation ) {
59+ rpc LongRunningRecognize (LongRunningRecognizeRequest )
60+ returns (google.longrunning.Operation ) {
5961 option (google.api.http ) = {
6062 post : "/v1p1beta1/speech:longrunningrecognize"
6163 body : "*"
@@ -69,8 +71,8 @@ service Speech {
6971
7072 // Performs bidirectional streaming speech recognition: receive results while
7173 // sending audio. This method is only available via the gRPC API (not REST).
72- rpc StreamingRecognize (stream StreamingRecognizeRequest ) returns ( stream StreamingRecognizeResponse ) {
73- }
74+ rpc StreamingRecognize (stream StreamingRecognizeRequest )
75+ returns ( stream StreamingRecognizeResponse ) { }
7476}
7577
7678// The top-level message sent by the client for the `Recognize` method.
@@ -94,7 +96,8 @@ message LongRunningRecognizeRequest {
9496 RecognitionAudio audio = 2 [(google.api.field_behavior ) = REQUIRED ];
9597
9698 // Optional. Specifies an optional destination for the recognition results.
97- TranscriptOutputConfig output_config = 4 [(google.api.field_behavior ) = OPTIONAL ];
99+ TranscriptOutputConfig output_config = 4
100+ [(google.api.field_behavior ) = OPTIONAL ];
98101}
99102
100103// Specifies an optional destination for the recognition results.
@@ -194,7 +197,8 @@ message RecognitionConfig {
194197 // an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
195198 // encoding configuration must match the encoding described in the audio
196199 // header; otherwise the request returns an
197- // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code.
200+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
201+ // code.
198202 enum AudioEncoding {
199203 // Not specified.
200204 ENCODING_UNSPECIFIED = 0 ;
@@ -253,7 +257,8 @@ message RecognitionConfig {
253257
254258 // Encoding of audio data sent in all `RecognitionAudio` messages.
255259 // This field is optional for `FLAC` and `WAV` audio files and required
256- // for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
260+ // for all other audio formats. For details, see
261+ // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
257262 AudioEncoding encoding = 1 ;
258263
259264 // Sample rate in Hertz of the audio data sent in all
@@ -262,7 +267,8 @@ message RecognitionConfig {
262267 // source to 16000 Hz. If that's not possible, use the native sample rate of
263268 // the audio source (instead of re-sampling).
264269 // This field is optional for FLAC and WAV audio files, but is
265- // required for all other audio formats. For details, see [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
270+ // required for all other audio formats. For details, see
271+ // [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
266272 int32 sample_rate_hertz = 2 ;
267273
268274 // The number of channels in the input audio data.
@@ -407,6 +413,15 @@ message RecognitionConfig {
407413 // <td><b>Description</b></td>
408414 // </tr>
409415 // <tr>
416+ // <td><code>latest_long</code></td>
417+ // <td>Best for long form content like media or conversation.</td>
418+ // </tr>
419+ // <tr>
420+ // <td><code>latest_short</code></td>
421+ // <td>Best for short form content like commands or single shot directed
422+ // speech.</td>
423+ // </tr>
424+ // <tr>
410425 // <td><code>command_and_search</code></td>
411426 // <td>Best for short queries such as voice commands or voice search.</td>
412427 // </tr>
@@ -460,10 +475,8 @@ message SpeakerDiarizationConfig {
460475 int32 max_speaker_count = 3 ;
461476
462477 // Output only. Unused.
463- int32 speaker_tag = 5 [
464- deprecated = true ,
465- (google.api.field_behavior ) = OUTPUT_ONLY
466- ];
478+ int32 speaker_tag = 5
479+ [deprecated = true , (google.api.field_behavior ) = OUTPUT_ONLY ];
467480}
468481
469482// Description of audio data to be recognized.
@@ -627,8 +640,8 @@ message SpeechContext {
627640
628641// Contains audio data in the encoding specified in the `RecognitionConfig`.
629642// Either `content` or `uri` must be supplied. Supplying both or neither
630- // returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
631- // [content limits](https://cloud.google.com/speech-to-text/quotas#content).
643+ // returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
644+ // See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
632645message RecognitionAudio {
633646 // The audio source, which is either inline content or a Google Cloud
634647 // Storage uri.
@@ -643,8 +656,9 @@ message RecognitionAudio {
643656 // Currently, only Google Cloud Storage URIs are
644657 // supported, which must be specified in the following format:
645658 // `gs://bucket_name/object_name` (other URI formats return
646- // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
647- // [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
659+ // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
660+ // For more information, see [Request
661+ // URIs](https://cloud.google.com/storage/docs/reference-uris).
648662 string uri = 2 ;
649663 }
650664}
@@ -695,12 +709,14 @@ message LongRunningRecognizeMetadata {
695709 // Time of the most recent processing update.
696710 google.protobuf.Timestamp last_update_time = 3 ;
697711
698- // Output only. The URI of the audio file being transcribed. Empty if the audio was sent
699- // as byte content.
712+ // Output only. The URI of the audio file being transcribed. Empty if the
713+ // audio was sent as byte content.
700714 string uri = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
701715
702- // Output only. A copy of the TranscriptOutputConfig if it was set in the request.
703- TranscriptOutputConfig output_config = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
716+ // Output only. A copy of the TranscriptOutputConfig if it was set in the
717+ // request.
718+ TranscriptOutputConfig output_config = 5
719+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
704720}
705721
706722// `StreamingRecognizeResponse` is the only message returned to the client by
@@ -818,9 +834,9 @@ message StreamingRecognitionResult {
818834 // For audio_channel_count = N, its output values can range from '1' to 'N'.
819835 int32 channel_tag = 5 ;
820836
821- // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
822- // of the language in this result. This language code was detected to have
823- // the most likelihood of being spoken in the audio.
837+ // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
838+ // language tag of the language in this result. This language code was
839+ // detected to have the most likelihood of being spoken in the audio.
824840 string language_code = 6 [(google.api.field_behavior ) = OUTPUT_ONLY ];
825841}
826842
@@ -841,9 +857,9 @@ message SpeechRecognitionResult {
841857 // beginning of the audio.
842858 google.protobuf.Duration result_end_time = 4 ;
843859
844- // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
845- // of the language in this result. This language code was detected to have
846- // the most likelihood of being spoken in the audio.
860+ // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
861+ // language tag of the language in this result. This language code was
862+ // detected to have the most likelihood of being spoken in the audio.
847863 string language_code = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
848864}
849865
0 commit comments