google-apis-speech_v1 0.11.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a61aa91eaa2686b03a79d7673eb556a3da4ac04361b91810e1e73e6b5501473a
4
- data.tar.gz: 07dc9d1d55f5c23a3fdc0a86d07422920b0e76d80dc2d11edcc0f34e33140069
3
+ metadata.gz: 7de61a9d5a315371b869d13345c8942eb662ba4e9048ed4a9b6b692a2ca1ec13
4
+ data.tar.gz: 569c327a49cff79281e2b30bfae5092a1b9771d9c153512fc35424fbd3b2e41a
5
5
  SHA512:
6
- metadata.gz: 88c20e87a2684d34774fccebdac9a8c864c927b66f0b5ab6f45d03f6bddd1dcafa5eb1b04710e45efeb49efbf9580d9c6dfadb388f06c4d00c5ddb87ef354044
7
- data.tar.gz: a6f597de569c16b005b19bd93a5e896d2445628b50da095ed73328fdf25330b9f4e66cf87b15c5f60c93689903ae25417eff85e48512850d647aafd84d509782
6
+ metadata.gz: 5a1d241d74c7a05253d2c4829b099258789ba268d06873c84f032393ebcdafc04d18f776cc3aaac53d28eb223f6955bcbabf0868be3402ace0bcefda731adea0
7
+ data.tar.gz: 256356db96d3d7d88ee3b6c4d4fe2d2fb0b21221edcc09ae3b33897075fa1a91d9db0166c3aa24c55f8a616801469a072e702a82c2bfcd8d551b0cb729a3aef4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Release history for google-apis-speech_v1
2
2
 
3
+ ### v0.15.0 (2021-12-16)
4
+
5
+ * Unspecified changes
6
+
7
+ ### v0.14.0 (2021-12-10)
8
+
9
+ * Regenerated from discovery document revision 20211130
10
+
11
+ ### v0.13.0 (2021-11-12)
12
+
13
+ * Regenerated from discovery document revision 20211104
14
+
15
+ ### v0.12.0 (2021-10-29)
16
+
17
+ * Regenerated from discovery document revision 20211021
18
+
3
19
  ### v0.11.0 (2021-10-22)
4
20
 
5
21
  * Regenerated from discovery document revision 20211008
data/OVERVIEW.md CHANGED
@@ -51,7 +51,7 @@ require "google/apis/speech_v1"
51
51
  client = Google::Apis::SpeechV1::SpeechService.new
52
52
 
53
53
  # Authenticate calls
