/
audio_config.pb.go
executable file
·1747 lines (1593 loc) · 77.4 KB
/
audio_config.pb.go
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
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc v4.25.2
// source: google/cloud/dialogflow/v2beta1/audio_config.proto
package dialogflowpb
import (
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling)
// digit in Telephony Gateway.
type TelephonyDtmf int32
const (
// Not specified. This value may be used to indicate an absent digit.
TelephonyDtmf_TELEPHONY_DTMF_UNSPECIFIED TelephonyDtmf = 0
// Number: '1'.
TelephonyDtmf_DTMF_ONE TelephonyDtmf = 1
// Number: '2'.
TelephonyDtmf_DTMF_TWO TelephonyDtmf = 2
// Number: '3'.
TelephonyDtmf_DTMF_THREE TelephonyDtmf = 3
// Number: '4'.
TelephonyDtmf_DTMF_FOUR TelephonyDtmf = 4
// Number: '5'.
TelephonyDtmf_DTMF_FIVE TelephonyDtmf = 5
// Number: '6'.
TelephonyDtmf_DTMF_SIX TelephonyDtmf = 6
// Number: '7'.
TelephonyDtmf_DTMF_SEVEN TelephonyDtmf = 7
// Number: '8'.
TelephonyDtmf_DTMF_EIGHT TelephonyDtmf = 8
// Number: '9'.
TelephonyDtmf_DTMF_NINE TelephonyDtmf = 9
// Number: '0'.
TelephonyDtmf_DTMF_ZERO TelephonyDtmf = 10
// Letter: 'A'.
TelephonyDtmf_DTMF_A TelephonyDtmf = 11
// Letter: 'B'.
TelephonyDtmf_DTMF_B TelephonyDtmf = 12
// Letter: 'C'.
TelephonyDtmf_DTMF_C TelephonyDtmf = 13
// Letter: 'D'.
TelephonyDtmf_DTMF_D TelephonyDtmf = 14
// Asterisk/star: '*'.
TelephonyDtmf_DTMF_STAR TelephonyDtmf = 15
// Pound/diamond/hash/square/gate/octothorpe: '#'.
TelephonyDtmf_DTMF_POUND TelephonyDtmf = 16
)
// Enum value maps for TelephonyDtmf.
var (
TelephonyDtmf_name = map[int32]string{
0: "TELEPHONY_DTMF_UNSPECIFIED",
1: "DTMF_ONE",
2: "DTMF_TWO",
3: "DTMF_THREE",
4: "DTMF_FOUR",
5: "DTMF_FIVE",
6: "DTMF_SIX",
7: "DTMF_SEVEN",
8: "DTMF_EIGHT",
9: "DTMF_NINE",
10: "DTMF_ZERO",
11: "DTMF_A",
12: "DTMF_B",
13: "DTMF_C",
14: "DTMF_D",
15: "DTMF_STAR",
16: "DTMF_POUND",
}
TelephonyDtmf_value = map[string]int32{
"TELEPHONY_DTMF_UNSPECIFIED": 0,
"DTMF_ONE": 1,
"DTMF_TWO": 2,
"DTMF_THREE": 3,
"DTMF_FOUR": 4,
"DTMF_FIVE": 5,
"DTMF_SIX": 6,
"DTMF_SEVEN": 7,
"DTMF_EIGHT": 8,
"DTMF_NINE": 9,
"DTMF_ZERO": 10,
"DTMF_A": 11,
"DTMF_B": 12,
"DTMF_C": 13,
"DTMF_D": 14,
"DTMF_STAR": 15,
"DTMF_POUND": 16,
}
)
func (x TelephonyDtmf) Enum() *TelephonyDtmf {
p := new(TelephonyDtmf)
*p = x
return p
}
func (x TelephonyDtmf) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TelephonyDtmf) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[0].Descriptor()
}
func (TelephonyDtmf) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[0]
}
func (x TelephonyDtmf) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TelephonyDtmf.Descriptor instead.
func (TelephonyDtmf) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{0}
}
// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
// details.
type AudioEncoding int32
const (
// Not specified.
AudioEncoding_AUDIO_ENCODING_UNSPECIFIED AudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
AudioEncoding_AUDIO_ENCODING_LINEAR_16 AudioEncoding = 1
// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
// Codec) is the recommended encoding because it is lossless (therefore
// recognition is not compromised) and requires only about half the
// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
// 24-bit samples, however, not all fields in `STREAMINFO` are supported.
AudioEncoding_AUDIO_ENCODING_FLAC AudioEncoding = 2
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
AudioEncoding_AUDIO_ENCODING_MULAW AudioEncoding = 3
// Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
AudioEncoding_AUDIO_ENCODING_AMR AudioEncoding = 4
// Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
AudioEncoding_AUDIO_ENCODING_AMR_WB AudioEncoding = 5
// Opus encoded audio frames in Ogg container
// ([OggOpus](https://wiki.xiph.org/OggOpus)).
// `sample_rate_hertz` must be 16000.
AudioEncoding_AUDIO_ENCODING_OGG_OPUS AudioEncoding = 6
// Although the use of lossy encodings is not recommended, if a very low
// bitrate encoding is required, `OGG_OPUS` is highly preferred over
// Speex encoding. The [Speex](https://speex.org/) encoding supported by
// Dialogflow API has a header byte in each block, as in MIME type
// `audio/x-speex-with-header-byte`.
// It is a variant of the RTP Speex encoding defined in
// [RFC 5574](https://tools.ietf.org/html/rfc5574).
// The stream is a sequence of blocks, one block per RTP packet. Each block
// starts with a byte containing the length of the block, in bytes, followed
// by one or more frames of Speex data, padded to an integral number of
// bytes (octets) as specified in RFC 5574. In other words, each RTP header
// is replaced with a single byte containing the block length. Only Speex
// wideband is supported. `sample_rate_hertz` must be 16000.
AudioEncoding_AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE AudioEncoding = 7
)
// Enum value maps for AudioEncoding.
var (
AudioEncoding_name = map[int32]string{
0: "AUDIO_ENCODING_UNSPECIFIED",
1: "AUDIO_ENCODING_LINEAR_16",
2: "AUDIO_ENCODING_FLAC",
3: "AUDIO_ENCODING_MULAW",
4: "AUDIO_ENCODING_AMR",
5: "AUDIO_ENCODING_AMR_WB",
6: "AUDIO_ENCODING_OGG_OPUS",
7: "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE",
}
AudioEncoding_value = map[string]int32{
"AUDIO_ENCODING_UNSPECIFIED": 0,
"AUDIO_ENCODING_LINEAR_16": 1,
"AUDIO_ENCODING_FLAC": 2,
"AUDIO_ENCODING_MULAW": 3,
"AUDIO_ENCODING_AMR": 4,
"AUDIO_ENCODING_AMR_WB": 5,
"AUDIO_ENCODING_OGG_OPUS": 6,
"AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7,
}
)
func (x AudioEncoding) Enum() *AudioEncoding {
p := new(AudioEncoding)
*p = x
return p
}
func (x AudioEncoding) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[1].Descriptor()
}
func (AudioEncoding) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[1]
}
func (x AudioEncoding) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AudioEncoding.Descriptor instead.
func (AudioEncoding) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{1}
}
// Variant of the specified [Speech
// model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
//
// See the [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
// for which models have different variants. For example, the "phone_call" model
// has both a standard and an enhanced variant. When you use an enhanced model,
// you will generally receive higher quality results than for a standard model.
type SpeechModelVariant int32
const (
// No model variant specified. In this case Dialogflow defaults to
// USE_BEST_AVAILABLE.
SpeechModelVariant_SPEECH_MODEL_VARIANT_UNSPECIFIED SpeechModelVariant = 0
// Use the best available variant of the [Speech
// model][InputAudioConfig.model] that the caller is eligible for.
//
// Please see the [Dialogflow
// docs](https://cloud.google.com/dialogflow/docs/data-logging) for
// how to make your project eligible for enhanced models.
SpeechModelVariant_USE_BEST_AVAILABLE SpeechModelVariant = 1
// Use standard model variant even if an enhanced model is available. See the
// [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
// for details about enhanced models.
SpeechModelVariant_USE_STANDARD SpeechModelVariant = 2
// Use an enhanced model variant:
//
// - If an enhanced variant does not exist for the given
// [model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] and
// request language, Dialogflow falls back to the standard variant.
//
// The [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
// describes which models have enhanced variants.
//
// - If the API caller isn't eligible for enhanced models, Dialogflow returns
// an error. Please see the [Dialogflow
// docs](https://cloud.google.com/dialogflow/docs/data-logging)
// for how to make your project eligible.
SpeechModelVariant_USE_ENHANCED SpeechModelVariant = 3
)
// Enum value maps for SpeechModelVariant.
var (
SpeechModelVariant_name = map[int32]string{
0: "SPEECH_MODEL_VARIANT_UNSPECIFIED",
1: "USE_BEST_AVAILABLE",
2: "USE_STANDARD",
3: "USE_ENHANCED",
}
SpeechModelVariant_value = map[string]int32{
"SPEECH_MODEL_VARIANT_UNSPECIFIED": 0,
"USE_BEST_AVAILABLE": 1,
"USE_STANDARD": 2,
"USE_ENHANCED": 3,
}
)
func (x SpeechModelVariant) Enum() *SpeechModelVariant {
p := new(SpeechModelVariant)
*p = x
return p
}
func (x SpeechModelVariant) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SpeechModelVariant) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[2].Descriptor()
}
func (SpeechModelVariant) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[2]
}
func (x SpeechModelVariant) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SpeechModelVariant.Descriptor instead.
func (SpeechModelVariant) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{2}
}
// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
type SsmlVoiceGender int32
const (
// An unspecified gender, which means that the client doesn't care which
// gender the selected voice will have.
SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED SsmlVoiceGender = 0
// A male voice.
SsmlVoiceGender_SSML_VOICE_GENDER_MALE SsmlVoiceGender = 1
// A female voice.
SsmlVoiceGender_SSML_VOICE_GENDER_FEMALE SsmlVoiceGender = 2
// A gender-neutral voice.
SsmlVoiceGender_SSML_VOICE_GENDER_NEUTRAL SsmlVoiceGender = 3
)
// Enum value maps for SsmlVoiceGender.
var (
SsmlVoiceGender_name = map[int32]string{
0: "SSML_VOICE_GENDER_UNSPECIFIED",
1: "SSML_VOICE_GENDER_MALE",
2: "SSML_VOICE_GENDER_FEMALE",
3: "SSML_VOICE_GENDER_NEUTRAL",
}
SsmlVoiceGender_value = map[string]int32{
"SSML_VOICE_GENDER_UNSPECIFIED": 0,
"SSML_VOICE_GENDER_MALE": 1,
"SSML_VOICE_GENDER_FEMALE": 2,
"SSML_VOICE_GENDER_NEUTRAL": 3,
}
)
func (x SsmlVoiceGender) Enum() *SsmlVoiceGender {
p := new(SsmlVoiceGender)
*p = x
return p
}
func (x SsmlVoiceGender) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SsmlVoiceGender) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[3].Descriptor()
}
func (SsmlVoiceGender) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[3]
}
func (x SsmlVoiceGender) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SsmlVoiceGender.Descriptor instead.
func (SsmlVoiceGender) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{3}
}
// Audio encoding of the output audio format in Text-To-Speech.
type OutputAudioEncoding int32
const (
// Not specified.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_UNSPECIFIED OutputAudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
// Audio content returned as LINEAR16 also contains a WAV header.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_LINEAR_16 OutputAudioEncoding = 1
// MP3 audio at 32kbps.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MP3 OutputAudioEncoding = 2
// MP3 audio at 64kbps.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MP3_64_KBPS OutputAudioEncoding = 4
// Opus encoded audio wrapped in an ogg container. The result will be a
// file which can be played natively on Android, and in browsers (at least
// Chrome and Firefox). The quality of the encoding is considerably higher
// than MP3 while using approximately the same bitrate.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_OGG_OPUS OutputAudioEncoding = 3
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MULAW OutputAudioEncoding = 5
)
// Enum value maps for OutputAudioEncoding.
var (
OutputAudioEncoding_name = map[int32]string{
0: "OUTPUT_AUDIO_ENCODING_UNSPECIFIED",
1: "OUTPUT_AUDIO_ENCODING_LINEAR_16",
2: "OUTPUT_AUDIO_ENCODING_MP3",
4: "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS",
3: "OUTPUT_AUDIO_ENCODING_OGG_OPUS",
5: "OUTPUT_AUDIO_ENCODING_MULAW",
}
OutputAudioEncoding_value = map[string]int32{
"OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0,
"OUTPUT_AUDIO_ENCODING_LINEAR_16": 1,
"OUTPUT_AUDIO_ENCODING_MP3": 2,
"OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": 4,
"OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3,
"OUTPUT_AUDIO_ENCODING_MULAW": 5,
}
)
func (x OutputAudioEncoding) Enum() *OutputAudioEncoding {
p := new(OutputAudioEncoding)
*p = x
return p
}
func (x OutputAudioEncoding) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OutputAudioEncoding) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[4].Descriptor()
}
func (OutputAudioEncoding) Type() protoreflect.EnumType {
return &file_google_cloud_dialogflow_v2beta1_audio_config_proto_enumTypes[4]
}
func (x OutputAudioEncoding) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OutputAudioEncoding.Descriptor instead.
func (OutputAudioEncoding) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{4}
}
// Hints for the speech recognizer to help with recognition in a specific
// conversation state.
type SpeechContext struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. A list of strings containing words and phrases that the speech
// recognizer should recognize with higher likelihood.
//
// This list can be used to:
//
// - improve accuracy for words and phrases you expect the user to say,
// e.g. typical commands for your Dialogflow agent
// - add additional words to the speech recognizer vocabulary
// - ...
//
// See the [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
// limits.
Phrases []string `protobuf:"bytes,1,rep,name=phrases,proto3" json:"phrases,omitempty"`
// Optional. Boost for this context compared to other contexts:
//
// - If the boost is positive, Dialogflow will increase the probability that
// the phrases in this context are recognized over similar sounding phrases.
// - If the boost is unspecified or non-positive, Dialogflow will not apply
// any boost.
//
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
// find a value that fits your use case with binary search.
Boost float32 `protobuf:"fixed32,2,opt,name=boost,proto3" json:"boost,omitempty"`
}
func (x *SpeechContext) Reset() {
*x = SpeechContext{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpeechContext) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpeechContext) ProtoMessage() {}
func (x *SpeechContext) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SpeechContext.ProtoReflect.Descriptor instead.
func (*SpeechContext) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{0}
}
func (x *SpeechContext) GetPhrases() []string {
if x != nil {
return x.Phrases
}
return nil
}
func (x *SpeechContext) GetBoost() float32 {
if x != nil {
return x.Boost
}
return 0
}
// Information for a word recognized by the speech recognizer.
type SpeechWordInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The word this info is for.
Word string `protobuf:"bytes,3,opt,name=word,proto3" json:"word,omitempty"`
// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
StartOffset *durationpb.Duration `protobuf:"bytes,1,opt,name=start_offset,json=startOffset,proto3" json:"start_offset,omitempty"`
// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
EndOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=end_offset,json=endOffset,proto3" json:"end_offset,omitempty"`
// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
}
func (x *SpeechWordInfo) Reset() {
*x = SpeechWordInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SpeechWordInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SpeechWordInfo) ProtoMessage() {}
func (x *SpeechWordInfo) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SpeechWordInfo.ProtoReflect.Descriptor instead.
func (*SpeechWordInfo) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{1}
}
func (x *SpeechWordInfo) GetWord() string {
if x != nil {
return x.Word
}
return ""
}
func (x *SpeechWordInfo) GetStartOffset() *durationpb.Duration {
if x != nil {
return x.StartOffset
}
return nil
}
func (x *SpeechWordInfo) GetEndOffset() *durationpb.Duration {
if x != nil {
return x.EndOffset
}
return nil
}
func (x *SpeechWordInfo) GetConfidence() float32 {
if x != nil {
return x.Confidence
}
return 0
}
// Configuration of the barge-in behavior. Barge-in instructs the API to return
// a detected utterance at a proper time while the client is playing back the
// response audio from a previous request. When the client sees the
// utterance, it should stop the playback and immediately get ready for
// receiving the responses for the current request.
//
// The barge-in handling requires the client to start streaming audio input
// as soon as it starts playing back the audio from the previous response. The
// playback is modeled into two phases:
//
// - No barge-in phase: which goes first and during which speech detection
// should not be carried out.
//
// - Barge-in phase: which follows the no barge-in phase and during which
// the API starts speech detection and may inform the client that an utterance
// has been detected. Note that no-speech event is not expected in this
// phase.
//
// The client provides this configuration in terms of the durations of those
// two phases. The durations are measured in terms of the audio length from
// the start of the input audio.
//
// The flow goes like below:
//
// ```
// --> Time
//
// without speech detection | utterance only | utterance or no-speech event
//
// | |
// +-------------+ | +------------+ | +---------------+
//
// ----------+ no barge-in +-|-+ barge-in +-|-+ normal period +-----------
//
// +-------------+ | +------------+ | +---------------+
//
// ```
//
// No-speech event is a response with END_OF_UTTERANCE without any transcript
// following up.
type BargeInConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Duration that is not eligible for barge-in at the beginning of the input
// audio.
NoBargeInDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=no_barge_in_duration,json=noBargeInDuration,proto3" json:"no_barge_in_duration,omitempty"`
// Total duration for the playback at the beginning of the input audio.
TotalDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=total_duration,json=totalDuration,proto3" json:"total_duration,omitempty"`
}
func (x *BargeInConfig) Reset() {
*x = BargeInConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BargeInConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BargeInConfig) ProtoMessage() {}
func (x *BargeInConfig) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BargeInConfig.ProtoReflect.Descriptor instead.
func (*BargeInConfig) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{2}
}
func (x *BargeInConfig) GetNoBargeInDuration() *durationpb.Duration {
if x != nil {
return x.NoBargeInDuration
}
return nil
}
func (x *BargeInConfig) GetTotalDuration() *durationpb.Duration {
if x != nil {
return x.TotalDuration
}
return nil
}
// Instructs the speech recognizer on how to process the audio content.
type InputAudioConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Audio encoding of the audio content to process.
AudioEncoding AudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=google.cloud.dialogflow.v2beta1.AudioEncoding" json:"audio_encoding,omitempty"`
// Required. Sample rate (in Hertz) of the audio content sent in the query.
// Refer to [Cloud Speech API
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for
// more details.
SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
// Required. The language of the supplied audio. Dialogflow does not do
// translations. See [Language
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
// for a list of the currently supported language codes. Note that queries in
// the same session do not necessarily need to specify the same language.
LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// If `true`, Dialogflow returns
// [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
// [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult]
// with information about the recognized speech words, e.g. start and end time
// offsets. If false or unspecified, Speech doesn't return any word-level
// information.
EnableWordInfo bool `protobuf:"varint,13,opt,name=enable_word_info,json=enableWordInfo,proto3" json:"enable_word_info,omitempty"`
// A list of strings containing words and phrases that the speech
// recognizer should recognize with higher likelihood.
//
// See [the Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
// for more details.
//
// This field is deprecated. Please use [`speech_contexts`]() instead. If you
// specify both [`phrase_hints`]() and [`speech_contexts`](), Dialogflow will
// treat the [`phrase_hints`]() as a single additional [`SpeechContext`]().
//
// Deprecated: Marked as deprecated in google/cloud/dialogflow/v2beta1/audio_config.proto.
PhraseHints []string `protobuf:"bytes,4,rep,name=phrase_hints,json=phraseHints,proto3" json:"phrase_hints,omitempty"`
// Context information to assist speech recognition.
//
// See [the Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
// for more details.
SpeechContexts []*SpeechContext `protobuf:"bytes,11,rep,name=speech_contexts,json=speechContexts,proto3" json:"speech_contexts,omitempty"`
// Optional. Which Speech model to select for the given request.
// For more information, see
// [Speech models](https://cloud.google.com/dialogflow/es/docs/speech-models).
Model string `protobuf:"bytes,7,opt,name=model,proto3" json:"model,omitempty"`
// Which variant of the [Speech
// model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
ModelVariant SpeechModelVariant `protobuf:"varint,10,opt,name=model_variant,json=modelVariant,proto3,enum=google.cloud.dialogflow.v2beta1.SpeechModelVariant" json:"model_variant,omitempty"`
// If `false` (default), recognition does not cease until the
// client closes the stream.
// If `true`, the recognizer will detect a single spoken utterance in input
// audio. Recognition ceases when it detects the audio's voice has
// stopped or paused. In this case, once a detected intent is received, the
// client should close the stream and start a new request with a new stream as
// needed.
// Note: This setting is relevant only for streaming methods.
// Note: When specified, InputAudioConfig.single_utterance takes precedence
// over StreamingDetectIntentRequest.single_utterance.
SingleUtterance bool `protobuf:"varint,8,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"`
// Only used in
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent]
// and
// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent].
// If `false` and recognition doesn't return any result, trigger
// `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.
DisableNoSpeechRecognizedEvent bool `protobuf:"varint,14,opt,name=disable_no_speech_recognized_event,json=disableNoSpeechRecognizedEvent,proto3" json:"disable_no_speech_recognized_event,omitempty"`
// Configuration of barge-in behavior during the streaming of input audio.
BargeInConfig *BargeInConfig `protobuf:"bytes,15,opt,name=barge_in_config,json=bargeInConfig,proto3" json:"barge_in_config,omitempty"`
// Enable automatic punctuation option at the speech backend.
EnableAutomaticPunctuation bool `protobuf:"varint,17,opt,name=enable_automatic_punctuation,json=enableAutomaticPunctuation,proto3" json:"enable_automatic_punctuation,omitempty"`
// If `true`, the request will opt out for STT conformer model migration.
// This field will be deprecated once force migration takes place in June
// 2024. Please refer to [Dialogflow ES Speech model
// migration](https://cloud.google.com/dialogflow/es/docs/speech-model-migration).
OptOutConformerModelMigration bool `protobuf:"varint,26,opt,name=opt_out_conformer_model_migration,json=optOutConformerModelMigration,proto3" json:"opt_out_conformer_model_migration,omitempty"`
}
func (x *InputAudioConfig) Reset() {
*x = InputAudioConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InputAudioConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InputAudioConfig) ProtoMessage() {}
func (x *InputAudioConfig) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InputAudioConfig.ProtoReflect.Descriptor instead.
func (*InputAudioConfig) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{3}
}
func (x *InputAudioConfig) GetAudioEncoding() AudioEncoding {
if x != nil {
return x.AudioEncoding
}
return AudioEncoding_AUDIO_ENCODING_UNSPECIFIED
}
func (x *InputAudioConfig) GetSampleRateHertz() int32 {
if x != nil {
return x.SampleRateHertz
}
return 0
}
func (x *InputAudioConfig) GetLanguageCode() string {
if x != nil {
return x.LanguageCode
}
return ""
}
func (x *InputAudioConfig) GetEnableWordInfo() bool {
if x != nil {
return x.EnableWordInfo
}
return false
}
// Deprecated: Marked as deprecated in google/cloud/dialogflow/v2beta1/audio_config.proto.
func (x *InputAudioConfig) GetPhraseHints() []string {
if x != nil {
return x.PhraseHints
}
return nil
}
func (x *InputAudioConfig) GetSpeechContexts() []*SpeechContext {
if x != nil {
return x.SpeechContexts
}
return nil
}
func (x *InputAudioConfig) GetModel() string {
if x != nil {
return x.Model
}
return ""
}
func (x *InputAudioConfig) GetModelVariant() SpeechModelVariant {
if x != nil {
return x.ModelVariant
}
return SpeechModelVariant_SPEECH_MODEL_VARIANT_UNSPECIFIED
}
func (x *InputAudioConfig) GetSingleUtterance() bool {
if x != nil {
return x.SingleUtterance
}
return false
}
func (x *InputAudioConfig) GetDisableNoSpeechRecognizedEvent() bool {
if x != nil {
return x.DisableNoSpeechRecognizedEvent
}
return false
}
func (x *InputAudioConfig) GetBargeInConfig() *BargeInConfig {
if x != nil {
return x.BargeInConfig
}
return nil
}
func (x *InputAudioConfig) GetEnableAutomaticPunctuation() bool {
if x != nil {
return x.EnableAutomaticPunctuation
}
return false
}
func (x *InputAudioConfig) GetOptOutConformerModelMigration() bool {
if x != nil {
return x.OptOutConformerModelMigration
}
return false
}
// Description of which voice to use for speech synthesis.
type VoiceSelectionParams struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. The name of the voice. If not set, the service will choose a
// voice based on the other parameters such as language_code and
// [ssml_gender][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.ssml_gender].
//
// For the list of available voices, please refer to [Supported voices and
// languages](https://cloud.google.com/text-to-speech/docs/voices).
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. The preferred gender of the voice. If not set, the service will
// choose a voice based on the other parameters such as language_code and
// [name][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.name]. Note
// that this is only a preference, not requirement. If a voice of the
// appropriate gender is not available, the synthesizer should substitute a
// voice with a different gender rather than failing the request.
SsmlGender SsmlVoiceGender `protobuf:"varint,2,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.dialogflow.v2beta1.SsmlVoiceGender" json:"ssml_gender,omitempty"`
}
func (x *VoiceSelectionParams) Reset() {
*x = VoiceSelectionParams{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VoiceSelectionParams) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VoiceSelectionParams) ProtoMessage() {}
func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_dialogflow_v2beta1_audio_config_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VoiceSelectionParams.ProtoReflect.Descriptor instead.
func (*VoiceSelectionParams) Descriptor() ([]byte, []int) {
return file_google_cloud_dialogflow_v2beta1_audio_config_proto_rawDescGZIP(), []int{4}
}
func (x *VoiceSelectionParams) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *VoiceSelectionParams) GetSsmlGender() SsmlVoiceGender {
if x != nil {
return x.SsmlGender
}
return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED
}
// Configuration of how speech should be synthesized.
type SynthesizeSpeechConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields