1// Copyright 2021 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Code generated by protoc-gen-go. DO NOT EDIT. 16// versions: 17// protoc-gen-go v1.25.0-devel 18// protoc v3.12.2 19// source: google/cloud/mediatranslation/v1beta1/media_translation.proto 20 21package mediatranslation 22 23import ( 24 context "context" 25 reflect "reflect" 26 sync "sync" 27 28 proto "github.com/golang/protobuf/proto" 29 _ "google.golang.org/genproto/googleapis/api/annotations" 30 status "google.golang.org/genproto/googleapis/rpc/status" 31 grpc "google.golang.org/grpc" 32 codes "google.golang.org/grpc/codes" 33 status1 "google.golang.org/grpc/status" 34 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 35 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 36) 37 38const ( 39 // Verify that this generated code is sufficiently up-to-date. 40 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 41 // Verify that runtime/protoimpl is sufficiently up-to-date. 42 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 43) 44 45// This is a compile-time assertion that a sufficiently up-to-date version 46// of the legacy proto package is being used. 47const _ = proto.ProtoPackageIsVersion4 48 49// Indicates the type of speech event. 50type StreamingTranslateSpeechResponse_SpeechEventType int32 51 52const ( 53 // No speech event specified. 54 StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED StreamingTranslateSpeechResponse_SpeechEventType = 0 55 // This event indicates that the server has detected the end of the user's 56 // speech utterance and expects no additional speech. Therefore, the server 57 // will not process additional audio (although it may subsequently return 58 // additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' 59 // event, the client should stop sending the requests. However, clients 60 // should keep receiving remaining responses until the stream is terminated. 61 // To construct the complete sentence in a streaming way, one should 62 // override (if 'is_final' of previous response is false), or append (if 63 // 'is_final' of previous response is true). This event is only sent if 64 // `single_utterance` was set to `true`, and is not used otherwise. 65 StreamingTranslateSpeechResponse_END_OF_SINGLE_UTTERANCE StreamingTranslateSpeechResponse_SpeechEventType = 1 66) 67 68// Enum value maps for StreamingTranslateSpeechResponse_SpeechEventType. 69var ( 70 StreamingTranslateSpeechResponse_SpeechEventType_name = map[int32]string{ 71 0: "SPEECH_EVENT_TYPE_UNSPECIFIED", 72 1: "END_OF_SINGLE_UTTERANCE", 73 } 74 StreamingTranslateSpeechResponse_SpeechEventType_value = map[string]int32{ 75 "SPEECH_EVENT_TYPE_UNSPECIFIED": 0, 76 "END_OF_SINGLE_UTTERANCE": 1, 77 } 78) 79 80func (x StreamingTranslateSpeechResponse_SpeechEventType) Enum() *StreamingTranslateSpeechResponse_SpeechEventType { 81 p := new(StreamingTranslateSpeechResponse_SpeechEventType) 82 *p = x 83 return p 84} 85 86func (x StreamingTranslateSpeechResponse_SpeechEventType) String() string { 87 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 88} 89 90func (StreamingTranslateSpeechResponse_SpeechEventType) Descriptor() protoreflect.EnumDescriptor { 91 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_enumTypes[0].Descriptor() 92} 93 94func (StreamingTranslateSpeechResponse_SpeechEventType) Type() protoreflect.EnumType { 95 return &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_enumTypes[0] 96} 97 98func (x StreamingTranslateSpeechResponse_SpeechEventType) Number() protoreflect.EnumNumber { 99 return protoreflect.EnumNumber(x) 100} 101 102// Deprecated: Use StreamingTranslateSpeechResponse_SpeechEventType.Descriptor instead. 103func (StreamingTranslateSpeechResponse_SpeechEventType) EnumDescriptor() ([]byte, []int) { 104 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{4, 0} 105} 106 107// Provides information to the speech translation that specifies how to process 108// the request. 109type TranslateSpeechConfig struct { 110 state protoimpl.MessageState 111 sizeCache protoimpl.SizeCache 112 unknownFields protoimpl.UnknownFields 113 114 // Required. Encoding of audio data. 115 // Supported formats: 116 // 117 // - `linear16` 118 // 119 // Uncompressed 16-bit signed little-endian samples (Linear PCM). 120 // 121 // - `flac` 122 // 123 // `flac` (Free Lossless Audio Codec) is the recommended encoding 124 // because it is lossless--therefore recognition is not compromised--and 125 // requires only about half the bandwidth of `linear16`. 126 // 127 // - `mulaw` 128 // 129 // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. 130 // 131 // - `amr` 132 // 133 // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. 134 // 135 // - `amr-wb` 136 // 137 // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. 138 // 139 // - `ogg-opus` 140 // 141 // Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) 142 // container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, 143 // or 48000. 144 // 145 // - `mp3` 146 // 147 // MP3 audio. Support all standard MP3 bitrates (which range from 32-320 148 // kbps). When using this encoding, `sample_rate_hertz` has to match the 149 // sample rate of the file being used. 150 AudioEncoding string `protobuf:"bytes,1,opt,name=audio_encoding,json=audioEncoding,proto3" json:"audio_encoding,omitempty"` 151 // Required. Source language code (BCP-47) of the input audio. 152 SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` 153 // Required. Target language code (BCP-47) of the output. 154 TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` 155 // Optional. Sample rate in Hertz of the audio data. Valid values are: 156 // 8000-48000. 16000 is optimal. For best results, set the sampling rate of 157 // the audio source to 16000 Hz. If that's not possible, use the native sample 158 // rate of the audio source (instead of re-sampling). 159 SampleRateHertz int32 `protobuf:"varint,4,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` 160 // Optional. `google-provided-model/video` and 161 // `google-provided-model/enhanced-phone-call` are premium models. 162 // `google-provided-model/phone-call` is not premium model. 163 Model string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"` 164} 165 166func (x *TranslateSpeechConfig) Reset() { 167 *x = TranslateSpeechConfig{} 168 if protoimpl.UnsafeEnabled { 169 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0] 170 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 171 ms.StoreMessageInfo(mi) 172 } 173} 174 175func (x *TranslateSpeechConfig) String() string { 176 return protoimpl.X.MessageStringOf(x) 177} 178 179func (*TranslateSpeechConfig) ProtoMessage() {} 180 181func (x *TranslateSpeechConfig) ProtoReflect() protoreflect.Message { 182 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0] 183 if protoimpl.UnsafeEnabled && x != nil { 184 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 185 if ms.LoadMessageInfo() == nil { 186 ms.StoreMessageInfo(mi) 187 } 188 return ms 189 } 190 return mi.MessageOf(x) 191} 192 193// Deprecated: Use TranslateSpeechConfig.ProtoReflect.Descriptor instead. 194func (*TranslateSpeechConfig) Descriptor() ([]byte, []int) { 195 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{0} 196} 197 198func (x *TranslateSpeechConfig) GetAudioEncoding() string { 199 if x != nil { 200 return x.AudioEncoding 201 } 202 return "" 203} 204 205func (x *TranslateSpeechConfig) GetSourceLanguageCode() string { 206 if x != nil { 207 return x.SourceLanguageCode 208 } 209 return "" 210} 211 212func (x *TranslateSpeechConfig) GetTargetLanguageCode() string { 213 if x != nil { 214 return x.TargetLanguageCode 215 } 216 return "" 217} 218 219func (x *TranslateSpeechConfig) GetSampleRateHertz() int32 { 220 if x != nil { 221 return x.SampleRateHertz 222 } 223 return 0 224} 225 226func (x *TranslateSpeechConfig) GetModel() string { 227 if x != nil { 228 return x.Model 229 } 230 return "" 231} 232 233// Config used for streaming translation. 234type StreamingTranslateSpeechConfig struct { 235 state protoimpl.MessageState 236 sizeCache protoimpl.SizeCache 237 unknownFields protoimpl.UnknownFields 238 239 // Required. The common config for all the following audio contents. 240 AudioConfig *TranslateSpeechConfig `protobuf:"bytes,1,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"` 241 // Optional. If `false` or omitted, the system performs 242 // continuous translation (continuing to wait for and process audio even if 243 // the user pauses speaking) until the client closes the input stream (gRPC 244 // API) or until the maximum time limit has been reached. May return multiple 245 // `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. 246 // 247 // If `true`, the speech translator will detect a single spoken utterance. 248 // When it detects that the user has paused or stopped speaking, it will 249 // return an `END_OF_SINGLE_UTTERANCE` event and cease translation. 250 // When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should 251 // stop sending the requests. However, clients should keep receiving remaining 252 // responses until the stream is terminated. To construct the complete 253 // sentence in a streaming way, one should override (if 'is_final' of previous 254 // response is false), or append (if 'is_final' of previous response is true). 255 SingleUtterance bool `protobuf:"varint,2,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"` 256} 257 258func (x *StreamingTranslateSpeechConfig) Reset() { 259 *x = StreamingTranslateSpeechConfig{} 260 if protoimpl.UnsafeEnabled { 261 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1] 262 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 263 ms.StoreMessageInfo(mi) 264 } 265} 266 267func (x *StreamingTranslateSpeechConfig) String() string { 268 return protoimpl.X.MessageStringOf(x) 269} 270 271func (*StreamingTranslateSpeechConfig) ProtoMessage() {} 272 273func (x *StreamingTranslateSpeechConfig) ProtoReflect() protoreflect.Message { 274 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1] 275 if protoimpl.UnsafeEnabled && x != nil { 276 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 277 if ms.LoadMessageInfo() == nil { 278 ms.StoreMessageInfo(mi) 279 } 280 return ms 281 } 282 return mi.MessageOf(x) 283} 284 285// Deprecated: Use StreamingTranslateSpeechConfig.ProtoReflect.Descriptor instead. 286func (*StreamingTranslateSpeechConfig) Descriptor() ([]byte, []int) { 287 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{1} 288} 289 290func (x *StreamingTranslateSpeechConfig) GetAudioConfig() *TranslateSpeechConfig { 291 if x != nil { 292 return x.AudioConfig 293 } 294 return nil 295} 296 297func (x *StreamingTranslateSpeechConfig) GetSingleUtterance() bool { 298 if x != nil { 299 return x.SingleUtterance 300 } 301 return false 302} 303 304// The top-level message sent by the client for the `StreamingTranslateSpeech` 305// method. Multiple `StreamingTranslateSpeechRequest` messages are sent. The 306// first message must contain a `streaming_config` message and must not contain 307// `audio_content` data. All subsequent messages must contain `audio_content` 308// data and must not contain a `streaming_config` message. 309type StreamingTranslateSpeechRequest struct { 310 state protoimpl.MessageState 311 sizeCache protoimpl.SizeCache 312 unknownFields protoimpl.UnknownFields 313 314 // The streaming request, which is either a streaming config or content. 315 // 316 // Types that are assignable to StreamingRequest: 317 // *StreamingTranslateSpeechRequest_StreamingConfig 318 // *StreamingTranslateSpeechRequest_AudioContent 319 StreamingRequest isStreamingTranslateSpeechRequest_StreamingRequest `protobuf_oneof:"streaming_request"` 320} 321 322func (x *StreamingTranslateSpeechRequest) Reset() { 323 *x = StreamingTranslateSpeechRequest{} 324 if protoimpl.UnsafeEnabled { 325 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2] 326 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 327 ms.StoreMessageInfo(mi) 328 } 329} 330 331func (x *StreamingTranslateSpeechRequest) String() string { 332 return protoimpl.X.MessageStringOf(x) 333} 334 335func (*StreamingTranslateSpeechRequest) ProtoMessage() {} 336 337func (x *StreamingTranslateSpeechRequest) ProtoReflect() protoreflect.Message { 338 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2] 339 if protoimpl.UnsafeEnabled && x != nil { 340 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 341 if ms.LoadMessageInfo() == nil { 342 ms.StoreMessageInfo(mi) 343 } 344 return ms 345 } 346 return mi.MessageOf(x) 347} 348 349// Deprecated: Use StreamingTranslateSpeechRequest.ProtoReflect.Descriptor instead. 350func (*StreamingTranslateSpeechRequest) Descriptor() ([]byte, []int) { 351 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{2} 352} 353 354func (m *StreamingTranslateSpeechRequest) GetStreamingRequest() isStreamingTranslateSpeechRequest_StreamingRequest { 355 if m != nil { 356 return m.StreamingRequest 357 } 358 return nil 359} 360 361func (x *StreamingTranslateSpeechRequest) GetStreamingConfig() *StreamingTranslateSpeechConfig { 362 if x, ok := x.GetStreamingRequest().(*StreamingTranslateSpeechRequest_StreamingConfig); ok { 363 return x.StreamingConfig 364 } 365 return nil 366} 367 368func (x *StreamingTranslateSpeechRequest) GetAudioContent() []byte { 369 if x, ok := x.GetStreamingRequest().(*StreamingTranslateSpeechRequest_AudioContent); ok { 370 return x.AudioContent 371 } 372 return nil 373} 374 375type isStreamingTranslateSpeechRequest_StreamingRequest interface { 376 isStreamingTranslateSpeechRequest_StreamingRequest() 377} 378 379type StreamingTranslateSpeechRequest_StreamingConfig struct { 380 // Provides information to the recognizer that specifies how to process the 381 // request. The first `StreamingTranslateSpeechRequest` message must contain 382 // a `streaming_config` message. 383 StreamingConfig *StreamingTranslateSpeechConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"` 384} 385 386type StreamingTranslateSpeechRequest_AudioContent struct { 387 // The audio data to be translated. Sequential chunks of audio data are sent 388 // in sequential `StreamingTranslateSpeechRequest` messages. The first 389 // `StreamingTranslateSpeechRequest` message must not contain 390 // `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` 391 // messages must contain `audio_content` data. The audio bytes must be 392 // encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with 393 // all bytes fields, protobuffers use a pure binary representation (not 394 // base64). 395 AudioContent []byte `protobuf:"bytes,2,opt,name=audio_content,json=audioContent,proto3,oneof"` 396} 397 398func (*StreamingTranslateSpeechRequest_StreamingConfig) isStreamingTranslateSpeechRequest_StreamingRequest() { 399} 400 401func (*StreamingTranslateSpeechRequest_AudioContent) isStreamingTranslateSpeechRequest_StreamingRequest() { 402} 403 404// A streaming speech translation result corresponding to a portion of the audio 405// that is currently being processed. 406type StreamingTranslateSpeechResult struct { 407 state protoimpl.MessageState 408 sizeCache protoimpl.SizeCache 409 unknownFields protoimpl.UnknownFields 410 411 // Translation result. 412 // 413 // Types that are assignable to Result: 414 // *StreamingTranslateSpeechResult_TextTranslationResult_ 415 Result isStreamingTranslateSpeechResult_Result `protobuf_oneof:"result"` 416} 417 418func (x *StreamingTranslateSpeechResult) Reset() { 419 *x = StreamingTranslateSpeechResult{} 420 if protoimpl.UnsafeEnabled { 421 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3] 422 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 423 ms.StoreMessageInfo(mi) 424 } 425} 426 427func (x *StreamingTranslateSpeechResult) String() string { 428 return protoimpl.X.MessageStringOf(x) 429} 430 431func (*StreamingTranslateSpeechResult) ProtoMessage() {} 432 433func (x *StreamingTranslateSpeechResult) ProtoReflect() protoreflect.Message { 434 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3] 435 if protoimpl.UnsafeEnabled && x != nil { 436 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 437 if ms.LoadMessageInfo() == nil { 438 ms.StoreMessageInfo(mi) 439 } 440 return ms 441 } 442 return mi.MessageOf(x) 443} 444 445// Deprecated: Use StreamingTranslateSpeechResult.ProtoReflect.Descriptor instead. 446func (*StreamingTranslateSpeechResult) Descriptor() ([]byte, []int) { 447 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{3} 448} 449 450func (m *StreamingTranslateSpeechResult) GetResult() isStreamingTranslateSpeechResult_Result { 451 if m != nil { 452 return m.Result 453 } 454 return nil 455} 456 457func (x *StreamingTranslateSpeechResult) GetTextTranslationResult() *StreamingTranslateSpeechResult_TextTranslationResult { 458 if x, ok := x.GetResult().(*StreamingTranslateSpeechResult_TextTranslationResult_); ok { 459 return x.TextTranslationResult 460 } 461 return nil 462} 463 464type isStreamingTranslateSpeechResult_Result interface { 465 isStreamingTranslateSpeechResult_Result() 466} 467 468type StreamingTranslateSpeechResult_TextTranslationResult_ struct { 469 // Text translation result. 470 TextTranslationResult *StreamingTranslateSpeechResult_TextTranslationResult `protobuf:"bytes,1,opt,name=text_translation_result,json=textTranslationResult,proto3,oneof"` 471} 472 473func (*StreamingTranslateSpeechResult_TextTranslationResult_) isStreamingTranslateSpeechResult_Result() { 474} 475 476// A streaming speech translation response corresponding to a portion of 477// the audio currently processed. 478type StreamingTranslateSpeechResponse struct { 479 state protoimpl.MessageState 480 sizeCache protoimpl.SizeCache 481 unknownFields protoimpl.UnknownFields 482 483 // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that 484 // specifies the error for the operation. 485 Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` 486 // Output only. The translation result that is currently being processed (is_final could be 487 // true or false). 488 Result *StreamingTranslateSpeechResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` 489 // Output only. Indicates the type of speech event. 490 SpeechEventType StreamingTranslateSpeechResponse_SpeechEventType `protobuf:"varint,3,opt,name=speech_event_type,json=speechEventType,proto3,enum=google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse_SpeechEventType" json:"speech_event_type,omitempty"` 491} 492 493func (x *StreamingTranslateSpeechResponse) Reset() { 494 *x = StreamingTranslateSpeechResponse{} 495 if protoimpl.UnsafeEnabled { 496 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4] 497 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 498 ms.StoreMessageInfo(mi) 499 } 500} 501 502func (x *StreamingTranslateSpeechResponse) String() string { 503 return protoimpl.X.MessageStringOf(x) 504} 505 506func (*StreamingTranslateSpeechResponse) ProtoMessage() {} 507 508func (x *StreamingTranslateSpeechResponse) ProtoReflect() protoreflect.Message { 509 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4] 510 if protoimpl.UnsafeEnabled && x != nil { 511 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 512 if ms.LoadMessageInfo() == nil { 513 ms.StoreMessageInfo(mi) 514 } 515 return ms 516 } 517 return mi.MessageOf(x) 518} 519 520// Deprecated: Use StreamingTranslateSpeechResponse.ProtoReflect.Descriptor instead. 521func (*StreamingTranslateSpeechResponse) Descriptor() ([]byte, []int) { 522 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{4} 523} 524 525func (x *StreamingTranslateSpeechResponse) GetError() *status.Status { 526 if x != nil { 527 return x.Error 528 } 529 return nil 530} 531 532func (x *StreamingTranslateSpeechResponse) GetResult() *StreamingTranslateSpeechResult { 533 if x != nil { 534 return x.Result 535 } 536 return nil 537} 538 539func (x *StreamingTranslateSpeechResponse) GetSpeechEventType() StreamingTranslateSpeechResponse_SpeechEventType { 540 if x != nil { 541 return x.SpeechEventType 542 } 543 return StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED 544} 545 546// Text translation result. 547type StreamingTranslateSpeechResult_TextTranslationResult struct { 548 state protoimpl.MessageState 549 sizeCache protoimpl.SizeCache 550 unknownFields protoimpl.UnknownFields 551 552 // Output only. The translated sentence. 553 Translation string `protobuf:"bytes,1,opt,name=translation,proto3" json:"translation,omitempty"` 554 // Output only. If `false`, this `StreamingTranslateSpeechResult` represents 555 // an interim result that may change. If `true`, this is the final time the 556 // translation service will return this particular 557 // `StreamingTranslateSpeechResult`, the streaming translator will not 558 // return any further hypotheses for this portion of the transcript and 559 // corresponding audio. 560 IsFinal bool `protobuf:"varint,2,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"` 561} 562 563func (x *StreamingTranslateSpeechResult_TextTranslationResult) Reset() { 564 *x = StreamingTranslateSpeechResult_TextTranslationResult{} 565 if protoimpl.UnsafeEnabled { 566 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5] 567 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 568 ms.StoreMessageInfo(mi) 569 } 570} 571 572func (x *StreamingTranslateSpeechResult_TextTranslationResult) String() string { 573 return protoimpl.X.MessageStringOf(x) 574} 575 576func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage() {} 577 578func (x *StreamingTranslateSpeechResult_TextTranslationResult) ProtoReflect() protoreflect.Message { 579 mi := &file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5] 580 if protoimpl.UnsafeEnabled && x != nil { 581 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 582 if ms.LoadMessageInfo() == nil { 583 ms.StoreMessageInfo(mi) 584 } 585 return ms 586 } 587 return mi.MessageOf(x) 588} 589 590// Deprecated: Use StreamingTranslateSpeechResult_TextTranslationResult.ProtoReflect.Descriptor instead. 591func (*StreamingTranslateSpeechResult_TextTranslationResult) Descriptor() ([]byte, []int) { 592 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP(), []int{3, 0} 593} 594 595func (x *StreamingTranslateSpeechResult_TextTranslationResult) GetTranslation() string { 596 if x != nil { 597 return x.Translation 598 } 599 return "" 600} 601 602func (x *StreamingTranslateSpeechResult_TextTranslationResult) GetIsFinal() bool { 603 if x != nil { 604 return x.IsFinal 605 } 606 return false 607} 608 609var File_google_cloud_mediatranslation_v1beta1_media_translation_proto protoreflect.FileDescriptor 610 611var file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDesc = []byte{ 612 0x0a, 0x3d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6d, 613 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 614 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x72, 615 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 616 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 617 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 618 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 619 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 620 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 621 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 622 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 623 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x01, 0x0a, 0x15, 0x54, 0x72, 624 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 625 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x65, 0x6e, 0x63, 626 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 627 0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 628 0x35, 0x0a, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 629 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 630 0x41, 0x02, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 631 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x14, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 632 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 633 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 634 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2f, 0x0a, 635 0x11, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x72, 636 0x74, 0x7a, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x73, 637 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x48, 0x65, 0x72, 0x74, 0x7a, 0x12, 0x19, 638 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 639 0x41, 0x01, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xb6, 0x01, 0x0a, 0x1e, 0x53, 0x74, 640 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 641 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x0c, 642 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 643 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 644 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 645 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 646 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 647 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 648 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x75, 0x74, 0x74, 649 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 650 0x01, 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x55, 0x74, 0x74, 0x65, 0x72, 0x61, 0x6e, 651 0x63, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x1f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 652 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 653 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x10, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 654 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 655 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 656 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 657 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 658 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 659 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x72, 0x65, 0x61, 660 0x6d, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x75, 661 0x64, 0x69, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 662 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 663 0x74, 0x42, 0x13, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x72, 664 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa2, 0x02, 0x0a, 0x1e, 0x53, 0x74, 0x72, 0x65, 0x61, 665 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 666 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x17, 0x74, 0x65, 667 0x78, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 668 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5b, 0x2e, 0x67, 0x6f, 669 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 670 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 671 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 672 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 673 0x6c, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 674 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x15, 0x74, 0x65, 0x78, 0x74, 675 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 676 0x74, 0x1a, 0x5e, 0x0a, 0x15, 0x54, 0x65, 0x78, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 677 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x72, 678 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 679 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 680 0x6e, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 681 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x69, 0x73, 0x46, 0x69, 0x6e, 0x61, 682 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x93, 0x03, 0x0a, 0x20, 683 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 684 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 685 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 686 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 687 0x74, 0x75, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 688 0x62, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 689 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 690 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 691 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 692 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 693 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x72, 0x65, 0x73, 694 0x75, 0x6c, 0x74, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x5f, 0x65, 695 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 696 0x57, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 697 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 698 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 699 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 700 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 701 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x73, 702 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x51, 703 0x0a, 0x0f, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 704 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x5f, 0x45, 0x56, 0x45, 0x4e, 705 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 706 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x4e, 0x44, 0x5f, 0x4f, 0x46, 0x5f, 0x53, 707 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x55, 0x54, 0x54, 0x45, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 708 0x01, 0x32, 0xa3, 0x02, 0x0a, 0x18, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 709 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb1, 710 0x01, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 711 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x12, 0x46, 0x2e, 0x67, 0x6f, 712 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 713 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 714 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 715 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 716 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 717 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 718 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 719 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 720 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 721 0x30, 0x01, 0x1a, 0x53, 0xca, 0x41, 0x1f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 722 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 723 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 724 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 725 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 726 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x99, 0x02, 0x0a, 0x29, 0x63, 0x6f, 0x6d, 0x2e, 727 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 728 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 729 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x15, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 730 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 731 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 732 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 733 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6d, 0x65, 0x64, 0x69, 734 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 735 0x65, 0x74, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 736 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 737 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x72, 0x61, 738 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 739 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 740 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 741 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 742 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 743 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 744 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 745} 746 747var ( 748 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescOnce sync.Once 749 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescData = file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDesc 750) 751 752func file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescGZIP() []byte { 753 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescOnce.Do(func() { 754 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescData) 755 }) 756 return file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDescData 757} 758 759var file_google_cloud_mediatranslation_v1beta1_media_translation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 760var file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes = make([]protoimpl.MessageInfo, 6) 761var file_google_cloud_mediatranslation_v1beta1_media_translation_proto_goTypes = []interface{}{ 762 (StreamingTranslateSpeechResponse_SpeechEventType)(0), // 0: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType 763 (*TranslateSpeechConfig)(nil), // 1: google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig 764 (*StreamingTranslateSpeechConfig)(nil), // 2: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig 765 (*StreamingTranslateSpeechRequest)(nil), // 3: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest 766 (*StreamingTranslateSpeechResult)(nil), // 4: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult 767 (*StreamingTranslateSpeechResponse)(nil), // 5: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse 768 (*StreamingTranslateSpeechResult_TextTranslationResult)(nil), // 6: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult 769 (*status.Status)(nil), // 7: google.rpc.Status 770} 771var file_google_cloud_mediatranslation_v1beta1_media_translation_proto_depIdxs = []int32{ 772 1, // 0: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig.audio_config:type_name -> google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig 773 2, // 1: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest.streaming_config:type_name -> google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig 774 6, // 2: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.text_translation_result:type_name -> google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult 775 7, // 3: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.error:type_name -> google.rpc.Status 776 4, // 4: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.result:type_name -> google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult 777 0, // 5: google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.speech_event_type:type_name -> google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType 778 3, // 6: google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech:input_type -> google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest 779 5, // 7: google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech:output_type -> google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse 780 7, // [7:8] is the sub-list for method output_type 781 6, // [6:7] is the sub-list for method input_type 782 6, // [6:6] is the sub-list for extension type_name 783 6, // [6:6] is the sub-list for extension extendee 784 0, // [0:6] is the sub-list for field type_name 785} 786 787func init() { file_google_cloud_mediatranslation_v1beta1_media_translation_proto_init() } 788func file_google_cloud_mediatranslation_v1beta1_media_translation_proto_init() { 789 if File_google_cloud_mediatranslation_v1beta1_media_translation_proto != nil { 790 return 791 } 792 if !protoimpl.UnsafeEnabled { 793 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 794 switch v := v.(*TranslateSpeechConfig); i { 795 case 0: 796 return &v.state 797 case 1: 798 return &v.sizeCache 799 case 2: 800 return &v.unknownFields 801 default: 802 return nil 803 } 804 } 805 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 806 switch v := v.(*StreamingTranslateSpeechConfig); i { 807 case 0: 808 return &v.state 809 case 1: 810 return &v.sizeCache 811 case 2: 812 return &v.unknownFields 813 default: 814 return nil 815 } 816 } 817 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 818 switch v := v.(*StreamingTranslateSpeechRequest); i { 819 case 0: 820 return &v.state 821 case 1: 822 return &v.sizeCache 823 case 2: 824 return &v.unknownFields 825 default: 826 return nil 827 } 828 } 829 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 830 switch v := v.(*StreamingTranslateSpeechResult); i { 831 case 0: 832 return &v.state 833 case 1: 834 return &v.sizeCache 835 case 2: 836 return &v.unknownFields 837 default: 838 return nil 839 } 840 } 841 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 842 switch v := v.(*StreamingTranslateSpeechResponse); i { 843 case 0: 844 return &v.state 845 case 1: 846 return &v.sizeCache 847 case 2: 848 return &v.unknownFields 849 default: 850 return nil 851 } 852 } 853 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 854 switch v := v.(*StreamingTranslateSpeechResult_TextTranslationResult); i { 855 case 0: 856 return &v.state 857 case 1: 858 return &v.sizeCache 859 case 2: 860 return &v.unknownFields 861 default: 862 return nil 863 } 864 } 865 } 866 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[2].OneofWrappers = []interface{}{ 867 (*StreamingTranslateSpeechRequest_StreamingConfig)(nil), 868 (*StreamingTranslateSpeechRequest_AudioContent)(nil), 869 } 870 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes[3].OneofWrappers = []interface{}{ 871 (*StreamingTranslateSpeechResult_TextTranslationResult_)(nil), 872 } 873 type x struct{} 874 out := protoimpl.TypeBuilder{ 875 File: protoimpl.DescBuilder{ 876 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 877 RawDescriptor: file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDesc, 878 NumEnums: 1, 879 NumMessages: 6, 880 NumExtensions: 0, 881 NumServices: 1, 882 }, 883 GoTypes: file_google_cloud_mediatranslation_v1beta1_media_translation_proto_goTypes, 884 DependencyIndexes: file_google_cloud_mediatranslation_v1beta1_media_translation_proto_depIdxs, 885 EnumInfos: file_google_cloud_mediatranslation_v1beta1_media_translation_proto_enumTypes, 886 MessageInfos: file_google_cloud_mediatranslation_v1beta1_media_translation_proto_msgTypes, 887 }.Build() 888 File_google_cloud_mediatranslation_v1beta1_media_translation_proto = out.File 889 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_rawDesc = nil 890 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_goTypes = nil 891 file_google_cloud_mediatranslation_v1beta1_media_translation_proto_depIdxs = nil 892} 893 894// Reference imports to suppress errors if they are not otherwise used. 895var _ context.Context 896var _ grpc.ClientConnInterface 897 898// This is a compile-time assertion to ensure that this generated file 899// is compatible with the grpc package it is being compiled against. 900const _ = grpc.SupportPackageIsVersion6 901 902// SpeechTranslationServiceClient is the client API for SpeechTranslationService service. 903// 904// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 905type SpeechTranslationServiceClient interface { 906 // Performs bidirectional streaming speech translation: receive results while 907 // sending audio. This method is only available via the gRPC API (not REST). 908 StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error) 909} 910 911type speechTranslationServiceClient struct { 912 cc grpc.ClientConnInterface 913} 914 915func NewSpeechTranslationServiceClient(cc grpc.ClientConnInterface) SpeechTranslationServiceClient { 916 return &speechTranslationServiceClient{cc} 917} 918 919func (c *speechTranslationServiceClient) StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error) { 920 stream, err := c.cc.NewStream(ctx, &_SpeechTranslationService_serviceDesc.Streams[0], "/google.cloud.mediatranslation.v1beta1.SpeechTranslationService/StreamingTranslateSpeech", opts...) 921 if err != nil { 922 return nil, err 923 } 924 x := &speechTranslationServiceStreamingTranslateSpeechClient{stream} 925 return x, nil 926} 927 928type SpeechTranslationService_StreamingTranslateSpeechClient interface { 929 Send(*StreamingTranslateSpeechRequest) error 930 Recv() (*StreamingTranslateSpeechResponse, error) 931 grpc.ClientStream 932} 933 934type speechTranslationServiceStreamingTranslateSpeechClient struct { 935 grpc.ClientStream 936} 937 938func (x *speechTranslationServiceStreamingTranslateSpeechClient) Send(m *StreamingTranslateSpeechRequest) error { 939 return x.ClientStream.SendMsg(m) 940} 941 942func (x *speechTranslationServiceStreamingTranslateSpeechClient) Recv() (*StreamingTranslateSpeechResponse, error) { 943 m := new(StreamingTranslateSpeechResponse) 944 if err := x.ClientStream.RecvMsg(m); err != nil { 945 return nil, err 946 } 947 return m, nil 948} 949 950// SpeechTranslationServiceServer is the server API for SpeechTranslationService service. 951type SpeechTranslationServiceServer interface { 952 // Performs bidirectional streaming speech translation: receive results while 953 // sending audio. This method is only available via the gRPC API (not REST). 954 StreamingTranslateSpeech(SpeechTranslationService_StreamingTranslateSpeechServer) error 955} 956 957// UnimplementedSpeechTranslationServiceServer can be embedded to have forward compatible implementations. 958type UnimplementedSpeechTranslationServiceServer struct { 959} 960 961func (*UnimplementedSpeechTranslationServiceServer) StreamingTranslateSpeech(SpeechTranslationService_StreamingTranslateSpeechServer) error { 962 return status1.Errorf(codes.Unimplemented, "method StreamingTranslateSpeech not implemented") 963} 964 965func RegisterSpeechTranslationServiceServer(s *grpc.Server, srv SpeechTranslationServiceServer) { 966 s.RegisterService(&_SpeechTranslationService_serviceDesc, srv) 967} 968 969func _SpeechTranslationService_StreamingTranslateSpeech_Handler(srv interface{}, stream grpc.ServerStream) error { 970 return srv.(SpeechTranslationServiceServer).StreamingTranslateSpeech(&speechTranslationServiceStreamingTranslateSpeechServer{stream}) 971} 972 973type SpeechTranslationService_StreamingTranslateSpeechServer interface { 974 Send(*StreamingTranslateSpeechResponse) error 975 Recv() (*StreamingTranslateSpeechRequest, error) 976 grpc.ServerStream 977} 978 979type speechTranslationServiceStreamingTranslateSpeechServer struct { 980 grpc.ServerStream 981} 982 983func (x *speechTranslationServiceStreamingTranslateSpeechServer) Send(m *StreamingTranslateSpeechResponse) error { 984 return x.ServerStream.SendMsg(m) 985} 986 987func (x *speechTranslationServiceStreamingTranslateSpeechServer) Recv() (*StreamingTranslateSpeechRequest, error) { 988 m := new(StreamingTranslateSpeechRequest) 989 if err := x.ServerStream.RecvMsg(m); err != nil { 990 return nil, err 991 } 992 return m, nil 993} 994 995var _SpeechTranslationService_serviceDesc = grpc.ServiceDesc{ 996 ServiceName: "google.cloud.mediatranslation.v1beta1.SpeechTranslationService", 997 HandlerType: (*SpeechTranslationServiceServer)(nil), 998 Methods: []grpc.MethodDesc{}, 999 Streams: []grpc.StreamDesc{ 1000 { 1001 StreamName: "StreamingTranslateSpeech", 1002 Handler: _SpeechTranslationService_StreamingTranslateSpeech_Handler, 1003 ServerStreams: true, 1004 ClientStreams: true, 1005 }, 1006 }, 1007 Metadata: "google/cloud/mediatranslation/v1beta1/media_translation.proto", 1008} 1009