54
- client.authentication = # ... use the googleauth gem to create credentials
54
+ client.authorization = # ... use the googleauth gem to create credentials
55
55
  ```
56
56
 
57
57
  See the class reference docs for information on the methods you can call from a client.
@@ -22,6 +22,159 @@ module Google
22
22
  module Apis
23
23
  module SpeechV1
24
24
 
25
+ # An item of the class.
26
+ class ClassItem
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The class item's value.
30
+ # Corresponds to the JSON property `value`
31
+ # @return [String]
32
+ attr_accessor :value
33
+
34
+ def initialize(**args)
35
+ update!(**args)
36
+ end
37
+
38
+ # Update properties of this object
39
+ def update!(**args)
40
+ @value = args[:value] if args.key?(:value)
41
+ end
42
+ end
43
+
44
+ # Message sent by the client for the `CreateCustomClass` method.
45
+ class CreateCustomClassRequest
46
+ include Google::Apis::Core::Hashable
47
+
48
+ # A set of words or phrases that represents a common concept likely to appear in
49
+ # your audio, for example a list of passenger ship names. CustomClass items can
50
+ # be substituted into placeholders that you set in PhraseSet phrases.
51
+ # Corresponds to the JSON property `customClass`
52
+ # @return [Google::Apis::SpeechV1::CustomClass]
53
+ attr_accessor :custom_class
54
+
55
+ # Required. The ID to use for the custom class, which will become the final
56
+ # component of the custom class' resource name. This value should be 4-63
57
+ # characters, and valid characters are /a-z-/.
58
+ # Corresponds to the JSON property `customClassId`
59
+ # @return [String]
60
+ attr_accessor :custom_class_id
61
+
62
+ def initialize(**args)
63
+ update!(**args)
64
+ end
65
+
66
+ # Update properties of this object
67
+ def update!(**args)
68
+ @custom_class = args[:custom_class] if args.key?(:custom_class)
69
+ @custom_class_id = args[:custom_class_id] if args.key?(:custom_class_id)
70
+ end
71
+ end
72
+
73
+ # Message sent by the client for the `CreatePhraseSet` method.
74
+ class CreatePhraseSetRequest
75
+ include Google::Apis::Core::Hashable
76
+
77
+ # Provides "hints" to the speech recognizer to favor specific words and phrases
78
+ # in the results.
79
+ # Corresponds to the JSON property `phraseSet`
80
+ # @return [Google::Apis::SpeechV1::PhraseSet]
81
+ attr_accessor :phrase_set
82
+
83
+ # Required. The ID to use for the phrase set, which will become the final
84
+ # component of the phrase set's resource name. This value should be 4-63
85
+ # characters, and valid characters are /a-z-/.
86
+ # Corresponds to the JSON property `phraseSetId`
87
+ # @return [String]
88
+ attr_accessor :phrase_set_id
89
+
90
+ def initialize(**args)
91
+ update!(**args)
92
+ end
93
+
94
+ # Update properties of this object
95
+ def update!(**args)
96
+ @phrase_set = args[:phrase_set] if args.key?(:phrase_set)
97
+ @phrase_set_id = args[:phrase_set_id] if args.key?(:phrase_set_id)
98
+ end
99
+ end
100
+
101
+ # A set of words or phrases that represents a common concept likely to appear in
102
+ # your audio, for example a list of passenger ship names. CustomClass items can
103
+ # be substituted into placeholders that you set in PhraseSet phrases.
104
+ class CustomClass
105
+ include Google::Apis::Core::Hashable
106
+
107
+ # If this custom class is a resource, the custom_class_id is the resource id of
108
+ # the CustomClass. Case sensitive.
109
+ # Corresponds to the JSON property `customClassId`
110
+ # @return [String]
111
+ attr_accessor :custom_class_id
112
+
113
+ # A collection of class items.
114
+ # Corresponds to the JSON property `items`
115
+ # @return [Array<Google::Apis::SpeechV1::ClassItem>]
116
+ attr_accessor :items
117
+
118
+ # The resource name of the custom class.
119
+ # Corresponds to the JSON property `name`
120
+ # @return [String]
121
+ attr_accessor :name
122
+
123
+ def initialize(**args)
124
+ update!(**args)
125
+ end
126
+
127
+ # Update properties of this object
128
+ def update!(**args)
129
+ @custom_class_id = args[:custom_class_id] if args.key?(:custom_class_id)
130
+ @items = args[:items] if args.key?(:items)
131
+ @name = args[:name] if args.key?(:name)
132
+ end
133
+ end
134
+
135
+ # A generic empty message that you can re-use to avoid defining duplicated empty
136
+ # messages in your APIs. A typical example is to use it as the request or the
137
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
138
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
139
+ # `Empty` is empty JSON object ````.
140
+ class Empty
141
+ include Google::Apis::Core::Hashable
142
+
143
+ def initialize(**args)
144
+ update!(**args)
145
+ end
146
+
147
+ # Update properties of this object
148
+ def update!(**args)
149
+ end
150
+ end
151
+
152
+ # Message returned to the client by the `ListCustomClasses` method.
153
+ class ListCustomClassesResponse
154
+ include Google::Apis::Core::Hashable
155
+
156
+ # The custom classes.
157
+ # Corresponds to the JSON property `customClasses`
158
+ # @return [Array<Google::Apis::SpeechV1::CustomClass>]
159
+ attr_accessor :custom_classes
160
+
161
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
162
+ # field is omitted, there are no subsequent pages.
163
+ # Corresponds to the JSON property `nextPageToken`
164
+ # @return [String]
165
+ attr_accessor :next_page_token
166
+
167
+ def initialize(**args)
168
+ update!(**args)
169
+ end
170
+
171
+ # Update properties of this object
172
+ def update!(**args)
173
+ @custom_classes = args[:custom_classes] if args.key?(:custom_classes)
174
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
175
+ end
176
+ end
177
+
25
178
  # The response message for Operations.ListOperations.
26
179
  class ListOperationsResponse
27
180
  include Google::Apis::Core::Hashable
@@ -47,6 +200,32 @@ module Google
47
200
  end
48
201
  end
49
202
 
203
+ # Message returned to the client by the `ListPhraseSet` method.
204
+ class ListPhraseSetResponse
205
+ include Google::Apis::Core::Hashable
206
+
207
+ # A token, which can be sent as `page_token` to retrieve the next page. If this
208
+ # field is omitted, there are no subsequent pages.
209
+ # Corresponds to the JSON property `nextPageToken`
210
+ # @return [String]
211
+ attr_accessor :next_page_token
212
+
213
+ # The phrase set.
214
+ # Corresponds to the JSON property `phraseSets`
215
+ # @return [Array<Google::Apis::SpeechV1::PhraseSet>]
216
+ attr_accessor :phrase_sets
217
+
218
+ def initialize(**args)
219
+ update!(**args)
220
+ end
221
+
222
+ # Update properties of this object
223
+ def update!(**args)
224
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
225
+ @phrase_sets = args[:phrase_sets] if args.key?(:phrase_sets)
226
+ end
227
+ end
228
+
50
229
  # Describes the progress of a long-running `LongRunningRecognize` call. It is
51
230
  # included in the `metadata` field of the `Operation` returned by the `
52
231
  # GetOperation` call of the `google::longrunning::Operations` service.
@@ -232,6 +411,98 @@ module Google
232
411
  end
233
412
  end
234
413
 
