File: cloud_speech.pb.go

package info (click to toggle)
golang-google-genproto 0.0~git20161115.08f135d-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 9,452 kB
  • sloc: sh: 85; makefile: 3
file content (765 lines) | stat: -rw-r--r-- 34,721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/cloud/speech/v1/cloud_speech.proto
// DO NOT EDIT!

/*
Package google_cloud_speech_v1 is a generated protocol buffer package.

It is generated from these files:
	google.golang.org/genproto/googleapis/cloud/speech/v1/cloud_speech.proto

It has these top-level messages:
	RecognizeRequest
	InitialRecognizeRequest
	SpeechContext
	AudioRequest
	NonStreamingRecognizeResponse
	RecognizeResponse
	SpeechRecognitionResult
	SpeechRecognitionAlternative
*/
package google_cloud_speech_v1

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/serviceconfig"
import google_rpc "google.golang.org/genproto/googleapis/rpc/status"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// Audio encoding of the data sent in the audio message. All encodings support
// only 1 channel (mono) audio. Only `FLAC` includes a header that describes
// the bytes of audio that follow the header. The other encodings are raw
// audio bytes with no header.
//
// For best results, the audio source should be captured and transmitted using
// a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be
// reduced if lossy codecs (such as AMR, AMR_WB and MULAW) are used to capture
// or transmit the audio, particularly if background noise is present.
type InitialRecognizeRequest_AudioEncoding int32

const (
	// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
	InitialRecognizeRequest_ENCODING_UNSPECIFIED InitialRecognizeRequest_AudioEncoding = 0
	// Uncompressed 16-bit signed little-endian samples.
	InitialRecognizeRequest_LINEAR16 InitialRecognizeRequest_AudioEncoding = 1
	// This is the recommended encoding because it uses lossless compression;
	// therefore recognition accuracy is not compromised by a lossy codec.
	//
	// The stream FLAC (Free Lossless Audio Codec) encoding is specified at:
	// http://flac.sourceforge.net/documentation.html.
	// Only 16-bit samples are supported.
	// Not all fields in STREAMINFO are supported.
	InitialRecognizeRequest_FLAC InitialRecognizeRequest_AudioEncoding = 2
	// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
	InitialRecognizeRequest_MULAW InitialRecognizeRequest_AudioEncoding = 3
	// Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz.
	InitialRecognizeRequest_AMR InitialRecognizeRequest_AudioEncoding = 4
	// Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz.
	InitialRecognizeRequest_AMR_WB InitialRecognizeRequest_AudioEncoding = 5
)

var InitialRecognizeRequest_AudioEncoding_name = map[int32]string{
	0: "ENCODING_UNSPECIFIED",
	1: "LINEAR16",
	2: "FLAC",
	3: "MULAW",
	4: "AMR",
	5: "AMR_WB",
}
var InitialRecognizeRequest_AudioEncoding_value = map[string]int32{
	"ENCODING_UNSPECIFIED": 0,
	"LINEAR16":             1,
	"FLAC":                 2,
	"MULAW":                3,
	"AMR":                  4,
	"AMR_WB":               5,
}

func (x InitialRecognizeRequest_AudioEncoding) String() string {
	return proto.EnumName(InitialRecognizeRequest_AudioEncoding_name, int32(x))
}
func (InitialRecognizeRequest_AudioEncoding) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor0, []int{1, 0}
}

// Indicates the type of endpointer event.
type RecognizeResponse_EndpointerEvent int32

