Debian Codegraph @

googleapis/cloud/mediatranslation/v1alpha1/media_translation.pb.go

raw symbols SCIP
1 // Copyright 2020 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.26.0
18 // protoc v3.12.2
19 // source: google/cloud/mediatranslation/v1alpha1/media_translation.proto
20
21 package mediatranslation
22
23 import (
24 context "context"
25 reflect "reflect"
26 sync "sync"
27
28 _ "google.golang.org/genproto/googleapis/api/annotations"
29 status "google.golang.org/genproto/googleapis/rpc/status"
30 grpc "google.golang.org/grpc"
31 codes "google.golang.org/grpc/codes"
32 status1 "google.golang.org/grpc/status"
33 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
34 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
35 )
36
37 const (
38 // Verify that this generated code is sufficiently up-to-date.
39 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
40 // Verify that runtime/protoimpl is sufficiently up-to-date.
41 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
42 )
43
44 // Indicates the type of speech event.
45 type StreamingTranslateSpeechResponse_SpeechEventType int32
46
47 const (
48 // No speech event specified.
49 StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED StreamingTranslateSpeechResponse_SpeechEventType = 0
50 // This event indicates that the server has detected the end of the user's
51 // speech utterance and expects no additional speech. Therefore, the server
52 // will not process additional audio (although it may subsequently return
53 // additional results). When the client receives `END_OF_SINGLE_UTTERANCE`
54 // event, the client should stop sending the requests. However, clients
55 // should keep receiving remaining responses until the stream is terminated.
56 // To construct the complete sentence in a streaming way, one should
57 // override (if `is_final` of previous response is `false`), or append (if
58 // `is_final` of previous response is `true`). This event is only sent if
59 // `single_utterance` was set to `true`, and is not used otherwise.
60 StreamingTranslateSpeechResponse_END_OF_SINGLE_UTTERANCE StreamingTranslateSpeechResponse_SpeechEventType = 1
61 )
62
63 // Enum value maps for StreamingTranslateSpeechResponse_SpeechEventType.
64 var (
65 StreamingTranslateSpeechResponse_SpeechEventType_name = map[int32]string{
66 0: "SPEECH_EVENT_TYPE_UNSPECIFIED",
67 1: "END_OF_SINGLE_UTTERANCE",
68 }
69 StreamingTranslateSpeechResponse_SpeechEventType_value = map[string]int32{
70 "SPEECH_EVENT_TYPE_UNSPECIFIED": 0,
71 "END_OF_SINGLE_UTTERANCE": 1,
72 }
73 )
74
75 func (x StreamingTranslateSpeechResponse_SpeechEventType) Enum() *StreamingTranslateSpeechResponse_SpeechEventType {
76 p := new(StreamingTranslateSpeechResponse_SpeechEventType)
77 *p = x
78 return p
79 }
80
81 func (x StreamingTranslateSpeechResponse_SpeechEventType) String() string {
82 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
83 }
84
85 func (StreamingTranslateSpeechResponse_SpeechEventType) Descriptor() protoreflect.EnumDescriptor {
86 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_enumTypes[0].Descriptor()
87 }
88
89 func (StreamingTranslateSpeechResponse_SpeechEventType) Type() protoreflect.EnumType {
90 return &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_enumTypes[0]
91 }
92
93 func (x StreamingTranslateSpeechResponse_SpeechEventType) Number() protoreflect.EnumNumber {
94 return protoreflect.EnumNumber(x)
95 }
96
97 // Deprecated: Use StreamingTranslateSpeechResponse_SpeechEventType.Descriptor instead.
98 func (StreamingTranslateSpeechResponse_SpeechEventType) EnumDescriptor() ([]byte, []int) {
99 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{4, 0}
100 }
101
102 // Provides information to the speech translation that specifies how to process
103 // the request.
104 type TranslateSpeechConfig struct {
105 state protoimpl.MessageState
106 sizeCache protoimpl.SizeCache
107 unknownFields protoimpl.UnknownFields
108
109 // Required. Encoding of audio data.
110 // Supported formats:
111 //
112 // - `linear16`
113 //
114 // Uncompressed 16-bit signed little-endian samples (Linear PCM).
115 //
116 // - `flac`
117 //
118 // `flac` (Free Lossless Audio Codec) is the recommended encoding
119 // because it is lossless--therefore recognition is not compromised--and
120 // requires only about half the bandwidth of `linear16`.
121 //
122 // - `mulaw`
123 //
124 // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
125 //
126 // - `amr`
127 //
128 // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
129 //
130 // - `amr-wb`
131 //
132 // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
133 //
134 // - `ogg-opus`
135 //
136 // Opus encoded audio frames in Ogg container
137 // ([OggOpus](https://wiki.xiph.org/OggOpus)).
138 // `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.
139 //
140 // - `mp3`
141 //
142 // MP3 audio. Support all standard MP3 bitrates (which range from 32-320
143 // kbps). When using this encoding, `sample_rate_hertz` has to match the
144 // sample rate of the file being used.
145 //
146 //
147 AudioEncoding string `protobuf:"bytes,1,opt,name=audio_encoding,json=audioEncoding,proto3" json:"audio_encoding,omitempty"`
148 // Required. Source language code (BCP-47) of the input audio.
149 SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
150 // Required. Target language code (BCP-47) of the output.
151 TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"`
152 // Optional. A list of up to 3 additional language codes (BCP-47), listing possible
153 // alternative languages of the supplied audio. If alternative source
154 // languages are listed, speech translation result will translate in the most
155 // likely language detected including the main source_language_code. The
156 // translated result will include the language code of the language detected
157 // in the audio.
158 // Note:
159 // 1. If the provided alternative_source_language_code is not supported
160 // by current API version, we will skip that language code.
161 // 2. If user only provided one eligible alternative_source_language_codes,
162 // the translation will happen between source_language_code and
163 // alternative_source_language_codes. The target_language_code will be
164 // ignored. It will be useful in conversation mode.
165 AlternativeSourceLanguageCodes []string `protobuf:"bytes,6,rep,name=alternative_source_language_codes,json=alternativeSourceLanguageCodes,proto3" json:"alternative_source_language_codes,omitempty"`
166 // Optional. Sample rate in Hertz of the audio data. Valid values are:
167 // 8000-48000. 16000 is optimal. For best results, set the sampling rate of
168 // the audio source to 16000 Hz. If that's not possible, use the native sample
169 // rate of the audio source (instead of re-sampling).
170 //
171 SampleRateHertz int32 `protobuf:"varint,4,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
172 // Optional.
173 Model string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"`
174 }
175
176 func (x *TranslateSpeechConfig) Reset() {
177 *x = TranslateSpeechConfig{}
178 if protoimpl.UnsafeEnabled {
179 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[0]
180 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
181 ms.StoreMessageInfo(mi)
182 }
183 }
184
185 func (x *TranslateSpeechConfig) String() string {
186 return protoimpl.X.MessageStringOf(x)
187 }
188
189 func (*TranslateSpeechConfig) ProtoMessage() {}
190
191 func (x *TranslateSpeechConfig) ProtoReflect() protoreflect.Message {
192 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[0]
193 if protoimpl.UnsafeEnabled && x != nil {
194 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
195 if ms.LoadMessageInfo() == nil {
196 ms.StoreMessageInfo(mi)
197 }
198 return ms
199 }
200 return mi.MessageOf(x)
201 }
202
203 // Deprecated: Use TranslateSpeechConfig.ProtoReflect.Descriptor instead.
204 func (*TranslateSpeechConfig) Descriptor() ([]byte, []int) {
205 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{0}
206 }
207
208 func (x *TranslateSpeechConfig) GetAudioEncoding() string {
209 if x != nil {
210 return x.AudioEncoding
211 }
212 return ""
213 }
214
215 func (x *TranslateSpeechConfig) GetSourceLanguageCode() string {
216 if x != nil {
217 return x.SourceLanguageCode
218 }
219 return ""
220 }
221
222 func (x *TranslateSpeechConfig) GetTargetLanguageCode() string {
223 if x != nil {
224 return x.TargetLanguageCode
225 }
226 return ""
227 }
228
229 func (x *TranslateSpeechConfig) GetAlternativeSourceLanguageCodes() []string {
230 if x != nil {
231 return x.AlternativeSourceLanguageCodes
232 }
233 return nil
234 }
235
236 func (x *TranslateSpeechConfig) GetSampleRateHertz() int32 {
237 if x != nil {
238 return x.SampleRateHertz
239 }
240 return 0
241 }
242
243 func (x *TranslateSpeechConfig) GetModel() string {
244 if x != nil {
245 return x.Model
246 }
247 return ""
248 }
249
250 // Config used for streaming translation.
251 type StreamingTranslateSpeechConfig struct {
252 state protoimpl.MessageState
253 sizeCache protoimpl.SizeCache
254 unknownFields protoimpl.UnknownFields
255
256 // Required. The common config for all the following audio contents.
257 AudioConfig *TranslateSpeechConfig `protobuf:"bytes,1,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"`
258 // Optional. If `false` or omitted, the system performs
259 // continuous translation (continuing to wait for and process audio even if
260 // the user pauses speaking) until the client closes the input stream (gRPC
261 // API) or until the maximum time limit has been reached. May return multiple
262 // `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`.
263 //
264 // If `true`, the speech translator will detect a single spoken utterance.
265 // When it detects that the user has paused or stopped speaking, it will
266 // return an `END_OF_SINGLE_UTTERANCE` event and cease translation.
267 // When the client receives `END_OF_SINGLE_UTTERANCE` event, the client should
268 // stop sending the requests. However, clients should keep receiving remaining
269 // responses until the stream is terminated. To construct the complete
270 // sentence in a streaming way, one should override (if `is_final` of previous
271 // response is false), or append (if 'is_final' of previous response is true).
272 SingleUtterance bool `protobuf:"varint,2,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"`
273 // Optional. Stability control for the media translation text. The value should be
274 // "LOW", "MEDIUM", "HIGH". It applies to text/text_and_audio translation
275 // only.
276 // For audio translation mode, we only support HIGH stability mode,
277 // low/medium stability mode will throw argument error.
278 // Default empty string will be treated as "HIGH" in audio translation mode;
279 // will be treated as "LOW" in other translation mode.
280 // Note that stability and speed would be trade off.
281 // 1. "LOW": In low mode, translation service will start to do translation
282 // right after getting recognition response. The speed will be faster.
283 // 2. "MEDIUM": In medium mode, translation service will
284 // check if the recognition response is stable enough or not, and only
285 // translate recognition response which is not likely to be changed later.
286 // 3. "HIGH": In high mode, translation service will wait for more stable
287 // recognition responses, and then start to do translation. Also, the
288 // following recognition responses cannot modify previous recognition
289 // responses. Thus it may impact quality in some situation. "HIGH" stability
290 // will generate "final" responses more frequently.
291 //
292 Stability string `protobuf:"bytes,3,opt,name=stability,proto3" json:"stability,omitempty"`
293 // Optional. Translation mode, the value should be "text", "audio", "text_and_audio".
294 // Default empty string will be treated as "text".
295 // 1. "text": The response will be text translation. Text translation has a
296 // field "is_final". Detailed definition can be found in
297 // `TextTranslationResult`.
298 // 2. "audio": The response will be audio translation. Audio translation does
299 // not have "is_final" field, which means each audio translation response is
300 // stable and will not be changed by later response.
301 // Translation mode "audio" can only be used with "high" stability mode,
302 // 3. "text_and_audio": The response will have a text translation, when
303 // "is_final" is true, we will also output its corresponding audio
304 // translation. When "is_final" is false, audio_translation field will be
305 // empty.
306 TranslationMode string `protobuf:"bytes,4,opt,name=translation_mode,json=translationMode,proto3" json:"translation_mode,omitempty"`
307 // Optional. If disable_interim_results is true, we will only return "final" responses.
308 // Otherwise, we will return all the responses. Default value will be false.
309 // User can only set disable_interim_results to be true with "high" stability
310 // mode.
311 DisableInterimResults bool `protobuf:"varint,5,opt,name=disable_interim_results,json=disableInterimResults,proto3" json:"disable_interim_results,omitempty"`
312 }
313
314 func (x *StreamingTranslateSpeechConfig) Reset() {
315 *x = StreamingTranslateSpeechConfig{}
316 if protoimpl.UnsafeEnabled {
317 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[1]
318 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
319 ms.StoreMessageInfo(mi)
320 }
321 }
322
323 func (x *StreamingTranslateSpeechConfig) String() string {
324 return protoimpl.X.MessageStringOf(x)
325 }
326
327 func (*StreamingTranslateSpeechConfig) ProtoMessage() {}
328
329 func (x *StreamingTranslateSpeechConfig) ProtoReflect() protoreflect.Message {
330 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[1]
331 if protoimpl.UnsafeEnabled && x != nil {
332 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
333 if ms.LoadMessageInfo() == nil {
334 ms.StoreMessageInfo(mi)
335 }
336 return ms
337 }
338 return mi.MessageOf(x)
339 }
340
341 // Deprecated: Use StreamingTranslateSpeechConfig.ProtoReflect.Descriptor instead.
342 func (*StreamingTranslateSpeechConfig) Descriptor() ([]byte, []int) {
343 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{1}
344 }
345
346 func (x *StreamingTranslateSpeechConfig) GetAudioConfig() *TranslateSpeechConfig {
347 if x != nil {
348 return x.AudioConfig
349 }
350 return nil
351 }
352
353 func (x *StreamingTranslateSpeechConfig) GetSingleUtterance() bool {
354 if x != nil {
355 return x.SingleUtterance
356 }
357 return false
358 }
359
360 func (x *StreamingTranslateSpeechConfig) GetStability() string {
361 if x != nil {
362 return x.Stability
363 }
364 return ""
365 }
366
367 func (x *StreamingTranslateSpeechConfig) GetTranslationMode() string {
368 if x != nil {
369 return x.TranslationMode
370 }
371 return ""
372 }
373
374 func (x *StreamingTranslateSpeechConfig) GetDisableInterimResults() bool {
375 if x != nil {
376 return x.DisableInterimResults
377 }
378 return false
379 }
380
381 // The top-level message sent by the client for the `StreamingTranslateSpeech`
382 // method. Multiple `StreamingTranslateSpeechRequest` messages are sent. The
383 // first message must contain a `streaming_config` message and must not contain
384 // `audio_content` data. All subsequent messages must contain `audio_content`
385 // data and must not contain a `streaming_config` message.
386 type StreamingTranslateSpeechRequest struct {
387 state protoimpl.MessageState
388 sizeCache protoimpl.SizeCache
389 unknownFields protoimpl.UnknownFields
390
391 // The streaming request, which is either a streaming config or content.
392 //
393 // Types that are assignable to StreamingRequest:
394 // *StreamingTranslateSpeechRequest_StreamingConfig
395 // *StreamingTranslateSpeechRequest_AudioContent
396 StreamingRequest isStreamingTranslateSpeechRequest_StreamingRequest `protobuf_oneof:"streaming_request"`
397 }
398
399 func (x *StreamingTranslateSpeechRequest) Reset() {
400 *x = StreamingTranslateSpeechRequest{}
401 if protoimpl.UnsafeEnabled {
402 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[2]
403 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
404 ms.StoreMessageInfo(mi)
405 }
406 }
407
408 func (x *StreamingTranslateSpeechRequest) String() string {
409 return protoimpl.X.MessageStringOf(x)
410 }
411
412 func (*StreamingTranslateSpeechRequest) ProtoMessage() {}
413
414 func (x *StreamingTranslateSpeechRequest) ProtoReflect() protoreflect.Message {
415 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[2]
416 if protoimpl.UnsafeEnabled && x != nil {
417 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
418 if ms.LoadMessageInfo() == nil {
419 ms.StoreMessageInfo(mi)
420 }
421 return ms
422 }
423 return mi.MessageOf(x)
424 }
425
426 // Deprecated: Use StreamingTranslateSpeechRequest.ProtoReflect.Descriptor instead.
427 func (*StreamingTranslateSpeechRequest) Descriptor() ([]byte, []int) {
428 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{2}
429 }
430
431 func (m *StreamingTranslateSpeechRequest) GetStreamingRequest() isStreamingTranslateSpeechRequest_StreamingRequest {
432 if m != nil {
433 return m.StreamingRequest
434 }
435 return nil
436 }
437
438 func (x *StreamingTranslateSpeechRequest) GetStreamingConfig() *StreamingTranslateSpeechConfig {
439 if x, ok := x.GetStreamingRequest().(*StreamingTranslateSpeechRequest_StreamingConfig); ok {
440 return x.StreamingConfig
441 }
442 return nil
443 }
444
445 func (x *StreamingTranslateSpeechRequest) GetAudioContent() []byte {
446 if x, ok := x.GetStreamingRequest().(*StreamingTranslateSpeechRequest_AudioContent); ok {
447 return x.AudioContent
448 }
449 return nil
450 }
451
452 type isStreamingTranslateSpeechRequest_StreamingRequest interface {
453 isStreamingTranslateSpeechRequest_StreamingRequest()
454 }
455
456 type StreamingTranslateSpeechRequest_StreamingConfig struct {
457 // Provides information to the recognizer that specifies how to process the
458 // request. The first `StreamingTranslateSpeechRequest` message must contain
459 // a `streaming_config` message.
460 StreamingConfig *StreamingTranslateSpeechConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"`
461 }
462
463 type StreamingTranslateSpeechRequest_AudioContent struct {
464 // The audio data to be translated. Sequential chunks of audio data are sent
465 // in sequential `StreamingTranslateSpeechRequest` messages. The first
466 // `StreamingTranslateSpeechRequest` message must not contain
467 // `audio_content` data and all subsequent `StreamingTranslateSpeechRequest`
468 // messages must contain `audio_content` data. The audio bytes must be
469 // encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with
470 // all bytes fields, protobuffers use a pure binary representation (not
471 // base64).
472 AudioContent []byte `protobuf:"bytes,2,opt,name=audio_content,json=audioContent,proto3,oneof"`
473 }
474
475 func (*StreamingTranslateSpeechRequest_StreamingConfig) isStreamingTranslateSpeechRequest_StreamingRequest() {
476 }
477
478 func (*StreamingTranslateSpeechRequest_AudioContent) isStreamingTranslateSpeechRequest_StreamingRequest() {
479 }
480
481 // A streaming speech translation result corresponding to a portion of the audio
482 // that is currently being processed.
483 type StreamingTranslateSpeechResult struct {
484 state protoimpl.MessageState
485 sizeCache protoimpl.SizeCache
486 unknownFields protoimpl.UnknownFields
487
488 // Text translation result.
489 TextTranslationResult *StreamingTranslateSpeechResult_TextTranslationResult `protobuf:"bytes,1,opt,name=text_translation_result,json=textTranslationResult,proto3" json:"text_translation_result,omitempty"`
490 // Audio translation result.
491 AudioTranslationResult *StreamingTranslateSpeechResult_AudioTranslationResult `protobuf:"bytes,2,opt,name=audio_translation_result,json=audioTranslationResult,proto3" json:"audio_translation_result,omitempty"`
492 // Output only. The debug only recognition result in original language. This field is debug
493 // only and will be set to empty string if not available.
494 // This is implementation detail and will not be backward compatible.
495 RecognitionResult string `protobuf:"bytes,3,opt,name=recognition_result,json=recognitionResult,proto3" json:"recognition_result,omitempty"`
496 // Output only.
497 DetectedSourceLanguageCode string `protobuf:"bytes,4,opt,name=detected_source_language_code,json=detectedSourceLanguageCode,proto3" json:"detected_source_language_code,omitempty"`
498 }
499
500 func (x *StreamingTranslateSpeechResult) Reset() {
501 *x = StreamingTranslateSpeechResult{}
502 if protoimpl.UnsafeEnabled {
503 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[3]
504 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
505 ms.StoreMessageInfo(mi)
506 }
507 }
508
509 func (x *StreamingTranslateSpeechResult) String() string {
510 return protoimpl.X.MessageStringOf(x)
511 }
512
513 func (*StreamingTranslateSpeechResult) ProtoMessage() {}
514
515 func (x *StreamingTranslateSpeechResult) ProtoReflect() protoreflect.Message {
516 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[3]
517 if protoimpl.UnsafeEnabled && x != nil {
518 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
519 if ms.LoadMessageInfo() == nil {
520 ms.StoreMessageInfo(mi)
521 }
522 return ms
523 }
524 return mi.MessageOf(x)
525 }
526
527 // Deprecated: Use StreamingTranslateSpeechResult.ProtoReflect.Descriptor instead.
528 func (*StreamingTranslateSpeechResult) Descriptor() ([]byte, []int) {
529 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{3}
530 }
531
532 func (x *StreamingTranslateSpeechResult) GetTextTranslationResult() *StreamingTranslateSpeechResult_TextTranslationResult {
533 if x != nil {
534 return x.TextTranslationResult
535 }
536 return nil
537 }
538
539 func (x *StreamingTranslateSpeechResult) GetAudioTranslationResult() *StreamingTranslateSpeechResult_AudioTranslationResult {
540 if x != nil {
541 return x.AudioTranslationResult
542 }
543 return nil
544 }
545
546 func (x *StreamingTranslateSpeechResult) GetRecognitionResult() string {
547 if x != nil {
548 return x.RecognitionResult
549 }
550 return ""
551 }
552
553 func (x *StreamingTranslateSpeechResult) GetDetectedSourceLanguageCode() string {
554 if x != nil {
555 return x.DetectedSourceLanguageCode
556 }
557 return ""
558 }
559
560 // A streaming speech translation response corresponding to a portion of
561 // the audio currently processed.
562 type StreamingTranslateSpeechResponse struct {
563 state protoimpl.MessageState
564 sizeCache protoimpl.SizeCache
565 unknownFields protoimpl.UnknownFields
566
567 // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that
568 // specifies the error for the operation.
569 Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
570 // Output only. The translation result that is currently being processed (For text
571 // translation, `is_final` could be `true` or `false`.
572 // For audio translation, we do not have is_final field, which means each
573 // audio response is stable and will not get changed later. For
574 // text_and_audio, we still have `is_final` field in text translation, but we
575 // only output corresponsding audio when `is_final` is true.).
576 Result *StreamingTranslateSpeechResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
577 // Output only. Indicates the type of speech event.
578 SpeechEventType StreamingTranslateSpeechResponse_SpeechEventType `protobuf:"varint,3,opt,name=speech_event_type,json=speechEventType,proto3,enum=google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse_SpeechEventType" json:"speech_event_type,omitempty"`
579 }
580
581 func (x *StreamingTranslateSpeechResponse) Reset() {
582 *x = StreamingTranslateSpeechResponse{}
583 if protoimpl.UnsafeEnabled {
584 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[4]
585 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
586 ms.StoreMessageInfo(mi)
587 }
588 }
589
590 func (x *StreamingTranslateSpeechResponse) String() string {
591 return protoimpl.X.MessageStringOf(x)
592 }
593
594 func (*StreamingTranslateSpeechResponse) ProtoMessage() {}
595
596 func (x *StreamingTranslateSpeechResponse) ProtoReflect() protoreflect.Message {
597 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[4]
598 if protoimpl.UnsafeEnabled && x != nil {
599 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
600 if ms.LoadMessageInfo() == nil {
601 ms.StoreMessageInfo(mi)
602 }
603 return ms
604 }
605 return mi.MessageOf(x)
606 }
607
608 // Deprecated: Use StreamingTranslateSpeechResponse.ProtoReflect.Descriptor instead.
609 func (*StreamingTranslateSpeechResponse) Descriptor() ([]byte, []int) {
610 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{4}
611 }
612
613 func (x *StreamingTranslateSpeechResponse) GetError() *status.Status {
614 if x != nil {
615 return x.Error
616 }
617 return nil
618 }
619
620 func (x *StreamingTranslateSpeechResponse) GetResult() *StreamingTranslateSpeechResult {
621 if x != nil {
622 return x.Result
623 }
624 return nil
625 }
626
627 func (x *StreamingTranslateSpeechResponse) GetSpeechEventType() StreamingTranslateSpeechResponse_SpeechEventType {
628 if x != nil {
629 return x.SpeechEventType
630 }
631 return StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED
632 }
633
634 // Text translation result.
635 type StreamingTranslateSpeechResult_TextTranslationResult struct {
636 state protoimpl.MessageState
637 sizeCache protoimpl.SizeCache
638 unknownFields protoimpl.UnknownFields
639
640 // Output only. The translated sentence.
641 Translation string `protobuf:"bytes,1,opt,name=translation,proto3" json:"translation,omitempty"`
642 // Output only. If `false`, this `StreamingTranslateSpeechResult` represents
643 // an interim result that may change. If `true`, this is the final time the
644 // translation service will return this particular
645 // `StreamingTranslateSpeechResult`, the streaming translator will not
646 // return any further hypotheses for this portion of the transcript and
647 // corresponding audio.
648 IsFinal bool `protobuf:"varint,2,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"`
649 }
650
651 func (x *StreamingTranslateSpeechResult_TextTranslationResult) Reset() {
652 *x = StreamingTranslateSpeechResult_TextTranslationResult{}
653 if protoimpl.UnsafeEnabled {
654 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[5]
655 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
656 ms.StoreMessageInfo(mi)
657 }
658 }
659
660 func (x *StreamingTranslateSpeechResult_TextTranslationResult) String() string {
661 return protoimpl.X.MessageStringOf(x)
662 }
663
664 func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage() {}
665
666 func (x *StreamingTranslateSpeechResult_TextTranslationResult) ProtoReflect() protoreflect.Message {
667 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[5]
668 if protoimpl.UnsafeEnabled && x != nil {
669 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
670 if ms.LoadMessageInfo() == nil {
671 ms.StoreMessageInfo(mi)
672 }
673 return ms
674 }
675 return mi.MessageOf(x)
676 }
677
678 // Deprecated: Use StreamingTranslateSpeechResult_TextTranslationResult.ProtoReflect.Descriptor instead.
679 func (*StreamingTranslateSpeechResult_TextTranslationResult) Descriptor() ([]byte, []int) {
680 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{3, 0}
681 }
682
683 func (x *StreamingTranslateSpeechResult_TextTranslationResult) GetTranslation() string {
684 if x != nil {
685 return x.Translation
686 }
687 return ""
688 }
689
690 func (x *StreamingTranslateSpeechResult_TextTranslationResult) GetIsFinal() bool {
691 if x != nil {
692 return x.IsFinal
693 }
694 return false
695 }
696
697 // Audio translation result.
698 type StreamingTranslateSpeechResult_AudioTranslationResult struct {
699 state protoimpl.MessageState
700 sizeCache protoimpl.SizeCache
701 unknownFields protoimpl.UnknownFields
702
703 // Output only. The translated audio.
704 AudioTranslation []byte `protobuf:"bytes,1,opt,name=audio_translation,json=audioTranslation,proto3" json:"audio_translation,omitempty"`
705 }
706
707 func (x *StreamingTranslateSpeechResult_AudioTranslationResult) Reset() {
708 *x = StreamingTranslateSpeechResult_AudioTranslationResult{}
709 if protoimpl.UnsafeEnabled {
710 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[6]
711 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
712 ms.StoreMessageInfo(mi)
713 }
714 }
715
716 func (x *StreamingTranslateSpeechResult_AudioTranslationResult) String() string {
717 return protoimpl.X.MessageStringOf(x)
718 }
719
720 func (*StreamingTranslateSpeechResult_AudioTranslationResult) ProtoMessage() {}
721
722 func (x *StreamingTranslateSpeechResult_AudioTranslationResult) ProtoReflect() protoreflect.Message {
723 mi := &file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[6]
724 if protoimpl.UnsafeEnabled && x != nil {
725 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
726 if ms.LoadMessageInfo() == nil {
727 ms.StoreMessageInfo(mi)
728 }
729 return ms
730 }
731 return mi.MessageOf(x)
732 }
733
734 // Deprecated: Use StreamingTranslateSpeechResult_AudioTranslationResult.ProtoReflect.Descriptor instead.
735 func (*StreamingTranslateSpeechResult_AudioTranslationResult) Descriptor() ([]byte, []int) {
736 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP(), []int{3, 1}
737 }
738
739 func (x *StreamingTranslateSpeechResult_AudioTranslationResult) GetAudioTranslation() []byte {
740 if x != nil {
741 return x.AudioTranslation
742 }
743 return nil
744 }
745
746 var File_google_cloud_mediatranslation_v1alpha1_media_translation_proto protoreflect.FileDescriptor
747
748 var file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDesc = []byte{
749 0x0a, 0x3e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6d,
750 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
751 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74,
752 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
753 0x12, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d,
754 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
755 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
756 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,
757 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
758 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
759 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63,
760 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x02, 0x0a, 0x15,
761 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43,
762 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x65,
763 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
764 0x41, 0x02, 0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e,
765 0x67, 0x12, 0x35, 0x0a, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x6e, 0x67,
766 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
767 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x6e, 0x67,
768 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x14, 0x74, 0x61, 0x72, 0x67,
769 0x65, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65,
770 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x74, 0x61, 0x72,
771 0x67, 0x65, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12,
772 0x4e, 0x0a, 0x21, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73,
773 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63,
774 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
775 0x1e, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x53, 0x6f, 0x75, 0x72,
776 0x63, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12,
777 0x2f, 0x0a, 0x11, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68,
778 0x65, 0x72, 0x74, 0x7a, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
779 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x48, 0x65, 0x72, 0x74, 0x7a,
780 0x12, 0x19, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42,
781 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xc7, 0x02, 0x0a, 0x1e,
782 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
783 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65,
784 0x0a, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01,
785 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c,
786 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
787 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72,
788 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e,
789 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43,
790 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f,
791 0x75, 0x74, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42,
792 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x55, 0x74, 0x74, 0x65,
793 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69,
794 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x73,
795 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e,
796 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01,
797 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
798 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x17, 0x64, 0x69, 0x73, 0x61,
799 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x69, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x75,
800 0x6c, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15,
801 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x69, 0x6d, 0x52, 0x65,
802 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x1f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
803 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65,
804 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x73, 0x0a, 0x10, 0x73, 0x74, 0x72,
805 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20,
806 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f,
807 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
808 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72,
809 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53,
810 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0f, 0x73,
811 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25,
812 0x0a, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
813 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x6f,
814 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69,
815 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf9, 0x04, 0x0a, 0x1e, 0x53,
816 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
817 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x94, 0x01,
818 0x0a, 0x17, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69,
819 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
820 0x5c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d,
821 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
822 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69,
823 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63,
824 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x54, 0x72, 0x61, 0x6e,
825 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x15, 0x74,
826 0x65, 0x78, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
827 0x73, 0x75, 0x6c, 0x74, 0x12, 0x97, 0x01, 0x0a, 0x18, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x74,
828 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c,
829 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
830 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e,
831 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
832 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c,
833 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e,
834 0x41, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
835 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x16, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61,
836 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x32,
837 0x0a, 0x12, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65,
838 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
839 0x11, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75,
840 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x1d, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73,
841 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63,
842 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1a,
843 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61,
844 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x5e, 0x0a, 0x15, 0x54, 0x65,
845 0x78, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
846 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69,
847 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x74,
848 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x73,
849 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41,
850 0x03, 0x52, 0x07, 0x69, 0x73, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x1a, 0x4a, 0x0a, 0x16, 0x41, 0x75,
851 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
852 0x73, 0x75, 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x74, 0x72,
853 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42,
854 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73,
855 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x95, 0x03, 0x0a, 0x20, 0x53, 0x74, 0x72, 0x65, 0x61,
856 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65,
857 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65,
858 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f,
859 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x03,
860 0xe0, 0x41, 0x03, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x06, 0x72, 0x65,
861 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f,
862 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74,
863 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
864 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61,
865 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75,
866 0x6c, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
867 0x89, 0x01, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74,
868 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x58, 0x2e, 0x67, 0x6f,
869 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61,
870 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c,
871 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72,
872 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x73,
873 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e,
874 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x73, 0x70, 0x65, 0x65,
875 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x0f, 0x53,
876 0x70, 0x65, 0x65, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21,
877 0x0a, 0x1d, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54,
878 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
879 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x4e, 0x44, 0x5f, 0x4f, 0x46, 0x5f, 0x53, 0x49, 0x4e, 0x47,
880 0x4c, 0x45, 0x5f, 0x55, 0x54, 0x54, 0x45, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x32, 0xa5,
881 0x02, 0x0a, 0x18, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
882 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb3, 0x01, 0x0a, 0x18,
883 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
884 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x12, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
885 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61,
886 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
887 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73,
888 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
889 0x74, 0x1a, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
890 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f,
891 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
892 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65,
893 0x65, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30,
894 0x01, 0x1a, 0x53, 0xca, 0x41, 0x1f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73,
895 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
896 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f,
897 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,
898 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c,
899 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x87, 0x01, 0x0a, 0x2a, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
900 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x65, 0x64, 0x69,
901 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61,
902 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5a, 0x56, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f,
903 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74,
904 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f,
905 0x75, 0x64, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
906 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x64,
907 0x69, 0x61, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xf8, 0x01, 0x01,
908 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
909 }
910
911 var (
912 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescOnce sync.Once
913 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescData = file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDesc
914 )
915
916 func file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescGZIP() []byte {
917 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescOnce.Do(func() {
918 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescData)
919 })
920 return file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDescData
921 }
922
923 var file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
924 var file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
925 var file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_goTypes = []interface{}{
926 (StreamingTranslateSpeechResponse_SpeechEventType)(0), // 0: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse.SpeechEventType
927 (*TranslateSpeechConfig)(nil), // 1: google.cloud.mediatranslation.v1alpha1.TranslateSpeechConfig
928 (*StreamingTranslateSpeechConfig)(nil), // 2: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechConfig
929 (*StreamingTranslateSpeechRequest)(nil), // 3: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechRequest
930 (*StreamingTranslateSpeechResult)(nil), // 4: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult
931 (*StreamingTranslateSpeechResponse)(nil), // 5: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse
932 (*StreamingTranslateSpeechResult_TextTranslationResult)(nil), // 6: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult.TextTranslationResult
933 (*StreamingTranslateSpeechResult_AudioTranslationResult)(nil), // 7: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult.AudioTranslationResult
934 (*status.Status)(nil), // 8: google.rpc.Status
935 }
936 var file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_depIdxs = []int32{
937 1, // 0: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechConfig.audio_config:type_name -> google.cloud.mediatranslation.v1alpha1.TranslateSpeechConfig
938 2, // 1: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechRequest.streaming_config:type_name -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechConfig
939 6, // 2: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult.text_translation_result:type_name -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult.TextTranslationResult
940 7, // 3: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult.audio_translation_result:type_name -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult.AudioTranslationResult
941 8, // 4: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse.error:type_name -> google.rpc.Status
942 4, // 5: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse.result:type_name -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResult
943 0, // 6: google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse.speech_event_type:type_name -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse.SpeechEventType
944 3, // 7: google.cloud.mediatranslation.v1alpha1.SpeechTranslationService.StreamingTranslateSpeech:input_type -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechRequest
945 5, // 8: google.cloud.mediatranslation.v1alpha1.SpeechTranslationService.StreamingTranslateSpeech:output_type -> google.cloud.mediatranslation.v1alpha1.StreamingTranslateSpeechResponse
946 8, // [8:9] is the sub-list for method output_type
947 7, // [7:8] is the sub-list for method input_type
948 7, // [7:7] is the sub-list for extension type_name
949 7, // [7:7] is the sub-list for extension extendee
950 0, // [0:7] is the sub-list for field type_name
951 }
952
953 func init() { file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_init() }
954 func file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_init() {
955 if File_google_cloud_mediatranslation_v1alpha1_media_translation_proto != nil {
956 return
957 }
958 if !protoimpl.UnsafeEnabled {
959 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
960 switch v := v.(*TranslateSpeechConfig); i {
961 case 0:
962 return &v.state
963 case 1:
964 return &v.sizeCache
965 case 2:
966 return &v.unknownFields
967 default:
968 return nil
969 }
970 }
971 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
972 switch v := v.(*StreamingTranslateSpeechConfig); i {
973 case 0:
974 return &v.state
975 case 1:
976 return &v.sizeCache
977 case 2:
978 return &v.unknownFields
979 default:
980 return nil
981 }
982 }
983 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
984 switch v := v.(*StreamingTranslateSpeechRequest); i {
985 case 0:
986 return &v.state
987 case 1:
988 return &v.sizeCache
989 case 2:
990 return &v.unknownFields
991 default:
992 return nil
993 }
994 }
995 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
996 switch v := v.(*StreamingTranslateSpeechResult); i {
997 case 0:
998 return &v.state
999 case 1:
1000 return &v.sizeCache
1001 case 2:
1002 return &v.unknownFields
1003 default:
1004 return nil
1005 }
1006 }
1007 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
1008 switch v := v.(*StreamingTranslateSpeechResponse); i {
1009 case 0:
1010 return &v.state
1011 case 1:
1012 return &v.sizeCache
1013 case 2:
1014 return &v.unknownFields
1015 default:
1016 return nil
1017 }
1018 }
1019 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
1020 switch v := v.(*StreamingTranslateSpeechResult_TextTranslationResult); i {
1021 case 0:
1022 return &v.state
1023 case 1:
1024 return &v.sizeCache
1025 case 2:
1026 return &v.unknownFields
1027 default:
1028 return nil
1029 }
1030 }
1031 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
1032 switch v := v.(*StreamingTranslateSpeechResult_AudioTranslationResult); i {
1033 case 0:
1034 return &v.state
1035 case 1:
1036 return &v.sizeCache
1037 case 2:
1038 return &v.unknownFields
1039 default:
1040 return nil
1041 }
1042 }
1043 }
1044 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes[2].OneofWrappers = []interface{}{
1045 (*StreamingTranslateSpeechRequest_StreamingConfig)(nil),
1046 (*StreamingTranslateSpeechRequest_AudioContent)(nil),
1047 }
1048 type x struct{}
1049 out := protoimpl.TypeBuilder{
1050 File: protoimpl.DescBuilder{
1051 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
1052 RawDescriptor: file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDesc,
1053 NumEnums: 1,
1054 NumMessages: 7,
1055 NumExtensions: 0,
1056 NumServices: 1,
1057 },
1058 GoTypes: file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_goTypes,
1059 DependencyIndexes: file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_depIdxs,
1060 EnumInfos: file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_enumTypes,
1061 MessageInfos: file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_msgTypes,
1062 }.Build()
1063 File_google_cloud_mediatranslation_v1alpha1_media_translation_proto = out.File
1064 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_rawDesc = nil
1065 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_goTypes = nil
1066 file_google_cloud_mediatranslation_v1alpha1_media_translation_proto_depIdxs = nil
1067 }
1068
1069 // Reference imports to suppress errors if they are not otherwise used.
1070 var _ context.Context
1071 var _ grpc.ClientConnInterface
1072
1073 // This is a compile-time assertion to ensure that this generated file
1074 // is compatible with the grpc package it is being compiled against.
1075 const _ = grpc.SupportPackageIsVersion6
1076
1077 // SpeechTranslationServiceClient is the client API for SpeechTranslationService service.
1078 //
1079 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
1080 type SpeechTranslationServiceClient interface {
1081 // Performs bidirectional streaming speech translation: receive results while
1082 // sending audio. This method is only available via the gRPC API (not REST).
1083 StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error)
1084 }
1085
1086 type speechTranslationServiceClient struct {
1087 cc grpc.ClientConnInterface
1088 }
1089
1090 func NewSpeechTranslationServiceClient(cc grpc.ClientConnInterface) SpeechTranslationServiceClient {
1091 return &speechTranslationServiceClient{cc}
1092 }
1093
1094 func (c *speechTranslationServiceClient) StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error) {
1095 stream, err := c.cc.NewStream(ctx, &_SpeechTranslationService_serviceDesc.Streams[0], "/google.cloud.mediatranslation.v1alpha1.SpeechTranslationService/StreamingTranslateSpeech", opts...)
1096 if err != nil {
1097 return nil, err
1098 }
1099 x := &speechTranslationServiceStreamingTranslateSpeechClient{stream}
1100 return x, nil
1101 }
1102
1103 type SpeechTranslationService_StreamingTranslateSpeechClient interface {
1104 Send(*StreamingTranslateSpeechRequest) error
1105 Recv() (*StreamingTranslateSpeechResponse, error)
1106 grpc.ClientStream
1107 }
1108
1109 type speechTranslationServiceStreamingTranslateSpeechClient struct {
1110 grpc.ClientStream
1111 }
1112
1113 func (x *speechTranslationServiceStreamingTranslateSpeechClient) Send(m *StreamingTranslateSpeechRequest) error {
1114 return x.ClientStream.SendMsg(m)
1115 }
1116
1117 func (x *speechTranslationServiceStreamingTranslateSpeechClient) Recv() (*StreamingTranslateSpeechResponse, error) {
1118 m := new(StreamingTranslateSpeechResponse)
1119 if err := x.ClientStream.RecvMsg(m); err != nil {
1120 return nil, err
1121 }
1122 return m, nil
1123 }
1124
1125 // SpeechTranslationServiceServer is the server API for SpeechTranslationService service.
1126 type SpeechTranslationServiceServer interface {
1127 // Performs bidirectional streaming speech translation: receive results while
1128 // sending audio. This method is only available via the gRPC API (not REST).
1129 StreamingTranslateSpeech(SpeechTranslationService_StreamingTranslateSpeechServer) error
1130 }
1131
1132 // UnimplementedSpeechTranslationServiceServer can be embedded to have forward compatible implementations.
1133 type UnimplementedSpeechTranslationServiceServer struct {
1134 }
1135
1136 func (*UnimplementedSpeechTranslationServiceServer) StreamingTranslateSpeech(SpeechTranslationService_StreamingTranslateSpeechServer) error {
1137 return status1.Errorf(codes.Unimplemented, "method StreamingTranslateSpeech not implemented")
1138 }
1139
1140 func RegisterSpeechTranslationServiceServer(s *grpc.Server, srv SpeechTranslationServiceServer) {
1141 s.RegisterService(&_SpeechTranslationService_serviceDesc, srv)
1142 }
1143
1144 func _SpeechTranslationService_StreamingTranslateSpeech_Handler(srv interface{}, stream grpc.ServerStream) error {
1145 return srv.(SpeechTranslationServiceServer).StreamingTranslateSpeech(&speechTranslationServiceStreamingTranslateSpeechServer{stream})
1146 }
1147
1148 type SpeechTranslationService_StreamingTranslateSpeechServer interface {
1149 Send(*StreamingTranslateSpeechResponse) error
1150 Recv() (*StreamingTranslateSpeechRequest, error)
1151 grpc.ServerStream
1152 }
1153
1154 type speechTranslationServiceStreamingTranslateSpeechServer struct {
1155 grpc.ServerStream
1156 }
1157
1158 func (x *speechTranslationServiceStreamingTranslateSpeechServer) Send(m *StreamingTranslateSpeechResponse) error {
1159 return x.ServerStream.SendMsg(m)
1160 }
1161
1162 func (x *speechTranslationServiceStreamingTranslateSpeechServer) Recv() (*StreamingTranslateSpeechRequest, error) {
1163 m := new(StreamingTranslateSpeechRequest)
1164 if err := x.ServerStream.RecvMsg(m); err != nil {
1165 return nil, err
1166 }
1167 return m, nil
1168 }
1169
1170 var _SpeechTranslationService_serviceDesc = grpc.ServiceDesc{
1171 ServiceName: "google.cloud.mediatranslation.v1alpha1.SpeechTranslationService",
1172 HandlerType: (*SpeechTranslationServiceServer)(nil),
1173 Methods: []grpc.MethodDesc{},
1174 Streams: []grpc.StreamDesc{
1175 {
1176 StreamName: "StreamingTranslateSpeech",
1177 Handler: _SpeechTranslationService_StreamingTranslateSpeech_Handler,
1178 ServerStreams: true,
1179 ClientStreams: true,
1180 },
1181 },
1182 Metadata: "google/cloud/mediatranslation/v1alpha1/media_translation.proto",
1183 }