414
+ # A phrases containing words and phrase "hints" so that the speech recognition
415
+ # is more likely to recognize them. This can be used to improve the accuracy for
416
+ # specific words and phrases, for example, if specific commands are typically
417
+ # spoken by the user. This can also be used to add additional words to the
418
+ # vocabulary of the recognizer. See [usage limits](https://cloud.google.com/
419
+ # speech-to-text/quotas#content). List items can also include pre-built or
420
+ # custom classes containing groups of words that represent common concepts that
421
+ # occur in natural language. For example, rather than providing a phrase hint
422
+ # for every month of the year (e.g. "i was born in january", "i was born in
423
+ # febuary", ...), use the pre-built `$MONTH` class improves the likelihood of
424
+ # correctly transcribing audio that includes months (e.g. "i was born in $month")
425
+ # . To refer to pre-built classes, use the class' symbol prepended with `$` e.g.
426
+ # `$MONTH`. To refer to custom classes that were defined inline in the request,
427
+ # set the class's `custom_class_id` to a string unique to all class resources
428
+ # and inline classes. Then use the class' id wrapped in $``...`` e.g. "$`my-
429
+ # months`". To refer to custom classes resources, use the class' id wrapped in `$
430
+ # ``` (e.g. `$`my-months``). Speech-to-Text supports three locations: `global`, `
431
+ # us` (US North America), and `eu` (Europe). If you are calling the `speech.
432
+ # googleapis.com` endpoint, use the `global` location. To specify a region, use
433
+ # a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `
434
+ # eu` location value.
435
+ class Phrase
436
+ include Google::Apis::Core::Hashable
437
+
438
+ # Hint Boost. Overrides the boost set at the phrase set level. Positive value
439
+ # will increase the probability that a specific phrase will be recognized over
440
+ # other similar sounding phrases. The higher the boost, the higher the chance of
441
+ # false positive recognition as well. Negative boost will simply be ignored.
442
+ # Though `boost` can accept a wide range of positive values, most use cases are
443
+ # best served with values between 0 and 20. We recommend using a binary search
444
+ # approach to finding the optimal value for your use case. Speech recognition
445
+ # will skip PhraseSets with a boost value of 0.
446
+ # Corresponds to the JSON property `boost`
447
+ # @return [Float]
448
+ attr_accessor :boost
449
+
450
+ # The phrase itself.
451
+ # Corresponds to the JSON property `value`
452
+ # @return [String]
453
+ attr_accessor :value
454
+
455
+ def initialize(**args)
456
+ update!(**args)
457
+ end
458
+
459
+ # Update properties of this object
460
+ def update!(**args)
461
+ @boost = args[:boost] if args.key?(:boost)
462
+ @value = args[:value] if args.key?(:value)
463
+ end
464
+ end
465
+
466
+ # Provides "hints" to the speech recognizer to favor specific words and phrases
467
+ # in the results.
468
+ class PhraseSet
469
+ include Google::Apis::Core::Hashable
470
+
471
+ # Hint Boost. Positive value will increase the probability that a specific
472
+ # phrase will be recognized over other similar sounding phrases. The higher the
473
+ # boost, the higher the chance of false positive recognition as well. Negative
474
+ # boost values would correspond to anti-biasing. Anti-biasing is not enabled, so
475
+ # negative boost will simply be ignored. Though `boost` can accept a wide range
476
+ # of positive values, most use cases are best served with values between 0 (
477
+ # exclusive) and 20. We recommend using a binary search approach to finding the
478
+ # optimal value for your use case. Speech recognition will skip PhraseSets with
479
+ # a boost value of 0.
480
+ # Corresponds to the JSON property `boost`
481
+ # @return [Float]
482
+ attr_accessor :boost
483
+
484
+ # The resource name of the phrase set.
485
+ # Corresponds to the JSON property `name`
486
+ # @return [String]
487
+ attr_accessor :name
488
+
489
+ # A list of word and phrases.
490
+ # Corresponds to the JSON property `phrases`
491
+ # @return [Array<Google::Apis::SpeechV1::Phrase>]
492
+ attr_accessor :phrases
493
+
494
+ def initialize(**args)
495
+ update!(**args)
496
+ end
497
+
498
+ # Update properties of this object
499
+ def update!(**args)
500
+ @boost = args[:boost] if args.key?(:boost)
501
+ @name = args[:name] if args.key?(:name)
502
+ @phrases = args[:phrases] if args.key?(:phrases)
503
+ end
504
+ end
505
+
235
506
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
236
507
  # Either `content` or `uri` must be supplied. Supplying both or neither returns
237
508
  # google.rpc.Code.INVALID_ARGUMENT. See [content limits](https://cloud.google.
@@ -273,6 +544,11 @@ module Google
273
544
  class RecognitionConfig
274
545
  include Google::Apis::Core::Hashable
275
546
 
547
+ # Speech adaptation configuration.
548
+ # Corresponds to the JSON property `adaptation`
549
+ # @return [Google::Apis::SpeechV1::SpeechAdaptation]
550
+ attr_accessor :adaptation
551
+
276
552
  # A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.
277
553
  # txt) language tags, listing possible alternative languages of the supplied
278
554
  # audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/
@@ -323,6 +599,26 @@ module Google
323
599
  attr_accessor :enable_separate_recognition_per_channel
324
600
  alias_method :enable_separate_recognition_per_channel?, :enable_separate_recognition_per_channel
325
601
 
602
+ # The spoken emoji behavior for the call If not set, uses default behavior based
603
+ # on model of choice If 'true', adds spoken emoji formatting for the request.
604
+ # This will replace spoken emojis with the corresponding Unicode symbols in the
605
+ # final transcript. If 'false', spoken emojis are not replaced.
606
+ # Corresponds to the JSON property `enableSpokenEmojis`
607
+ # @return [Boolean]
608
+ attr_accessor :enable_spoken_emojis
609
+ alias_method :enable_spoken_emojis?, :enable_spoken_emojis
610
+
611
+ # The spoken punctuation behavior for the call If not set, uses default behavior
612
+ # based on model of choice e.g. command_and_search will enable spoken
613
+ # punctuation by default If 'true', replaces spoken punctuation with the
614
+ # corresponding symbols in the request. For example, "how are you question mark"
615
+ # becomes "how are you?". See https://cloud.google.com/speech-to-text/docs/
616
+ # spoken-punctuation for support. If 'false', spoken punctuation is not replaced.
617
+ # Corresponds to the JSON property `enableSpokenPunctuation`
618
+ # @return [Boolean]
619
+ attr_accessor :enable_spoken_punctuation
620
+ alias_method :enable_spoken_punctuation?, :enable_spoken_punctuation
621
+
326
622
  # If `true`, the top result includes a list of words and the confidence for
327
623
  # those words. If `false`, no word-level confidence information is returned. The
328
624
  # default is `false`.
@@ -424,11 +720,14 @@ module Google
424
720
 
425
721
  # Update properties of this object
426
722
  def update!(**args)
723
+ @adaptation = args[:adaptation] if args.key?(:adaptation)
427
724
  @alternative_language_codes = args[:alternative_language_codes] if args.key?(:alternative_language_codes)
428
725
  @audio_channel_count = args[:audio_channel_count] if args.key?(:audio_channel_count)
429
726
  @diarization_config = args[:diarization_config] if args.key?(:diarization_config)
430
727
  @enable_automatic_punctuation = args[:enable_automatic_punctuation] if args.key?(:enable_automatic_punctuation)
431
728
  @enable_separate_recognition_per_channel = args[:enable_separate_recognition_per_channel] if args.key?(:enable_separate_recognition_per_channel)
729
+ @enable_spoken_emojis = args[:enable_spoken_emojis] if args.key?(:enable_spoken_emojis)
730
+ @enable_spoken_punctuation = args[:enable_spoken_punctuation] if args.key?(:enable_spoken_punctuation)
432
731
  @enable_word_confidence = args[:enable_word_confidence] if args.key?(:enable_word_confidence)