const (
	// No endpointer event specified.
	RecognizeResponse_ENDPOINTER_EVENT_UNSPECIFIED RecognizeResponse_EndpointerEvent = 0
	// Speech has been detected in the audio stream.
	RecognizeResponse_START_OF_SPEECH RecognizeResponse_EndpointerEvent = 1
	// Speech has ceased to be detected in the audio stream.
	RecognizeResponse_END_OF_SPEECH RecognizeResponse_EndpointerEvent = 2
	// The end of the audio stream has been reached. and it is being processed.
	RecognizeResponse_END_OF_AUDIO RecognizeResponse_EndpointerEvent = 3
	// This event is only sent when continuous is `false`. It indicates that the
	// server has detected the end of the user's speech utterance and expects no
	// additional speech. Therefore, the server will not process additional
	// audio. The client should stop sending additional audio data.
	RecognizeResponse_END_OF_UTTERANCE RecognizeResponse_EndpointerEvent = 4
)

var RecognizeResponse_EndpointerEvent_name = map[int32]string{
	0: "ENDPOINTER_EVENT_UNSPECIFIED",
	1: "START_OF_SPEECH",
	2: "END_OF_SPEECH",
	3: "END_OF_AUDIO",
	4: "END_OF_UTTERANCE",
}
var RecognizeResponse_EndpointerEvent_value = map[string]int32{
	"ENDPOINTER_EVENT_UNSPECIFIED": 0,
	"START_OF_SPEECH":              1,
	"END_OF_SPEECH":                2,
	"END_OF_AUDIO":                 3,
	"END_OF_UTTERANCE":             4,
}

func (x RecognizeResponse_EndpointerEvent) String() string {
	return proto.EnumName(RecognizeResponse_EndpointerEvent_name, int32(x))
}
func (RecognizeResponse_EndpointerEvent) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor0, []int{5, 0}
}

// `RecognizeRequest` is the only message type sent by the client.
//
// When using the REST API or the gRPC `NonStreamingRecognize` API, only one
// `RecognizeRequest` message is sent, and it must contain both an
// `initial_request` and an 'audio_request`.
//
// When using the gRPC Streaming `Recognize` API, one or more `RecognizeRequest`
// messages are sent. The first message must contain an `initial_request` and
// may contain an 'audio_request`. Any subsequent messages must not contain an
// `initial_request` and must contain an 'audio_request`.
type RecognizeRequest struct {
	// The `initial_request` message provides information to the recognizer
	// that specifies how to process the request.
	//
	// The first `RecognizeRequest` message must contain an `initial_request`.
	// Any subsequent `RecognizeRequest` messages must not contain an
	// `initial_request`.
	InitialRequest *InitialRecognizeRequest `protobuf:"bytes,1,opt,name=initial_request,json=initialRequest" json:"initial_request,omitempty"`
	// The audio data to be recognized. For REST or `NonStreamingRecognize`, all
	// audio data must be contained in the first (and only) `RecognizeRequest`
	// message. For gRPC streaming `Recognize`, sequential chunks of audio data
	// are sent in sequential `RecognizeRequest` messages.
	AudioRequest *AudioRequest `protobuf:"bytes,2,opt,name=audio_request,json=audioRequest" json:"audio_request,omitempty"`
}

func (m *RecognizeRequest) Reset()                    { *m = RecognizeRequest{} }
func (m *RecognizeRequest) String() string            { return proto.CompactTextString(m) }
func (*RecognizeRequest) ProtoMessage()               {}
func (*RecognizeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *RecognizeRequest) GetInitialRequest() *InitialRecognizeRequest {
	if m != nil {
		return m.InitialRequest
	}
	return nil
}

func (m *RecognizeRequest) GetAudioRequest() *AudioRequest {
	if m != nil {
		return m.AudioRequest
	}
	return nil
}

