1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/cloud/mediatranslation/v1beta1/media_translation.proto 3 4package mediatranslation 5 6import ( 7 context "context" 8 fmt "fmt" 9 math "math" 10 11 proto "github.com/golang/protobuf/proto" 12 _ "google.golang.org/genproto/googleapis/api/annotations" 13 status "google.golang.org/genproto/googleapis/rpc/status" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status1 "google.golang.org/grpc/status" 17) 18 19// Reference imports to suppress errors if they are not otherwise used. 20var _ = proto.Marshal 21var _ = fmt.Errorf 22var _ = math.Inf 23 24// This is a compile-time assertion to ensure that this generated file 25// is compatible with the proto package it is being compiled against. 26// A compilation error at this line likely means your copy of the 27// proto package needs to be updated. 28const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 29 30// Indicates the type of speech event. 31type StreamingTranslateSpeechResponse_SpeechEventType int32 32 33const ( 34 // No speech event specified. 35 StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED StreamingTranslateSpeechResponse_SpeechEventType = 0 36 // This event indicates that the server has detected the end of the user's 37 // speech utterance and expects no additional speech. Therefore, the server 38 // will not process additional audio (although it may subsequently return 39 // additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' 40 // event, the client should stop sending the requests. However, clients 41 // should keep receiving remaining responses until the stream is terminated. 42 // To construct the complete sentence in a streaming way, one should 43 // override (if 'is_final' of previous response is false), or append (if 44 // 'is_final' of previous response is true). This event is only sent if 45 // `single_utterance` was set to `true`, and is not used otherwise. 46 StreamingTranslateSpeechResponse_END_OF_SINGLE_UTTERANCE StreamingTranslateSpeechResponse_SpeechEventType = 1 47) 48 49var StreamingTranslateSpeechResponse_SpeechEventType_name = map[int32]string{ 50 0: "SPEECH_EVENT_TYPE_UNSPECIFIED", 51 1: "END_OF_SINGLE_UTTERANCE", 52} 53 54var StreamingTranslateSpeechResponse_SpeechEventType_value = map[string]int32{ 55 "SPEECH_EVENT_TYPE_UNSPECIFIED": 0, 56 "END_OF_SINGLE_UTTERANCE": 1, 57} 58 59func (x StreamingTranslateSpeechResponse_SpeechEventType) String() string { 60 return proto.EnumName(StreamingTranslateSpeechResponse_SpeechEventType_name, int32(x)) 61} 62 63func (StreamingTranslateSpeechResponse_SpeechEventType) EnumDescriptor() ([]byte, []int) { 64 return fileDescriptor_7b2f67d966c0ba6c, []int{4, 0} 65} 66 67// Provides information to the speech translation that specifies how to process 68// the request. 69type TranslateSpeechConfig struct { 70 // Required. Encoding of audio data. 71 // Supported formats: 72 // 73 // - `linear16` 74 // 75 // Uncompressed 16-bit signed little-endian samples (Linear PCM). 76 // 77 // 78 AudioEncoding string `protobuf:"bytes,1,opt,name=audio_encoding,json=audioEncoding,proto3" json:"audio_encoding,omitempty"` 79 // Required. Source language code (BCP-47) of the input audio. 80 SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` 81 // Optional. A list of up to 3 additional language codes (BCP-47), listing possible 82 // alternative languages of the supplied audio. If alternative source 83 // languages are listed, speech translation result will translate in the most 84 // likely language detected including the main source_language_code. The 85 // translated result will include the language code of the language detected 86 // in the audio. 87 AlternativeSourceLanguageCodes []string `protobuf:"bytes,6,rep,name=alternative_source_language_codes,json=alternativeSourceLanguageCodes,proto3" json:"alternative_source_language_codes,omitempty"` 88 // Required. Target language code (BCP-47) of the output. 89 TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` 90 // Optional. Sample rate in Hertz of the audio data. Valid values are: 91 // 8000-48000. 16000 is optimal. For best results, set the sampling rate of 92 // the audio source to 16000 Hz. If that's not possible, use the native sample 93 // rate of the audio source (instead of re-sampling). This field can only be 94 // omitted for `FLAC` and `WAV` audio files. 95 SampleRateHertz int32 `protobuf:"varint,4,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` 96 // Optional. 97 Model string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"` 98 XXX_NoUnkeyedLiteral struct{} `json:"-"` 99 XXX_unrecognized []byte `json:"-"` 100 XXX_sizecache int32 `json:"-"` 101} 102 103func (m *TranslateSpeechConfig) Reset() { *m = TranslateSpeechConfig{} } 104func (m *TranslateSpeechConfig) String() string { return proto.CompactTextString(m) } 105func (*TranslateSpeechConfig) ProtoMessage() {} 106func (*TranslateSpeechConfig) Descriptor() ([]byte, []int) { 107 return fileDescriptor_7b2f67d966c0ba6c, []int{0} 108} 109 110func (m *TranslateSpeechConfig) XXX_Unmarshal(b []byte) error { 111 return xxx_messageInfo_TranslateSpeechConfig.Unmarshal(m, b) 112} 113func (m *TranslateSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 114 return xxx_messageInfo_TranslateSpeechConfig.Marshal(b, m, deterministic) 115} 116func (m *TranslateSpeechConfig) XXX_Merge(src proto.Message) { 117 xxx_messageInfo_TranslateSpeechConfig.Merge(m, src) 118} 119func (m *TranslateSpeechConfig) XXX_Size() int { 120 return xxx_messageInfo_TranslateSpeechConfig.Size(m) 121} 122func (m *TranslateSpeechConfig) XXX_DiscardUnknown() { 123 xxx_messageInfo_TranslateSpeechConfig.DiscardUnknown(m) 124} 125 126var xxx_messageInfo_TranslateSpeechConfig proto.InternalMessageInfo 127 128func (m *TranslateSpeechConfig) GetAudioEncoding() string { 129 if m != nil { 130 return m.AudioEncoding 131 } 132 return "" 133} 134 135func (m *TranslateSpeechConfig) GetSourceLanguageCode() string { 136 if m != nil { 137 return m.SourceLanguageCode 138 } 139 return "" 140} 141 142func (m *TranslateSpeechConfig) GetAlternativeSourceLanguageCodes() []string { 143 if m != nil { 144 return m.AlternativeSourceLanguageCodes 145 } 146 return nil 147} 148 149func (m *TranslateSpeechConfig) GetTargetLanguageCode() string { 150 if m != nil { 151 return m.TargetLanguageCode 152 } 153 return "" 154} 155 156func (m *TranslateSpeechConfig) GetSampleRateHertz() int32 { 157 if m != nil { 158 return m.SampleRateHertz 159 } 160 return 0 161} 162 163func (m *TranslateSpeechConfig) GetModel() string { 164 if m != nil { 165 return m.Model 166 } 167 return "" 168} 169 170// Config used for streaming translation. 171type StreamingTranslateSpeechConfig struct { 172 // Required. The common config for all the following audio contents. 173 AudioConfig *TranslateSpeechConfig `protobuf:"bytes,1,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"` 174 // Optional. If `false` or omitted, the system performs 175 // continuous translation (continuing to wait for and process audio even if 176 // the user pauses speaking) until the client closes the input stream (gRPC 177 // API) or until the maximum time limit has been reached. May return multiple 178 // `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. 179 // 180 // If `true`, the speech translator will detect a single spoken utterance. 181 // When it detects that the user has paused or stopped speaking, it will 182 // return an `END_OF_SINGLE_UTTERANCE` event and cease translation. 183 // When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should 184 // stop sending the requests. However, clients should keep receiving remaining 185 // responses until the stream is terminated. To construct the complete 186 // sentence in a streaming way, one should override (if 'is_final' of previous 187 // response is false), or append (if 'is_final' of previous response is true). 188 SingleUtterance bool `protobuf:"varint,2,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"` 189 XXX_NoUnkeyedLiteral struct{} `json:"-"` 190 XXX_unrecognized []byte `json:"-"` 191 XXX_sizecache int32 `json:"-"` 192} 193 194func (m *StreamingTranslateSpeechConfig) Reset() { *m = StreamingTranslateSpeechConfig{} } 195func (m *StreamingTranslateSpeechConfig) String() string { return proto.CompactTextString(m) } 196func (*StreamingTranslateSpeechConfig) ProtoMessage() {} 197func (*StreamingTranslateSpeechConfig) Descriptor() ([]byte, []int) { 198 return fileDescriptor_7b2f67d966c0ba6c, []int{1} 199} 200 201func (m *StreamingTranslateSpeechConfig) XXX_Unmarshal(b []byte) error { 202 return xxx_messageInfo_StreamingTranslateSpeechConfig.Unmarshal(m, b) 203} 204func (m *StreamingTranslateSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 205 return xxx_messageInfo_StreamingTranslateSpeechConfig.Marshal(b, m, deterministic) 206} 207func (m *StreamingTranslateSpeechConfig) XXX_Merge(src proto.Message) { 208 xxx_messageInfo_StreamingTranslateSpeechConfig.Merge(m, src) 209} 210func (m *StreamingTranslateSpeechConfig) XXX_Size() int { 211 return xxx_messageInfo_StreamingTranslateSpeechConfig.Size(m) 212} 213func (m *StreamingTranslateSpeechConfig) XXX_DiscardUnknown() { 214 xxx_messageInfo_StreamingTranslateSpeechConfig.DiscardUnknown(m) 215} 216 217var xxx_messageInfo_StreamingTranslateSpeechConfig proto.InternalMessageInfo 218 219func (m *StreamingTranslateSpeechConfig) GetAudioConfig() *TranslateSpeechConfig { 220 if m != nil { 221 return m.AudioConfig 222 } 223 return nil 224} 225 226func (m *StreamingTranslateSpeechConfig) GetSingleUtterance() bool { 227 if m != nil { 228 return m.SingleUtterance 229 } 230 return false 231} 232 233// The top-level message sent by the client for the `StreamingTranslateSpeech` 234// method. Multiple `StreamingTranslateSpeechRequest` messages are sent. The 235// first message must contain a `streaming_config` message and must not contain 236// `audio_content` data. All subsequent messages must contain `audio_content` 237// data and must not contain a `streaming_config` message. 238type StreamingTranslateSpeechRequest struct { 239 // The streaming request, which is either a streaming config or content. 240 // 241 // Types that are valid to be assigned to StreamingRequest: 242 // *StreamingTranslateSpeechRequest_StreamingConfig 243 // *StreamingTranslateSpeechRequest_AudioContent 244 StreamingRequest isStreamingTranslateSpeechRequest_StreamingRequest `protobuf_oneof:"streaming_request"` 245 XXX_NoUnkeyedLiteral struct{} `json:"-"` 246 XXX_unrecognized []byte `json:"-"` 247 XXX_sizecache int32 `json:"-"` 248} 249 250func (m *StreamingTranslateSpeechRequest) Reset() { *m = StreamingTranslateSpeechRequest{} } 251func (m *StreamingTranslateSpeechRequest) String() string { return proto.CompactTextString(m) } 252func (*StreamingTranslateSpeechRequest) ProtoMessage() {} 253func (*StreamingTranslateSpeechRequest) Descriptor() ([]byte, []int) { 254 return fileDescriptor_7b2f67d966c0ba6c, []int{2} 255} 256 257func (m *StreamingTranslateSpeechRequest) XXX_Unmarshal(b []byte) error { 258 return xxx_messageInfo_StreamingTranslateSpeechRequest.Unmarshal(m, b) 259} 260func (m *StreamingTranslateSpeechRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 261 return xxx_messageInfo_StreamingTranslateSpeechRequest.Marshal(b, m, deterministic) 262} 263func (m *StreamingTranslateSpeechRequest) XXX_Merge(src proto.Message) { 264 xxx_messageInfo_StreamingTranslateSpeechRequest.Merge(m, src) 265} 266func (m *StreamingTranslateSpeechRequest) XXX_Size() int { 267 return xxx_messageInfo_StreamingTranslateSpeechRequest.Size(m) 268} 269func (m *StreamingTranslateSpeechRequest) XXX_DiscardUnknown() { 270 xxx_messageInfo_StreamingTranslateSpeechRequest.DiscardUnknown(m) 271} 272 273var xxx_messageInfo_StreamingTranslateSpeechRequest proto.InternalMessageInfo 274 275type isStreamingTranslateSpeechRequest_StreamingRequest interface { 276 isStreamingTranslateSpeechRequest_StreamingRequest() 277} 278 279type StreamingTranslateSpeechRequest_StreamingConfig struct { 280 StreamingConfig *StreamingTranslateSpeechConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"` 281} 282 283type StreamingTranslateSpeechRequest_AudioContent struct { 284 AudioContent []byte `protobuf:"bytes,2,opt,name=audio_content,json=audioContent,proto3,oneof"` 285} 286 287func (*StreamingTranslateSpeechRequest_StreamingConfig) isStreamingTranslateSpeechRequest_StreamingRequest() { 288} 289 290func (*StreamingTranslateSpeechRequest_AudioContent) isStreamingTranslateSpeechRequest_StreamingRequest() { 291} 292 293func (m *StreamingTranslateSpeechRequest) GetStreamingRequest() isStreamingTranslateSpeechRequest_StreamingRequest { 294 if m != nil { 295 return m.StreamingRequest 296 } 297 return nil 298} 299 300func (m *StreamingTranslateSpeechRequest) GetStreamingConfig() *StreamingTranslateSpeechConfig { 301 if x, ok := m.GetStreamingRequest().(*StreamingTranslateSpeechRequest_StreamingConfig); ok { 302 return x.StreamingConfig 303 } 304 return nil 305} 306 307func (m *StreamingTranslateSpeechRequest) GetAudioContent() []byte { 308 if x, ok := m.GetStreamingRequest().(*StreamingTranslateSpeechRequest_AudioContent); ok { 309 return x.AudioContent 310 } 311 return nil 312} 313 314// XXX_OneofWrappers is for the internal use of the proto package. 315func (*StreamingTranslateSpeechRequest) XXX_OneofWrappers() []interface{} { 316 return []interface{}{ 317 (*StreamingTranslateSpeechRequest_StreamingConfig)(nil), 318 (*StreamingTranslateSpeechRequest_AudioContent)(nil), 319 } 320} 321 322// A streaming speech translation result corresponding to a portion of the audio 323// that is currently being processed. 324type StreamingTranslateSpeechResult struct { 325 // Translation result. 326 // 327 // Use oneof field to reserve for future tts result. 328 // 329 // Types that are valid to be assigned to Result: 330 // *StreamingTranslateSpeechResult_TextTranslationResult_ 331 Result isStreamingTranslateSpeechResult_Result `protobuf_oneof:"result"` 332 // Output only. The debug only recognition result in original language. This field is debug 333 // only and will be set to empty string if not available. 334 // This is implementation detail and will not be backward compatible. 335 // 336 // Still need to decide whether to expose this field by default. 337 RecognitionResult string `protobuf:"bytes,3,opt,name=recognition_result,json=recognitionResult,proto3" json:"recognition_result,omitempty"` 338 XXX_NoUnkeyedLiteral struct{} `json:"-"` 339 XXX_unrecognized []byte `json:"-"` 340 XXX_sizecache int32 `json:"-"` 341} 342 343func (m *StreamingTranslateSpeechResult) Reset() { *m = StreamingTranslateSpeechResult{} } 344func (m *StreamingTranslateSpeechResult) String() string { return proto.CompactTextString(m) } 345func (*StreamingTranslateSpeechResult) ProtoMessage() {} 346func (*StreamingTranslateSpeechResult) Descriptor() ([]byte, []int) { 347 return fileDescriptor_7b2f67d966c0ba6c, []int{3} 348} 349 350func (m *StreamingTranslateSpeechResult) XXX_Unmarshal(b []byte) error { 351 return xxx_messageInfo_StreamingTranslateSpeechResult.Unmarshal(m, b) 352} 353func (m *StreamingTranslateSpeechResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 354 return xxx_messageInfo_StreamingTranslateSpeechResult.Marshal(b, m, deterministic) 355} 356func (m *StreamingTranslateSpeechResult) XXX_Merge(src proto.Message) { 357 xxx_messageInfo_StreamingTranslateSpeechResult.Merge(m, src) 358} 359func (m *StreamingTranslateSpeechResult) XXX_Size() int { 360 return xxx_messageInfo_StreamingTranslateSpeechResult.Size(m) 361} 362func (m *StreamingTranslateSpeechResult) XXX_DiscardUnknown() { 363 xxx_messageInfo_StreamingTranslateSpeechResult.DiscardUnknown(m) 364} 365 366var xxx_messageInfo_StreamingTranslateSpeechResult proto.InternalMessageInfo 367 368type isStreamingTranslateSpeechResult_Result interface { 369 isStreamingTranslateSpeechResult_Result() 370} 371 372type StreamingTranslateSpeechResult_TextTranslationResult_ struct { 373 TextTranslationResult *StreamingTranslateSpeechResult_TextTranslationResult `protobuf:"bytes,1,opt,name=text_translation_result,json=textTranslationResult,proto3,oneof"` 374} 375 376func (*StreamingTranslateSpeechResult_TextTranslationResult_) isStreamingTranslateSpeechResult_Result() { 377} 378 379func (m *StreamingTranslateSpeechResult) GetResult() isStreamingTranslateSpeechResult_Result { 380 if m != nil { 381 return m.Result 382 } 383 return nil 384} 385 386func (m *StreamingTranslateSpeechResult) GetTextTranslationResult() *StreamingTranslateSpeechResult_TextTranslationResult { 387 if x, ok := m.GetResult().(*StreamingTranslateSpeechResult_TextTranslationResult_); ok { 388 return x.TextTranslationResult 389 } 390 return nil 391} 392 393func (m *StreamingTranslateSpeechResult) GetRecognitionResult() string { 394 if m != nil { 395 return m.RecognitionResult 396 } 397 return "" 398} 399 400// XXX_OneofWrappers is for the internal use of the proto package. 401func (*StreamingTranslateSpeechResult) XXX_OneofWrappers() []interface{} { 402 return []interface{}{ 403 (*StreamingTranslateSpeechResult_TextTranslationResult_)(nil), 404 } 405} 406 407// Text translation result. 408type StreamingTranslateSpeechResult_TextTranslationResult struct { 409 // Output only. The translated sentence. 410 Translation string `protobuf:"bytes,1,opt,name=translation,proto3" json:"translation,omitempty"` 411 // Output only. If `false`, this `StreamingTranslateSpeechResult` represents 412 // an interim result that may change. If `true`, this is the final time the 413 // translation service will return this particular 414 // `StreamingTranslateSpeechResult`, the streaming translator will not 415 // return any further hypotheses for this portion of the transcript and 416 // corresponding audio. 417 IsFinal bool `protobuf:"varint,2,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"` 418 // Output only. The source language code (BCP-47) detected in the audio. Speech 419 // translation result will translate in the most likely language detected 420 // including the alternative source languages and main source_language_code. 421 DetectedSourceLanguageCode string `protobuf:"bytes,3,opt,name=detected_source_language_code,json=detectedSourceLanguageCode,proto3" json:"detected_source_language_code,omitempty"` 422 XXX_NoUnkeyedLiteral struct{} `json:"-"` 423 XXX_unrecognized []byte `json:"-"` 424 XXX_sizecache int32 `json:"-"` 425} 426 427func (m *StreamingTranslateSpeechResult_TextTranslationResult) Reset() { 428 *m = StreamingTranslateSpeechResult_TextTranslationResult{} 429} 430func (m *StreamingTranslateSpeechResult_TextTranslationResult) String() string { 431 return proto.CompactTextString(m) 432} 433func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage() {} 434func (*StreamingTranslateSpeechResult_TextTranslationResult) Descriptor() ([]byte, []int) { 435 return fileDescriptor_7b2f67d966c0ba6c, []int{3, 0} 436} 437 438func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Unmarshal(b []byte) error { 439 return xxx_messageInfo_StreamingTranslateSpeechResult_TextTranslationResult.Unmarshal(m, b) 440} 441func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 442 return xxx_messageInfo_StreamingTranslateSpeechResult_TextTranslationResult.Marshal(b, m, deterministic) 443} 444func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Merge(src proto.Message) { 445 xxx_messageInfo_StreamingTranslateSpeechResult_TextTranslationResult.Merge(m, src) 446} 447func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Size() int { 448 return xxx_messageInfo_StreamingTranslateSpeechResult_TextTranslationResult.Size(m) 449} 450func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_DiscardUnknown() { 451 xxx_messageInfo_StreamingTranslateSpeechResult_TextTranslationResult.DiscardUnknown(m) 452} 453 454var xxx_messageInfo_StreamingTranslateSpeechResult_TextTranslationResult proto.InternalMessageInfo 455 456func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetTranslation() string { 457 if m != nil { 458 return m.Translation 459 } 460 return "" 461} 462 463func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetIsFinal() bool { 464 if m != nil { 465 return m.IsFinal 466 } 467 return false 468} 469 470func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetDetectedSourceLanguageCode() string { 471 if m != nil { 472 return m.DetectedSourceLanguageCode 473 } 474 return "" 475} 476 477// A streaming speech translation response corresponding to a portion of 478// the audio currently processed. 479type StreamingTranslateSpeechResponse struct { 480 // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that 481 // specifies the error for the operation. 482 Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` 483 // Output only. The translation result that is currently being processed (is_final could be 484 // true or false). 485 Result *StreamingTranslateSpeechResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` 486 // Output only. Indicates the type of speech event. 487 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"` 488 XXX_NoUnkeyedLiteral struct{} `json:"-"` 489 XXX_unrecognized []byte `json:"-"` 490 XXX_sizecache int32 `json:"-"` 491} 492 493func (m *StreamingTranslateSpeechResponse) Reset() { *m = StreamingTranslateSpeechResponse{} } 494func (m *StreamingTranslateSpeechResponse) String() string { return proto.CompactTextString(m) } 495func (*StreamingTranslateSpeechResponse) ProtoMessage() {} 496func (*StreamingTranslateSpeechResponse) Descriptor() ([]byte, []int) { 497 return fileDescriptor_7b2f67d966c0ba6c, []int{4} 498} 499 500func (m *StreamingTranslateSpeechResponse) XXX_Unmarshal(b []byte) error { 501 return xxx_messageInfo_StreamingTranslateSpeechResponse.Unmarshal(m, b) 502} 503func (m *StreamingTranslateSpeechResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 504 return xxx_messageInfo_StreamingTranslateSpeechResponse.Marshal(b, m, deterministic) 505} 506func (m *StreamingTranslateSpeechResponse) XXX_Merge(src proto.Message) { 507 xxx_messageInfo_StreamingTranslateSpeechResponse.Merge(m, src) 508} 509func (m *StreamingTranslateSpeechResponse) XXX_Size() int { 510 return xxx_messageInfo_StreamingTranslateSpeechResponse.Size(m) 511} 512func (m *StreamingTranslateSpeechResponse) XXX_DiscardUnknown() { 513 xxx_messageInfo_StreamingTranslateSpeechResponse.DiscardUnknown(m) 514} 515 516var xxx_messageInfo_StreamingTranslateSpeechResponse proto.InternalMessageInfo 517 518func (m *StreamingTranslateSpeechResponse) GetError() *status.Status { 519 if m != nil { 520 return m.Error 521 } 522 return nil 523} 524 525func (m *StreamingTranslateSpeechResponse) GetResult() *StreamingTranslateSpeechResult { 526 if m != nil { 527 return m.Result 528 } 529 return nil 530} 531 532func (m *StreamingTranslateSpeechResponse) GetSpeechEventType() StreamingTranslateSpeechResponse_SpeechEventType { 533 if m != nil { 534 return m.SpeechEventType 535 } 536 return StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED 537} 538 539func init() { 540 proto.RegisterEnum("google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse_SpeechEventType", StreamingTranslateSpeechResponse_SpeechEventType_name, StreamingTranslateSpeechResponse_SpeechEventType_value) 541 proto.RegisterType((*TranslateSpeechConfig)(nil), "google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig") 542 proto.RegisterType((*StreamingTranslateSpeechConfig)(nil), "google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig") 543 proto.RegisterType((*StreamingTranslateSpeechRequest)(nil), "google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest") 544 proto.RegisterType((*StreamingTranslateSpeechResult)(nil), "google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult") 545 proto.RegisterType((*StreamingTranslateSpeechResult_TextTranslationResult)(nil), "google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult") 546 proto.RegisterType((*StreamingTranslateSpeechResponse)(nil), "google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse") 547} 548 549func init() { 550 proto.RegisterFile("google/cloud/mediatranslation/v1beta1/media_translation.proto", fileDescriptor_7b2f67d966c0ba6c) 551} 552 553var fileDescriptor_7b2f67d966c0ba6c = []byte{ 554 // 917 bytes of a gzipped FileDescriptorProto 555 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x6f, 0xe3, 0x44, 556 0x1b, 0x8e, 0x93, 0xaf, 0xfd, 0xca, 0xb4, 0xbb, 0x6d, 0x07, 0xaa, 0x86, 0xa0, 0x6d, 0xbb, 0x91, 557 0x2a, 0x15, 0xa4, 0xb5, 0x69, 0x11, 0x97, 0x00, 0x87, 0x26, 0xeb, 0x34, 0x95, 0x96, 0x10, 0x9c, 558 0xb4, 0x08, 0xa8, 0x34, 0x9a, 0xda, 0x6f, 0x9d, 0x91, 0x1c, 0x8f, 0x99, 0x99, 0xa4, 0xbb, 0xfc, 559 0x02, 0xee, 0x88, 0x03, 0x27, 0x0e, 0x48, 0x1c, 0xb8, 0x71, 0xe1, 0x47, 0xac, 0xc4, 0x01, 0x7e, 560 0x01, 0x67, 0x7e, 0x01, 0x47, 0xe4, 0x19, 0xa7, 0x71, 0xdd, 0x74, 0xa9, 0x54, 0x8e, 0x9e, 0xe7, 561 0x79, 0x9f, 0xf7, 0x79, 0xde, 0x99, 0xc9, 0x04, 0x7d, 0x14, 0x72, 0x1e, 0x46, 0xe0, 0xf8, 0x11, 562 0x1f, 0x07, 0xce, 0x08, 0x02, 0x46, 0x95, 0xa0, 0xb1, 0x8c, 0xa8, 0x62, 0x3c, 0x76, 0x26, 0xfb, 563 0xe7, 0xa0, 0xe8, 0xbe, 0x01, 0x48, 0x0e, 0xb1, 0x13, 0xc1, 0x15, 0xc7, 0xbb, 0xa6, 0xdc, 0xd6, 564 0xe5, 0x76, 0xb1, 0xdc, 0xce, 0xca, 0x6b, 0xdb, 0x59, 0x17, 0x9a, 0x30, 0xe7, 0x82, 0x41, 0x14, 565 0x90, 0x73, 0x18, 0xd2, 0x09, 0xe3, 0xc2, 0xe8, 0xd4, 0x36, 0x33, 0x82, 0x48, 0x7c, 0x47, 0x2a, 566 0xaa, 0xc6, 0xb2, 0x00, 0xa4, 0x95, 0x7e, 0xc4, 0x20, 0x56, 0x06, 0xa8, 0xff, 0x56, 0x46, 0x1b, 567 0x83, 0xac, 0x15, 0xf4, 0x13, 0x00, 0x7f, 0xd8, 0xe2, 0xf1, 0x05, 0x0b, 0xf1, 0x3b, 0xe8, 0x21, 568 0x1d, 0x07, 0x8c, 0x13, 0x88, 0x7d, 0x1e, 0xb0, 0x38, 0xac, 0x5a, 0x3b, 0xd6, 0xde, 0x6b, 0xcd, 569 0xca, 0x9f, 0x87, 0x65, 0xef, 0x81, 0x86, 0xdc, 0x0c, 0xc1, 0xef, 0xa3, 0x37, 0x24, 0x1f, 0x0b, 570 0x1f, 0x48, 0x44, 0xe3, 0x70, 0x4c, 0x43, 0x20, 0x3e, 0x0f, 0xa0, 0x5a, 0x9e, 0x55, 0x60, 0x43, 571 0x78, 0x96, 0xe1, 0x2d, 0x1e, 0x00, 0xee, 0xa2, 0xc7, 0x34, 0x52, 0x20, 0x62, 0xaa, 0xd8, 0x04, 572 0xc8, 0x3c, 0x09, 0x59, 0x5d, 0xdc, 0xa9, 0x18, 0x0d, 0xcb, 0xdb, 0xca, 0xb1, 0xfb, 0x37, 0xe4, 573 0x64, 0x6a, 0x43, 0x51, 0x11, 0x82, 0x2a, 0xd8, 0xa8, 0xe4, 0x6c, 0x18, 0xc2, 0x35, 0x1b, 0x0e, 574 0x5a, 0x97, 0x74, 0x94, 0x44, 0x40, 0x04, 0x55, 0x40, 0x86, 0x20, 0xd4, 0xd7, 0xd5, 0xff, 0xed, 575 0x58, 0x7b, 0x0b, 0xa6, 0xed, 0xaa, 0x41, 0x3d, 0xaa, 0xa0, 0x93, 0x62, 0xf8, 0x4d, 0xb4, 0x30, 576 0xe2, 0x01, 0x44, 0xd5, 0x85, 0xa9, 0xb0, 0xe5, 0x99, 0x95, 0xfa, 0xaf, 0x16, 0xda, 0xea, 0x2b, 577 0x01, 0x74, 0xc4, 0xe2, 0x70, 0xfe, 0x60, 0x03, 0xb4, 0x62, 0x06, 0xeb, 0xeb, 0x6f, 0x3d, 0xd6, 578 0xe5, 0x83, 0x0f, 0xed, 0x3b, 0x9d, 0x01, 0x7b, 0xae, 0xa6, 0xc9, 0xb6, 0xac, 0x65, 0xb3, 0x2e, 579 0x36, 0x5a, 0x93, 0x2c, 0x0e, 0x23, 0x20, 0x63, 0xa5, 0x40, 0xd0, 0xd8, 0x37, 0xdb, 0xb1, 0x34, 580 0xcd, 0xa4, 0xc1, 0x93, 0x29, 0x56, 0xff, 0xdd, 0x42, 0xdb, 0xb7, 0x19, 0xf7, 0xe0, 0xab, 0x31, 581 0x48, 0x85, 0x05, 0x5a, 0x93, 0x53, 0xca, 0x75, 0xf7, 0xee, 0x1d, 0xdd, 0xbf, 0x7a, 0x34, 0x9d, 582 0x92, 0xb7, 0x7a, 0xd5, 0x20, 0xcb, 0xb1, 0x8b, 0x1e, 0x5c, 0x4d, 0x4b, 0x41, 0xac, 0x74, 0x88, 583 0x95, 0x4e, 0xc9, 0x5b, 0x99, 0xa6, 0x4d, 0x57, 0x9b, 0xaf, 0xa3, 0xf5, 0x99, 0x35, 0x61, 0xfc, 584 0xd6, 0x7f, 0xa8, 0xdc, 0xbe, 0x19, 0x1e, 0xc8, 0x71, 0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, 0xc9, 0xea, 607 0x43, 0x9e, 0xde, 0x25, 0x9b, 0x8b, 0xd0, 0x09, 0x21, 0xd6, 0xaf, 0xb3, 0x33, 0x73, 0xf1, 0x2f, 608 0xff, 0x2c, 0x3e, 0x28, 0x02, 0x7f, 0x5b, 0xd6, 0xcf, 0xe5, 0xdd, 0x23, 0x23, 0xdd, 0xd2, 0xd6, 609 0x8a, 0x06, 0xec, 0xd3, 0xfd, 0x66, 0x5a, 0xfb, 0x72, 0xca, 0x3b, 0xd3, 0xbc, 0xb3, 0x22, 0xef, 610 0xec, 0xd4, 0xf4, 0xf8, 0xab, 0xbc, 0x67, 0x78, 0x8d, 0x86, 0x26, 0x36, 0x1a, 0x45, 0x66, 0xa3, 611 0x91, 0x51, 0xcf, 0x17, 0xb5, 0xff, 0xf7, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xa7, 0xc3, 612 0x21, 0x18, 0x09, 0x00, 0x00, 613} 614 615// Reference imports to suppress errors if they are not otherwise used. 616var _ context.Context 617var _ grpc.ClientConnInterface 618 619// This is a compile-time assertion to ensure that this generated file 620// is compatible with the grpc package it is being compiled against. 621const _ = grpc.SupportPackageIsVersion6 622 623// SpeechTranslationServiceClient is the client API for SpeechTranslationService service. 624// 625// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 626type SpeechTranslationServiceClient interface { 627 // Performs bidirectional streaming speech translation: receive results while 628 // sending audio. This method is only available via the gRPC API (not REST). 629 StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error) 630} 631 632type speechTranslationServiceClient struct { 633 cc grpc.ClientConnInterface 634} 635 636func NewSpeechTranslationServiceClient(cc grpc.ClientConnInterface) SpeechTranslationServiceClient { 637 return &speechTranslationServiceClient{cc} 638} 639 640func (c *speechTranslationServiceClient) StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error) { 641 stream, err := c.cc.NewStream(ctx, &_SpeechTranslationService_serviceDesc.Streams[0], "/google.cloud.mediatranslation.v1beta1.SpeechTranslationService/StreamingTranslateSpeech", opts...) 642 if err != nil { 643 return nil, err 644 } 645 x := &speechTranslationServiceStreamingTranslateSpeechClient{stream} 646 return x, nil 647} 648 649type SpeechTranslationService_StreamingTranslateSpeechClient interface { 650 Send(*StreamingTranslateSpeechRequest) error 651 Recv() (*StreamingTranslateSpeechResponse, error) 652 grpc.ClientStream 653} 654 655type speechTranslationServiceStreamingTranslateSpeechClient struct { 656 grpc.ClientStream 657} 658 659func (x *speechTranslationServiceStreamingTranslateSpeechClient) Send(m *StreamingTranslateSpeechRequest) error { 660 return x.ClientStream.SendMsg(m) 661} 662 663func (x *speechTranslationServiceStreamingTranslateSpeechClient) Recv() (*StreamingTranslateSpeechResponse, error) { 664 m := new(StreamingTranslateSpeechResponse) 665 if err := x.ClientStream.RecvMsg(m); err != nil { 666 return nil, err 667 } 668 return m, nil 669} 670 671// SpeechTranslationServiceServer is the server API for SpeechTranslationService service. 672type SpeechTranslationServiceServer interface { 673 // Performs bidirectional streaming speech translation: receive results while 674 // sending audio. This method is only available via the gRPC API (not REST). 675 StreamingTranslateSpeech(SpeechTranslationService_StreamingTranslateSpeechServer) error 676} 677 678// UnimplementedSpeechTranslationServiceServer can be embedded to have forward compatible implementations. 679type UnimplementedSpeechTranslationServiceServer struct { 680} 681 682func (*UnimplementedSpeechTranslationServiceServer) StreamingTranslateSpeech(srv SpeechTranslationService_StreamingTranslateSpeechServer) error { 683 return status1.Errorf(codes.Unimplemented, "method StreamingTranslateSpeech not implemented") 684} 685 686func RegisterSpeechTranslationServiceServer(s *grpc.Server, srv SpeechTranslationServiceServer) { 687 s.RegisterService(&_SpeechTranslationService_serviceDesc, srv) 688} 689 690func _SpeechTranslationService_StreamingTranslateSpeech_Handler(srv interface{}, stream grpc.ServerStream) error { 691 return srv.(SpeechTranslationServiceServer).StreamingTranslateSpeech(&speechTranslationServiceStreamingTranslateSpeechServer{stream}) 692} 693 694type SpeechTranslationService_StreamingTranslateSpeechServer interface { 695 Send(*StreamingTranslateSpeechResponse) error 696 Recv() (*StreamingTranslateSpeechRequest, error) 697 grpc.ServerStream 698} 699 700type speechTranslationServiceStreamingTranslateSpeechServer struct { 701 grpc.ServerStream 702} 703 704func (x *speechTranslationServiceStreamingTranslateSpeechServer) Send(m *StreamingTranslateSpeechResponse) error { 705 return x.ServerStream.SendMsg(m) 706} 707 708func (x *speechTranslationServiceStreamingTranslateSpeechServer) Recv() (*StreamingTranslateSpeechRequest, error) { 709 m := new(StreamingTranslateSpeechRequest) 710 if err := x.ServerStream.RecvMsg(m); err != nil { 711 return nil, err 712 } 713 return m, nil 714} 715 716var _SpeechTranslationService_serviceDesc = grpc.ServiceDesc{ 717 ServiceName: "google.cloud.mediatranslation.v1beta1.SpeechTranslationService", 718 HandlerType: (*SpeechTranslationServiceServer)(nil), 719 Methods: []grpc.MethodDesc{}, 720 Streams: []grpc.StreamDesc{ 721 { 722 StreamName: "StreamingTranslateSpeech", 723 Handler: _SpeechTranslationService_StreamingTranslateSpeech_Handler, 724 ServerStreams: true, 725 ClientStreams: true, 726 }, 727 }, 728 Metadata: "google/cloud/mediatranslation/v1beta1/media_translation.proto", 729} 730