433
732
  @enable_word_time_offsets = args[:enable_word_time_offsets] if args.key?(:enable_word_time_offsets)
434
733
  @encoding = args[:encoding] if args.key?(:encoding)
@@ -612,11 +911,59 @@ module Google
612
911
  end
613
912
  end
614
913
 
914
+ # Speech adaptation configuration.
915
+ class SpeechAdaptation
916
+ include Google::Apis::Core::Hashable
917
+
918
+ # A collection of custom classes. To specify the classes inline, leave the class'
919
+ # `name` blank and fill in the rest of its fields, giving it a unique `
920
+ # custom_class_id`. Refer to the inline defined class in phrase hints by its `
921
+ # custom_class_id`.
922
+ # Corresponds to the JSON property `customClasses`
923
+ # @return [Array<Google::Apis::SpeechV1::CustomClass>]
924
+ attr_accessor :custom_classes
925
+
926
+ # A collection of phrase set resource names to use.
927
+ # Corresponds to the JSON property `phraseSetReferences`
928
+ # @return [Array<String>]
929
+ attr_accessor :phrase_set_references
930
+
931
+ # A collection of phrase sets. To specify the hints inline, leave the phrase set'
932
+ # s `name` blank and fill in the rest of its fields. Any phrase set can use any
933
+ # custom class.
934
+ # Corresponds to the JSON property `phraseSets`
935
+ # @return [Array<Google::Apis::SpeechV1::PhraseSet>]
936
+ attr_accessor :phrase_sets
937
+
938
+ def initialize(**args)
939
+ update!(**args)
940
+ end
941
+
942
+ # Update properties of this object
943
+ def update!(**args)
944
+ @custom_classes = args[:custom_classes] if args.key?(:custom_classes)
945
+ @phrase_set_references = args[:phrase_set_references] if args.key?(:phrase_set_references)
946
+ @phrase_sets = args[:phrase_sets] if args.key?(:phrase_sets)
947
+ end
948
+ end
949
+
615
950
  # Provides "hints" to the speech recognizer to favor specific words and phrases
616
951
  # in the results.
617
952
  class SpeechContext
618
953
  include Google::Apis::Core::Hashable
619
954
 
955
+ # Hint Boost. Positive value will increase the probability that a specific
956
+ # phrase will be recognized over other similar sounding phrases. The higher the
957
+ # boost, the higher the chance of false positive recognition as well. Negative
958
+ # boost values would correspond to anti-biasing. Anti-biasing is not enabled, so
959
+ # negative boost will simply be ignored. Though `boost` can accept a wide range
960
+ # of positive values, most use cases are best served with values between 0 and
961
+ # 20. We recommend using a binary search approach to finding the optimal value
962
+ # for your use case.
963
+ # Corresponds to the JSON property `boost`
964
+ # @return [Float]
965
+ attr_accessor :boost
966
+
620
967
  # A list of strings containing words and phrases "hints" so that the speech
621
968
  # recognition is more likely to recognize them. This can be used to improve the
622
969
  # accuracy for specific words and phrases, for example, if specific commands are
@@ -637,6 +984,7 @@ module Google
637
984
 
638
985
  # Update properties of this object
639
986
  def update!(**args)
987
+ @boost = args[:boost] if args.key?(:boost)
640
988
  @phrases = args[:phrases] if args.key?(:phrases)
641
989
  end
642
990
  end
@@ -705,6 +1053,11 @@ module Google
705
1053
  # @return [String]
706
1054
  attr_accessor :language_code
707
1055
 
1056
+ # Time offset of the end of this result relative to the beginning of the audio.
1057
+ # Corresponds to the JSON property `resultEndTime`
1058
+ # @return [String]
1059
+ attr_accessor :result_end_time
1060
+
708
1061
  def initialize(**args)
709
1062
  update!(**args)
710
1063
  end
@@ -714,6 +1067,7 @@ module Google
714
1067
  @alternatives = args[:alternatives] if args.key?(:alternatives)
715
1068
  @channel_tag = args[:channel_tag] if args.key?(:channel_tag)
716
1069
  @language_code = args[:language_code] if args.key?(:language_code)
1070
+ @result_end_time = args[:result_end_time] if args.key?(:result_end_time)
717
1071
  end
718
1072
  end
719
1073
 
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module SpeechV1
18
18
  # Version of the google-apis-speech_v1 gem
19
- GEM_VERSION = "0.11.0"
19
+ GEM_VERSION = "0.15.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20211008"
25
+ REVISION = "20211130"
26
26
  end
27
27
  end
28
28
  end
@@ -22,12 +22,54 @@ module Google
22
22
  module Apis
23
23
  module SpeechV1
24
24
 
25
+ class ClassItem
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class CreateCustomClassRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class CreatePhraseSetRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class CustomClass
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Empty
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListCustomClassesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
25
61
  class ListOperationsResponse
26
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
63
 
28
64
  include Google::Apis::Core::JsonObjectSupport
29
65
  end
30
66
 
67
+ class ListPhraseSetResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
31
73
  class LongRunningRecognizeMetadata
32
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
75
 
@@ -52,6 +94,18 @@ module Google
52
94
  include Google::Apis::Core::JsonObjectSupport
53
95
  end
54
96
 
97
+ class Phrase
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class PhraseSet
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
55
109
  class RecognitionAudio
56
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
57
111
 
@@ -88,6 +142,12 @@ module Google
88
142
  include Google::Apis::Core::JsonObjectSupport
89
143
  end
90
144
 
145
+ class SpeechAdaptation
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
91
151
  class SpeechContext
92
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
153
 
@@ -124,6 +184,56 @@ module Google
124
184
  include Google::Apis::Core::JsonObjectSupport
125
185
  end
126
186
 