// The `InitialRecognizeRequest` message provides information to the recognizer
// that specifies how to process the request.
type InitialRecognizeRequest struct {
	// [Required] Encoding of audio data sent in all `AudioRequest` messages.
	Encoding InitialRecognizeRequest_AudioEncoding `protobuf:"varint,1,opt,name=encoding,enum=google.cloud.speech.v1.InitialRecognizeRequest_AudioEncoding" json:"encoding,omitempty"`
	// [Required] Sample rate in Hertz of the audio data sent in all
	// AudioRequest messages. Valid values are: 8000-48000.
	// 16000 is optimal. For best results, set the sampling rate of the audio
	// source to 16000 Hz. If that's not possible, use the native sample rate of
	// the audio source (instead of re-sampling).
	SampleRate int32 `protobuf:"varint,2,opt,name=sample_rate,json=sampleRate" json:"sample_rate,omitempty"`
	// [Optional] The language of the supplied audio as a BCP-47 language tag.
	// Example: "en-GB"  https://www.rfc-editor.org/rfc/bcp/bcp47.txt
	// If omitted, defaults to "en-US". See
	// [Language Support](/speech/docs/best-practices#language_support) for
	// a list of the currently supported language codes.
	LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode" json:"language_code,omitempty"`
	// [Optional] Maximum number of recognition hypotheses to be returned.
	// Specifically, the maximum number of `SpeechRecognitionAlternative` messages
	// within each `SpeechRecognitionResult`.
	// The server may return fewer than `max_alternatives`.
	// Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
	// `1`. If omitted, defaults to `1`.
	MaxAlternatives int32 `protobuf:"varint,4,opt,name=max_alternatives,json=maxAlternatives" json:"max_alternatives,omitempty"`
	// [Optional] If set to `true`, the server will attempt to filter out
	// profanities, replacing all but the initial character in each filtered word
	// with asterisks, e.g. "f***". If set to `false` or omitted, profanities
	// won't be filtered out.
	ProfanityFilter bool `protobuf:"varint,5,opt,name=profanity_filter,json=profanityFilter" json:"profanity_filter,omitempty"`
	// [Optional] If `false` or omitted, the recognizer will detect a single
	// spoken utterance, and it will cease recognition when the user stops
	// speaking. If `enable_endpointer_events` is `true`, it will return
	// `END_OF_UTTERANCE` when it detects that the user has stopped speaking.
	// In all cases, it will return no more than one `SpeechRecognitionResult`,
	// and set the `is_final` flag to `true`.
	//
	// If `true`, the recognizer will continue recognition (even if the user
	// pauses speaking) until the client closes the output stream (gRPC API) or
	// completes the POST data (REST API) or when the maximum time limit has been
	// reached. Multiple `SpeechRecognitionResult`s with the `is_final` flag set
	// to `true` may be returned to indicate that the recognizer will not return
	// any further hypotheses for that portion of the transcript.
	Continuous bool `protobuf:"varint,6,opt,name=continuous" json:"continuous,omitempty"`
	// [Optional] If this parameter is `true`, interim results may be returned as
	// they become available.
	// If `false` or omitted, only `is_final=true` result(s) are returned.
	InterimResults bool `protobuf:"varint,7,opt,name=interim_results,json=interimResults" json:"interim_results,omitempty"`
	// [Optional] If this parameter is `true`, `EndpointerEvents` may be returned
	// as they become available.
	// If `false` or omitted, no `EndpointerEvents` are returned.
	EnableEndpointerEvents bool `protobuf:"varint,8,opt,name=enable_endpointer_events,json=enableEndpointerEvents" json:"enable_endpointer_events,omitempty"`
	// [Optional] URI that points to a file where the recognition result should
	// be stored in JSON format. If omitted or empty string, the recognition
	// result is returned in the response. Should be specified only for
	// `NonStreamingRecognize`. If specified in a `Recognize` request,
	// `Recognize` returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
	// If specified in a `NonStreamingRecognize` request,
	// `NonStreamingRecognize` returns immediately, and the output file
	// is created asynchronously once the audio processing completes.
	// Currently, only Google Cloud Storage URIs are supported, which must be
	// specified in the following format: `gs://bucket_name/object_name`
	// (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
	// more information, see [Request URIs](/storage/docs/reference-uris).
	OutputUri string `protobuf:"bytes,9,opt,name=output_uri,json=outputUri" json:"output_uri,omitempty"`
	// [Optional] A means to provide context to assist the speech recognition.
	SpeechContext *SpeechContext `protobuf:"bytes,10,opt,name=speech_context,json=speechContext" json:"speech_context,omitempty"`
}