187
+ class ClassItem
188
+ # @private
189
+ class Representation < Google::Apis::Core::JsonRepresentation
190
+ property :value, as: 'value'
191
+ end
192
+ end
193
+
194
+ class CreateCustomClassRequest
195
+ # @private
196
+ class Representation < Google::Apis::Core::JsonRepresentation
197
+ property :custom_class, as: 'customClass', class: Google::Apis::SpeechV1::CustomClass, decorator: Google::Apis::SpeechV1::CustomClass::Representation
198
+
199
+ property :custom_class_id, as: 'customClassId'
200
+ end
201
+ end
202
+
203
+ class CreatePhraseSetRequest
204
+ # @private
205
+ class Representation < Google::Apis::Core::JsonRepresentation
206
+ property :phrase_set, as: 'phraseSet', class: Google::Apis::SpeechV1::PhraseSet, decorator: Google::Apis::SpeechV1::PhraseSet::Representation
207
+
208
+ property :phrase_set_id, as: 'phraseSetId'
209
+ end
210
+ end
211
+
212
+ class CustomClass
213
+ # @private
214
+ class Representation < Google::Apis::Core::JsonRepresentation
215
+ property :custom_class_id, as: 'customClassId'
216
+ collection :items, as: 'items', class: Google::Apis::SpeechV1::ClassItem, decorator: Google::Apis::SpeechV1::ClassItem::Representation
217
+
218
+ property :name, as: 'name'
219
+ end
220
+ end
221
+
222
+ class Empty
223
+ # @private
224
+ class Representation < Google::Apis::Core::JsonRepresentation
225
+ end
226
+ end
227
+
228
+ class ListCustomClassesResponse
229
+ # @private
230
+ class Representation < Google::Apis::Core::JsonRepresentation
231
+ collection :custom_classes, as: 'customClasses', class: Google::Apis::SpeechV1::CustomClass, decorator: Google::Apis::SpeechV1::CustomClass::Representation
232
+
233
+ property :next_page_token, as: 'nextPageToken'
234
+ end
235
+ end
236
+
127
237
  class ListOperationsResponse
128
238
  # @private
129
239
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -133,6 +243,15 @@ module Google
133
243
  end
134
244
  end
135
245
 
246
+ class ListPhraseSetResponse
247
+ # @private
248
+ class Representation < Google::Apis::Core::JsonRepresentation
249
+ property :next_page_token, as: 'nextPageToken'
250
+ collection :phrase_sets, as: 'phraseSets', class: Google::Apis::SpeechV1::PhraseSet, decorator: Google::Apis::SpeechV1::PhraseSet::Representation
251
+
252
+ end
253
+ end
254
+
136
255
  class LongRunningRecognizeMetadata
137
256
  # @private
138
257
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -180,6 +299,24 @@ module Google
180
299
  end
181
300
  end
182
301
 
302
+ class Phrase
303
+ # @private
304
+ class Representation < Google::Apis::Core::JsonRepresentation
305
+ property :boost, as: 'boost'
306
+ property :value, as: 'value'
307
+ end
308
+ end
309
+
310
+ class PhraseSet
311
+ # @private
312
+ class Representation < Google::Apis::Core::JsonRepresentation
313
+ property :boost, as: 'boost'
314
+ property :name, as: 'name'
315
+ collection :phrases, as: 'phrases', class: Google::Apis::SpeechV1::Phrase, decorator: Google::Apis::SpeechV1::Phrase::Representation
316
+
317
+ end
318
+ end
319
+
183
320
  class RecognitionAudio
184
321
  # @private
185
322
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -191,12 +328,16 @@ module Google
191
328
  class RecognitionConfig
192
329
  # @private
193
330
  class Representation < Google::Apis::Core::JsonRepresentation
331
+ property :adaptation, as: 'adaptation', class: Google::Apis::SpeechV1::SpeechAdaptation, decorator: Google::Apis::SpeechV1::SpeechAdaptation::Representation
332
+
194
333
  collection :alternative_language_codes, as: 'alternativeLanguageCodes'
195
334
  property :audio_channel_count, as: 'audioChannelCount'
196
335
  property :diarization_config, as: 'diarizationConfig', class: Google::Apis::SpeechV1::SpeakerDiarizationConfig, decorator: Google::Apis::SpeechV1::SpeakerDiarizationConfig::Representation
197
336
 
198
337
  property :enable_automatic_punctuation, as: 'enableAutomaticPunctuation'
199
338
  property :enable_separate_recognition_per_channel, as: 'enableSeparateRecognitionPerChannel'
339
+ property :enable_spoken_emojis, as: 'enableSpokenEmojis'
340
+ property :enable_spoken_punctuation, as: 'enableSpokenPunctuation'
200
341
  property :enable_word_confidence, as: 'enableWordConfidence'
201
342
  property :enable_word_time_offsets, as: 'enableWordTimeOffsets'
202
343
  property :encoding, as: 'encoding'
@@ -256,9 +397,21 @@ module Google
256
397
  end
257
398
  end
258
399
 
400
+ class SpeechAdaptation
401
+ # @private
402
+ class Representation < Google::Apis::Core::JsonRepresentation
403
+ collection :custom_classes, as: 'customClasses', class: Google::Apis::SpeechV1::CustomClass, decorator: Google::Apis::SpeechV1::CustomClass::Representation
404
+
405
+ collection :phrase_set_references, as: 'phraseSetReferences'
406
+ collection :phrase_sets, as: 'phraseSets', class: Google::Apis::SpeechV1::PhraseSet, decorator: Google::Apis::SpeechV1::PhraseSet::Representation
407
+
408
+ end
409
+ end
410
+
259
411
  class SpeechContext
260
412
  # @private
261
413
  class Representation < Google::Apis::Core::JsonRepresentation
414
+ property :boost, as: 'boost'
262
415
  collection :phrases, as: 'phrases'
263
416
  end
264
417
  end
@@ -280,6 +433,7 @@ module Google
280
433
 
281
434
  property :channel_tag, as: 'channelTag'
282
435
  property :language_code, as: 'languageCode'
436
+ property :result_end_time, as: 'resultEndTime'
283
437
  end
284
438
  end
285
439
 
@@ -126,6 +126,378 @@ module Google
126
126
  execute_or_queue_command(command, &block)
127
127
  end
128
128
 
129
+ # Create a custom class.
130
+ # @param [String] parent
131
+ # Required. The parent resource where this custom class will be created. Format:
132
+ # `projects/`project`/locations/`location`/customClasses` Speech-to-Text
133
+ # supports three locations: `global`, `us` (US North America), and `eu` (Europe).
134
+ # If you are calling the `speech.googleapis.com` endpoint, use the `global`
135
+ # location. To specify a region, use a [regional endpoint](/speech-to-text/docs/
136
+ # endpoints) with matching `us` or `eu` location value.
137
+ # @param [Google::Apis::SpeechV1::CreateCustomClassRequest] create_custom_class_request_object
138
+ # @param [String] fields
139
+ # Selector specifying which fields to include in a partial response.
140
+ # @param [String] quota_user
141
+ # Available to use for quota purposes for server-side applications. Can be any
142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
143
+ # @param [Google::Apis::RequestOptions] options
144
+ # Request-specific options
145
+ #
146
+ # @yield [result, err] Result & error if block supplied
147
+ # @yieldparam result [Google::Apis::SpeechV1::CustomClass] parsed result object
148
+ # @yieldparam err [StandardError] error object if request failed
149
+ #
150
+ # @return [Google::Apis::SpeechV1::CustomClass]
151
+ #
152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
155
+ def create_custom_class(parent, create_custom_class_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
156
+ command = make_simple_command(:post, 'v1/{+parent}/customClasses', options)
157
+ command.request_representation = Google::Apis::SpeechV1::CreateCustomClassRequest::Representation
158
+ command.request_object = create_custom_class_request_object
159
+ command.response_representation = Google::Apis::SpeechV1::CustomClass::Representation
160
+ command.response_class = Google::Apis::SpeechV1::CustomClass
161
+ command.params['parent'] = parent unless parent.nil?
162
+ command.query['fields'] = fields unless fields.nil?
163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
164
+ execute_or_queue_command(command, &block)
165
+ end
166
+
167
+ # Delete a custom class.
168
+ # @param [String] name
169
+ # Required. The name of the custom class to delete. Format: `projects/`project`/
170
+ # locations/`location`/customClasses/`custom_class`` Speech-to-Text supports
171
+ # three locations: `global`, `us` (US North America), and `eu` (Europe). If you
172
+ # are calling the `speech.googleapis.com` endpoint, use the `global` location.
173
+ # To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
174
+ # with matching `us` or `eu` location value.
175
+ # @param [String] fields
176
+ # Selector specifying which fields to include in a partial response.
177
+ # @param [String] quota_user
178
+ # Available to use for quota purposes for server-side applications. Can be any
179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
180
+ # @param [Google::Apis::RequestOptions] options
181
+ # Request-specific options
182
+ #
183
+ # @yield [result, err] Result & error if block supplied
184
+ # @yieldparam result [Google::Apis::SpeechV1::Empty] parsed result object
185
+ # @yieldparam err [StandardError] error object if request failed
186
+ #
187
+ # @return [Google::Apis::SpeechV1::Empty]
188
+ #
189
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
190
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
191
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
192
+ def delete_project_location_custom_class(name, fields: nil, quota_user: nil, options: nil, &block)
193
+ command = make_simple_command(:delete, 'v1/{+name}', options)
194
+ command.response_representation = Google::Apis::SpeechV1::Empty::Representation
195
+ command.response_class = Google::Apis::SpeechV1::Empty
196
+ command.params['name'] = name unless name.nil?
197
+ command.query['fields'] = fields unless fields.nil?
198
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
199
+ execute_or_queue_command(command, &block)
200
+ end
201
+
202
+ # Get a custom class.
203
+ # @param [String] name
204
+ # Required. The name of the custom class to retrieve. Format: `projects/`project`
205
+ # /locations/`location`/customClasses/`custom_class``
206
+ # @param [String] fields
207
+ # Selector specifying which fields to include in a partial response.
208
+ # @param [String] quota_user
209
+ # Available to use for quota purposes for server-side applications. Can be any
210
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
211
+ # @param [Google::Apis::RequestOptions] options
212
+ # Request-specific options
213
+ #
214
+ # @yield [result, err] Result & error if block supplied
215
+ # @yieldparam result [Google::Apis::SpeechV1::CustomClass] parsed result object
216
+ # @yieldparam err [StandardError] error object if request failed
217
+ #
218
+ # @return [Google::Apis::SpeechV1::CustomClass]
219
+ #
220
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
221
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
222
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
223
+ def get_project_location_custom_class(name, fields: nil, quota_user: nil, options: nil, &block)
224
+ command = make_simple_command(:get, 'v1/{+name}', options)
225
+ command.response_representation = Google::Apis::SpeechV1::CustomClass::Representation
226
+ command.response_class = Google::Apis::SpeechV1::CustomClass
227
+ command.params['name'] = name unless name.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # List custom classes.
234
+ # @param [String] parent
235
+ # Required. The parent, which owns this collection of custom classes. Format: `
236
+ # projects/`project`/locations/`location`/customClasses` Speech-to-Text supports
237
+ # three locations: `global`, `us` (US North America), and `eu` (Europe). If you
238
+ # are calling the `speech.googleapis.com` endpoint, use the `global` location.
239
+ # To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
240
+ # with matching `us` or `eu` location value.
241
+ # @param [Fixnum] page_size
242
+ # The maximum number of custom classes to return. The service may return fewer
243
+ # than this value. If unspecified, at most 50 custom classes will be returned.
244
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
245
+ # @param [String] page_token
246
+ # A page token, received from a previous `ListCustomClass` call. Provide this to
247
+ # retrieve the subsequent page. When paginating, all other parameters provided
248
+ # to `ListCustomClass` must match the call that provided the page token.
249
+ # @param [String] fields
250
+ # Selector specifying which fields to include in a partial response.
251
+ # @param [String] quota_user
252
+ # Available to use for quota purposes for server-side applications. Can be any
253
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
254
+ # @param [Google::Apis::RequestOptions] options
255
+ # Request-specific options
256
+ #
257
+ # @yield [result, err] Result & error if block supplied
258
+ # @yieldparam result [Google::Apis::SpeechV1::ListCustomClassesResponse] parsed result object
259
+ # @yieldparam err [StandardError] error object if request failed
260
+ #
261
+ # @return [Google::Apis::SpeechV1::ListCustomClassesResponse]
262
+ #
263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
266
+ def list_project_location_custom_classes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
267
+ command = make_simple_command(:get, 'v1/{+parent}/customClasses', options)
268
+ command.response_representation = Google::Apis::SpeechV1::ListCustomClassesResponse::Representation
269
+ command.response_class = Google::Apis::SpeechV1::ListCustomClassesResponse
270
+ command.params['parent'] = parent unless parent.nil?
271
+ command.query['pageSize'] = page_size unless page_size.nil?
272
+ command.query['pageToken'] = page_token unless page_token.nil?
273
+ command.query['fields'] = fields unless fields.nil?
274
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
275
+ execute_or_queue_command(command, &block)
276
+ end
277
+
278
+ # Update a custom class.
279
+ # @param [String] name
280
+ # The resource name of the custom class.
281
+ # @param [Google::Apis::SpeechV1::CustomClass] custom_class_object
282
+ # @param [String] update_mask
283
+ # The list of fields to be updated.
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # Available to use for quota purposes for server-side applications. Can be any
288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
289
+ # @param [Google::Apis::RequestOptions] options
290
+ # Request-specific options
291
+ #
292
+ # @yield [result, err] Result & error if block supplied
293
+ # @yieldparam result [Google::Apis::SpeechV1::CustomClass] parsed result object
294
+ # @yieldparam err [StandardError] error object if request failed
295
+ #
296
+ # @return [Google::Apis::SpeechV1::CustomClass]
297
+ #
298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
301
+ def patch_project_location_custom_class(name, custom_class_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
302
+ command = make_simple_command(:patch, 'v1/{+name}', options)
303
+ command.request_representation = Google::Apis::SpeechV1::CustomClass::Representation
304
+ command.request_object = custom_class_object
305
+ command.response_representation = Google::Apis::SpeechV1::CustomClass::Representation
306
+ command.response_class = Google::Apis::SpeechV1::CustomClass
307
+ command.params['name'] = name unless name.nil?
308
+ command.query['updateMask'] = update_mask unless update_mask.nil?
309
+ command.query['fields'] = fields unless fields.nil?
310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
311
+ execute_or_queue_command(command, &block)
312
+ end
313
+
314
+ # Create a set of phrase hints. Each item in the set can be a single word or a
315
+ # multi-word phrase. The items in the PhraseSet are favored by the recognition
316
+ # model when you send a call that includes the PhraseSet.
317
+ # @param [String] parent
318
+ # Required. The parent resource where this phrase set will be created. Format: `
319
+ # projects/`project`/locations/`location`/phraseSets` Speech-to-Text supports
320
+ # three locations: `global`, `us` (US North America), and `eu` (Europe). If you
321
+ # are calling the `speech.googleapis.com` endpoint, use the `global` location.
322
+ # To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
323
+ # with matching `us` or `eu` location value.
324
+ # @param [Google::Apis::SpeechV1::CreatePhraseSetRequest] create_phrase_set_request_object
325
+ # @param [String] fields
326
+ # Selector specifying which fields to include in a partial response.
327
+ # @param [String] quota_user
328
+ # Available to use for quota purposes for server-side applications. Can be any
329
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::SpeechV1::PhraseSet] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::SpeechV1::PhraseSet]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def create_phrase_set(parent, create_phrase_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
343
+ command = make_simple_command(:post, 'v1/{+parent}/phraseSets', options)
344
+ command.request_representation = Google::Apis::SpeechV1::CreatePhraseSetRequest::Representation
345
+ command.request_object = create_phrase_set_request_object
346
+ command.response_representation = Google::Apis::SpeechV1::PhraseSet::Representation
347
+ command.response_class = Google::Apis::SpeechV1::PhraseSet
348
+ command.params['parent'] = parent unless parent.nil?
349
+ command.query['fields'] = fields unless fields.nil?
350
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
351
+ execute_or_queue_command(command, &block)
352
+ end
353
+
354
+ # Delete a phrase set.
355
+ # @param [String] name
356
+ # Required. The name of the phrase set to delete. Format: `projects/`project`/
357
+ # locations/`location`/phraseSets/`phrase_set``
358
+ # @param [String] fields
359
+ # Selector specifying which fields to include in a partial response.
360
+ # @param [String] quota_user
361
+ # Available to use for quota purposes for server-side applications. Can be any
362
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
363
+ # @param [Google::Apis::RequestOptions] options
364
+ # Request-specific options
365
+ #
366
+ # @yield [result, err] Result & error if block supplied
367
+ # @yieldparam result [Google::Apis::SpeechV1::Empty] parsed result object
368
+ # @yieldparam err [StandardError] error object if request failed
369
+ #
370
+ # @return [Google::Apis::SpeechV1::Empty]
371
+ #
372
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
373
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
374
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
375
+ def delete_project_location_phrase_set(name, fields: nil, quota_user: nil, options: nil, &block)
376
+ command = make_simple_command(:delete, 'v1/{+name}', options)
377
+ command.response_representation = Google::Apis::SpeechV1::Empty::Representation
378
+ command.response_class = Google::Apis::SpeechV1::Empty
379
+ command.params['name'] = name unless name.nil?
380
+ command.query['fields'] = fields unless fields.nil?
381
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
382
+ execute_or_queue_command(command, &block)
383
+ end
384
+
385
+ # Get a phrase set.
386
+ # @param [String] name
387
+ # Required. The name of the phrase set to retrieve. Format: `projects/`project`/
388
+ # locations/`location`/phraseSets/`phrase_set`` Speech-to-Text supports three
389
+ # locations: `global`, `us` (US North America), and `eu` (Europe). If you are
390
+ # calling the `speech.googleapis.com` endpoint, use the `global` location. To
391
+ # specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
392
+ # with matching `us` or `eu` location value.
393
+ # @param [String] fields
394
+ # Selector specifying which fields to include in a partial response.
395
+ # @param [String] quota_user
396
+ # Available to use for quota purposes for server-side applications. Can be any
397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
398
+ # @param [Google::Apis::RequestOptions] options
399
+ # Request-specific options
400
+ #
401
+ # @yield [result, err] Result & error if block supplied
402
+ # @yieldparam result [Google::Apis::SpeechV1::PhraseSet] parsed result object
403
+ # @yieldparam err [StandardError] error object if request failed
404
+ #
405
+ # @return [Google::Apis::SpeechV1::PhraseSet]
406
+ #
407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
410
+ def get_project_location_phrase_set(name, fields: nil, quota_user: nil, options: nil, &block)
411
+ command = make_simple_command(:get, 'v1/{+name}', options)
412
+ command.response_representation = Google::Apis::SpeechV1::PhraseSet::Representation
413
+ command.response_class = Google::Apis::SpeechV1::PhraseSet
414
+ command.params['name'] = name unless name.nil?
415
+ command.query['fields'] = fields unless fields.nil?
416
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
417
+ execute_or_queue_command(command, &block)
418
+ end
419
+
420
+ # List phrase sets.
421
+ # @param [String] parent
422
+ # Required. The parent, which owns this collection of phrase set. Format: `
423
+ # projects/`project`/locations/`location`` Speech-to-Text supports three
424
+ # locations: `global`, `us` (US North America), and `eu` (Europe). If you are
425
+ # calling the `speech.googleapis.com` endpoint, use the `global` location. To
426
+ # specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
427
+ # with matching `us` or `eu` location value.
428
+ # @param [Fixnum] page_size
429
+ # The maximum number of phrase sets to return. The service may return fewer than
430
+ # this value. If unspecified, at most 50 phrase sets will be returned. The
431
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
432
+ # @param [String] page_token
433
+ # A page token, received from a previous `ListPhraseSet` call. Provide this to
434
+ # retrieve the subsequent page. When paginating, all other parameters provided
435
+ # to `ListPhraseSet` must match the call that provided the page token.
436
+ # @param [String] fields
437
+ # Selector specifying which fields to include in a partial response.
438
+ # @param [String] quota_user
439
+ # Available to use for quota purposes for server-side applications. Can be any
440
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
441
+ # @param [Google::Apis::RequestOptions] options
442
+ # Request-specific options
443
+ #
444
+ # @yield [result, err] Result & error if block supplied
445
+ # @yieldparam result [Google::Apis::SpeechV1::ListPhraseSetResponse] parsed result object
446
+ # @yieldparam err [StandardError] error object if request failed
447
+ #
448
+ # @return [Google::Apis::SpeechV1::ListPhraseSetResponse]
449
+ #
450
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
451
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
452
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
453
+ def list_project_location_phrase_sets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
454
+ command = make_simple_command(:get, 'v1/{+parent}/phraseSets', options)
455
+ command.response_representation = Google::Apis::SpeechV1::ListPhraseSetResponse::Representation
456
+ command.response_class = Google::Apis::SpeechV1::ListPhraseSetResponse
457
+ command.params['parent'] = parent unless parent.nil?
458
+ command.query['pageSize'] = page_size unless page_size.nil?
459
+ command.query['pageToken'] = page_token unless page_token.nil?
460
+ command.query['fields'] = fields unless fields.nil?
461
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
462
+ execute_or_queue_command(command, &block)
463
+ end
464
+
465
+ # Update a phrase set.
466
+ # @param [String] name
467
+ # The resource name of the phrase set.
468
+ # @param [Google::Apis::SpeechV1::PhraseSet] phrase_set_object
469
+ # @param [String] update_mask
470
+ # The list of fields to be updated.
471
+ # @param [String] fields
472
+ # Selector specifying which fields to include in a partial response.
473
+ # @param [String] quota_user
474
+ # Available to use for quota purposes for server-side applications. Can be any
475
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
476
+ # @param [Google::Apis::RequestOptions] options
477
+ # Request-specific options
478
+ #
479
+ # @yield [result, err] Result & error if block supplied
480
+ # @yieldparam result [Google::Apis::SpeechV1::PhraseSet] parsed result object
481
+ # @yieldparam err [StandardError] error object if request failed
482
+ #
483
+ # @return [Google::Apis::SpeechV1::PhraseSet]
484
+ #
485
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
486
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
487
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
488
+ def patch_project_location_phrase_set(name, phrase_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
489
+ command = make_simple_command(:patch, 'v1/{+name}', options)
490
+ command.request_representation = Google::Apis::SpeechV1::PhraseSet::Representation
491
+ command.request_object = phrase_set_object
492
+ command.response_representation = Google::Apis::SpeechV1::PhraseSet::Representation
493
+ command.response_class = Google::Apis::SpeechV1::PhraseSet
494
+ command.params['name'] = name unless name.nil?
495
+ command.query['updateMask'] = update_mask unless update_mask.nil?
496
+ command.query['fields'] = fields unless fields.nil?
497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
498
+ execute_or_queue_command(command, &block)
499
+ end
500
+
129
501
  # Performs asynchronous speech recognition: receive results via the google.
130
502
  # longrunning.Operations interface. Returns either an `Operation.error` or an `
131
503
  # Operation.response` which contains a `LongRunningRecognizeResponse` message.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-speech_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-27 00:00:00.000000000 Z
11
+ date: 2022-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-speech_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-speech_v1/v0.11.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-speech_v1/v0.15.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-speech_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.2.17
78
+ rubygems_version: 3.3.4
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Speech-to-Text API V1