func (m *InitialRecognizeRequest) Reset()                    { *m = InitialRecognizeRequest{} }
func (m *InitialRecognizeRequest) String() string            { return proto.CompactTextString(m) }
func (*InitialRecognizeRequest) ProtoMessage()               {}
func (*InitialRecognizeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *InitialRecognizeRequest) GetEncoding() InitialRecognizeRequest_AudioEncoding {
	if m != nil {
		return m.Encoding
	}
	return InitialRecognizeRequest_ENCODING_UNSPECIFIED
}

func (m *InitialRecognizeRequest) GetSampleRate() int32 {
	if m != nil {
		return m.SampleRate
	}
	return 0
}

func (m *InitialRecognizeRequest) GetLanguageCode() string {
	if m != nil {
		return m.LanguageCode
	}
	return ""
}

func (m *InitialRecognizeRequest) GetMaxAlternatives() int32 {
	if m != nil {
		return m.MaxAlternatives
	}
	return 0
}

func (m *InitialRecognizeRequest) GetProfanityFilter() bool {
	if m != nil {
		return m.ProfanityFilter
	}
	return false
}

func (m *InitialRecognizeRequest) GetContinuous() bool {
	if m != nil {
		return m.Continuous
	}
	return false
}

func (m *InitialRecognizeRequest) GetInterimResults() bool {
	if m != nil {
		return m.InterimResults
	}
	return false
}

func (m *InitialRecognizeRequest) GetEnableEndpointerEvents() bool {
	if m != nil {
		return m.EnableEndpointerEvents
	}
	return false
}

func (m *InitialRecognizeRequest) GetOutputUri() string {
	if m != nil {
		return m.OutputUri
	}
	return ""
}

func (m *InitialRecognizeRequest) GetSpeechContext() *SpeechContext {
	if m != nil {
		return m.SpeechContext
	}
	return nil
}

// Provides "hints" to the speech recognizer to favor specific words and phrases
// in the results.
type SpeechContext struct {
	// [Optional] A list of up to 50 phrases of up to 100 characters each to
	// provide words and phrases "hints" to the speech recognition so that it is
	// more likely to recognize them.
	Phrases []string `protobuf:"bytes,1,rep,name=phrases" json:"phrases,omitempty"`
}

func (m *SpeechContext) Reset()                    { *m = SpeechContext{} }
func (m *SpeechContext) String() string            { return proto.CompactTextString(m) }
func (*SpeechContext) ProtoMessage()               {}
func (*SpeechContext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *SpeechContext) GetPhrases() []string {
	if m != nil {
		return m.Phrases
	}
	return nil
}

// Contains audio data in the encoding specified in the
// `InitialRecognizeRequest`. Either `content` or `uri` must be supplied.
// Supplying both or neither returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
type AudioRequest struct {
	// The audio data bytes encoded as specified in
	// `InitialRecognizeRequest`. Note: as with all bytes fields, protobuffers
	// use a pure binary representation, whereas JSON representations use base64.
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// URI that points to a file that contains audio data bytes as specified in
	// `InitialRecognizeRequest`. Currently, only Google Cloud Storage URIs are
	// supported, which must be specified in the following format:
	// `gs://bucket_name/object_name` (other URI formats return
	// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
	// [Request URIs](/storage/docs/reference-uris).
	Uri string `protobuf:"bytes,2,opt,name=uri" json:"uri,omitempty"`
}

func (m *AudioRequest) Reset()                    { *m = AudioRequest{} }
func (m *AudioRequest) String() string            { return proto.CompactTextString(m) }
func (*AudioRequest) ProtoMessage()               {}
func (*AudioRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *AudioRequest) GetContent() []byte {
	if m != nil {
		return m.Content
	}
	return nil
}

func (m *AudioRequest) GetUri() string {
	if m != nil {
		return m.Uri
	}
	return ""
}

// `NonStreamingRecognizeResponse` is the only message returned to the client by
// `NonStreamingRecognize`. It contains the result as zero or more sequential
// `RecognizeResponse` messages.
//
// Note that streaming `Recognize` will also return multiple `RecognizeResponse`
// messages, but each message is individually streamed.
type NonStreamingRecognizeResponse struct {
	// [Output-only] Sequential list of messages returned by the recognizer.
	Responses []*RecognizeResponse `protobuf:"bytes,1,rep,name=responses" json:"responses,omitempty"`
}

func (m *NonStreamingRecognizeResponse) Reset()                    { *m = NonStreamingRecognizeResponse{} }
func (m *NonStreamingRecognizeResponse) String() string            { return proto.CompactTextString(m) }
func (*NonStreamingRecognizeResponse) ProtoMessage()               {}
func (*NonStreamingRecognizeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }

func (m *NonStreamingRecognizeResponse) GetResponses() []*RecognizeResponse {
	if m != nil {
		return m.Responses
	}
	return nil
}

// `RecognizeResponse` is the only message type returned to the client.
type RecognizeResponse struct {
	// [Output-only] If set, returns a [google.rpc.Status][] message that
	// specifies the error for the operation.
	Error *google_rpc.Status `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	// [Output-only] For `continuous=false`, this repeated list contains zero or
	// one result that corresponds to all of the audio processed so far. For
	// `continuous=true`, this repeated list contains zero or more results that
	// correspond to consecutive portions of the audio being processed.
	// In both cases, contains zero or one `is_final=true` result (the newly
	// settled portion), followed by zero or more `is_final=false` results.
	Results []*SpeechRecognitionResult `protobuf:"bytes,2,rep,name=results" json:"results,omitempty"`
	// [Output-only] Indicates the lowest index in the `results` array that has
	// changed. The repeated `SpeechRecognitionResult` results overwrite past
	// results at this index and higher.
	ResultIndex int32 `protobuf:"varint,3,opt,name=result_index,json=resultIndex" json:"result_index,omitempty"`
	// [Output-only] Indicates the type of endpointer event.
	Endpoint RecognizeResponse_EndpointerEvent `protobuf:"varint,4,opt,name=endpoint,enum=google.cloud.speech.v1.RecognizeResponse_EndpointerEvent" json:"endpoint,omitempty"`
}

func (m *RecognizeResponse) Reset()                    { *m = RecognizeResponse{} }
func (m *RecognizeResponse) String() string            { return proto.CompactTextString(m) }
func (*RecognizeResponse) ProtoMessage()               {}
func (*RecognizeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }

func (m *RecognizeResponse) GetError() *google_rpc.Status {
	if m != nil {
		return m.Error
	}
	return nil
}

func (m *RecognizeResponse) GetResults() []*SpeechRecognitionResult {
	if m != nil {
		return m.Results
	}
	return nil
}

func (m *RecognizeResponse) GetResultIndex() int32 {
	if m != nil {
		return m.ResultIndex
	}
	return 0
}

func (m *RecognizeResponse) GetEndpoint() RecognizeResponse_EndpointerEvent {
	if m != nil {
		return m.Endpoint
	}
	return RecognizeResponse_ENDPOINTER_EVENT_UNSPECIFIED
}

// A speech recognition result corresponding to a portion of the audio.
type SpeechRecognitionResult struct {
	// [Output-only] May contain one or more recognition hypotheses (up to the
	// maximum specified in `max_alternatives`).
	Alternatives []*SpeechRecognitionAlternative `protobuf:"bytes,1,rep,name=alternatives" json:"alternatives,omitempty"`
	// [Output-only] Set `true` if this is the final time the speech service will
	// return this particular `SpeechRecognitionResult`. If `false`, this
	// represents an interim result that may change.
	IsFinal bool `protobuf:"varint,2,opt,name=is_final,json=isFinal" json:"is_final,omitempty"`
	// [Output-only] An estimate of the probability that the recognizer will not
	// change its guess about this interim result. Values range from 0.0
	// (completely unstable) to 1.0 (completely stable). Note that this is not the
	// same as `confidence`, which estimates the probability that a recognition
	// result is correct.
	// This field is only provided for interim results (`is_final=false`).
	// The default of 0.0 is a sentinel value indicating stability was not set.
	Stability float32 `protobuf:"fixed32,3,opt,name=stability" json:"stability,omitempty"`
}

func (m *SpeechRecognitionResult) Reset()                    { *m = SpeechRecognitionResult{} }
func (m *SpeechRecognitionResult) String() string            { return proto.CompactTextString(m) }
func (*SpeechRecognitionResult) ProtoMessage()               {}
func (*SpeechRecognitionResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }

func (m *SpeechRecognitionResult) GetAlternatives() []*SpeechRecognitionAlternative {
	if m != nil {
		return m.Alternatives
	}
	return nil
}

func (m *SpeechRecognitionResult) GetIsFinal() bool {
	if m != nil {
		return m.IsFinal
	}
	return false
}

func (m *SpeechRecognitionResult) GetStability() float32 {
	if m != nil {
		return m.Stability
	}
	return 0
}

// Alternative hypotheses (a.k.a. n-best list).
type SpeechRecognitionAlternative struct {
	// [Output-only] Transcript text representing the words that the user spoke.
	Transcript string `protobuf:"bytes,1,opt,name=transcript" json:"transcript,omitempty"`
	// [Output-only] The confidence estimate between 0.0 and 1.0. A higher number
	// means the system is more confident that the recognition is correct.
	// This field is typically provided only for the top hypothesis. and only for
	// `is_final=true` results.
	// The default of 0.0 is a sentinel value indicating confidence was not set.
	Confidence float32 `protobuf:"fixed32,2,opt,name=confidence" json:"confidence,omitempty"`
}

func (m *SpeechRecognitionAlternative) Reset()                    { *m = SpeechRecognitionAlternative{} }
func (m *SpeechRecognitionAlternative) String() string            { return proto.CompactTextString(m) }
func (*SpeechRecognitionAlternative) ProtoMessage()               {}
func (*SpeechRecognitionAlternative) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }

func (m *SpeechRecognitionAlternative) GetTranscript() string {
	if m != nil {
		return m.Transcript
	}
	return ""
}

func (m *SpeechRecognitionAlternative) GetConfidence() float32 {
	if m != nil {
		return m.Confidence
	}
	return 0
}

func init() {
	proto.RegisterType((*RecognizeRequest)(nil), "google.cloud.speech.v1.RecognizeRequest")
	proto.RegisterType((*InitialRecognizeRequest)(nil), "google.cloud.speech.v1.InitialRecognizeRequest")
	proto.RegisterType((*SpeechContext)(nil), "google.cloud.speech.v1.SpeechContext")
	proto.RegisterType((*AudioRequest)(nil), "google.cloud.speech.v1.AudioRequest")
	proto.RegisterType((*NonStreamingRecognizeResponse)(nil), "google.cloud.speech.v1.NonStreamingRecognizeResponse")
	proto.RegisterType((*RecognizeResponse)(nil), "google.cloud.speech.v1.RecognizeResponse")
	proto.RegisterType((*SpeechRecognitionResult)(nil), "google.cloud.speech.v1.SpeechRecognitionResult")
	proto.RegisterType((*SpeechRecognitionAlternative)(nil), "google.cloud.speech.v1.SpeechRecognitionAlternative")
	proto.RegisterEnum("google.cloud.speech.v1.InitialRecognizeRequest_AudioEncoding", InitialRecognizeRequest_AudioEncoding_name, InitialRecognizeRequest_AudioEncoding_value)
	proto.RegisterEnum("google.cloud.speech.v1.RecognizeResponse_EndpointerEvent", RecognizeResponse_EndpointerEvent_name, RecognizeResponse_EndpointerEvent_value)
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for Speech service

type SpeechClient interface {
	// Perform bidirectional streaming speech-recognition: receive results while
	// sending audio.
	Recognize(ctx context.Context, opts ...grpc.CallOption) (Speech_RecognizeClient, error)
	// Perform non-streaming speech-recognition: receive results after all audio
	// has been sent and processed.
	NonStreamingRecognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*NonStreamingRecognizeResponse, error)
}

type speechClient struct {
	cc *grpc.ClientConn
}

func NewSpeechClient(cc *grpc.ClientConn) SpeechClient {
	return &speechClient{cc}
}

func (c *speechClient) Recognize(ctx context.Context, opts ...grpc.CallOption) (Speech_RecognizeClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Speech_serviceDesc.Streams[0], c.cc, "/google.cloud.speech.v1.Speech/Recognize", opts...)
	if err != nil {
		return nil, err
	}
	x := &speechRecognizeClient{stream}
	return x, nil
}

type Speech_RecognizeClient interface {
	Send(*RecognizeRequest) error
	Recv() (*RecognizeResponse, error)
	grpc.ClientStream
}

type speechRecognizeClient struct {
	grpc.ClientStream
}

func (x *speechRecognizeClient) Send(m *RecognizeRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *speechRecognizeClient) Recv() (*RecognizeResponse, error) {
	m := new(RecognizeResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *speechClient) NonStreamingRecognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*NonStreamingRecognizeResponse, error) {
	out := new(NonStreamingRecognizeResponse)
	err := grpc.Invoke(ctx, "/google.cloud.speech.v1.Speech/NonStreamingRecognize", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Speech service

type SpeechServer interface {
	// Perform bidirectional streaming speech-recognition: receive results while
	// sending audio.
	Recognize(Speech_RecognizeServer) error
	// Perform non-streaming speech-recognition: receive results after all audio
	// has been sent and processed.
	NonStreamingRecognize(context.Context, *RecognizeRequest) (*NonStreamingRecognizeResponse, error)
}

func RegisterSpeechServer(s *grpc.Server, srv SpeechServer) {
	s.RegisterService(&_Speech_serviceDesc, srv)
}

func _Speech_Recognize_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(SpeechServer).Recognize(&speechRecognizeServer{stream})
}

type Speech_RecognizeServer interface {
	Send(*RecognizeResponse) error
	Recv() (*RecognizeRequest, error)
	grpc.ServerStream
}

type speechRecognizeServer struct {
	grpc.ServerStream
}

func (x *speechRecognizeServer) Send(m *RecognizeResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *speechRecognizeServer) Recv() (*RecognizeRequest, error) {
	m := new(RecognizeRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func _Speech_NonStreamingRecognize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RecognizeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpeechServer).NonStreamingRecognize(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/google.cloud.speech.v1.Speech/NonStreamingRecognize",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpeechServer).NonStreamingRecognize(ctx, req.(*RecognizeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Speech_serviceDesc = grpc.ServiceDesc{
	ServiceName: "google.cloud.speech.v1.Speech",
	HandlerType: (*SpeechServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NonStreamingRecognize",
			Handler:    _Speech_NonStreamingRecognize_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Recognize",
			Handler:       _Speech_Recognize_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "google.golang.org/genproto/googleapis/cloud/speech/v1/cloud_speech.proto",
}

func init() {
	proto.RegisterFile("google.golang.org/genproto/googleapis/cloud/speech/v1/cloud_speech.proto", fileDescriptor0)
}

var fileDescriptor0 = []byte{
	// 989 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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