google-apis-speech_v1 0.9.0 → 0.13.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: f807af6e038e45e577b4240d8e9e0f96a87b3a14e31694ed3d0aac556f35178f
4
- data.tar.gz: 1281eac42ad8b46e24a61c43fa560152d5451112542fab646195a07f215995b0
3
+ metadata.gz: 1519e5aeecdd72e81d8c1ab775167db99dcce91144e377df1309c7d93cb08eda
4
+ data.tar.gz: 666c649bc22d2a860ac1f6d9acd272087adabb04bb09ca44b8f314b8113b7537
5
5
  SHA512:
6
- metadata.gz: 3d43c57d8ff169565e08a4c27e15560c96f93ffd9b033c230f4031b3ec8977448bbb1960e0ded90a36534ec07f7f29cce00ddc460ac3fa3366e6783dde298d6d
7
- data.tar.gz: fcdaf253c475a26ce58f9463358edf57450f31e4db983c4f2541f4022f38ff3e7ffcbb3d4c81154cc780b86bde245d772d0360baf5f31642e9a9c3b9b80d807b
6
+ metadata.gz: 4f9b994619f4c2b802b187fdb4a7f951486a0a9c17a4b89c531a62cee7f762dee24af8708b56bf8130f1bfea7630c2e41909752d03d48cba17e5d7696c052c1a
7
+ data.tar.gz: f5af1f125f2b9eecc891b78f2f99cca70eb5c83eb33250dabb8e43874cb0ea44a55209a9de4533401464c98be55885c19c718180611f11fdb89cb55a48b8093d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Release history for google-apis-speech_v1
2
2
 
3
+ ### v0.13.0 (2021-11-12)
4
+
5
+ * Regenerated from discovery document revision 20211104
6
+
7
+ ### v0.12.0 (2021-10-29)
8
+
9
+ * Regenerated from discovery document revision 20211021
10
+
11
+ ### v0.11.0 (2021-10-22)
12
+
13
+ * Regenerated from discovery document revision 20211008
14
+ * Unspecified changes
15
+
16
+ ### v0.10.0 (2021-10-08)
17
+
18
+ * Regenerated from discovery document revision 20210929
19
+
3
20
  ### v0.9.0 (2021-09-03)
4
21
 
5
22
  * Regenerated from discovery document revision 20210825
data/OVERVIEW.md CHANGED
@@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
60
60
 
61
61
  More detailed descriptions of the Google simple REST clients are available in two documents.
62
62
 
63
- * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
- * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
65
 
66
66
  (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Speech service in particular.)
67
67
 
@@ -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.
@@ -131,6 +310,21 @@ module Google
131
310
  class LongRunningRecognizeResponse
132
311
  include Google::Apis::Core::Hashable
133
312
 
313
+ # Specifies an optional destination for the recognition results.
314
+ # Corresponds to the JSON property `outputConfig`
315
+ # @return [Google::Apis::SpeechV1::TranscriptOutputConfig]
316
+ attr_accessor :output_config
317
+
318
+ # The `Status` type defines a logical error model that is suitable for different
319
+ # programming environments, including REST APIs and RPC APIs. It is used by [
320
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
321
+ # data: error code, error message, and error details. You can find out more
322
+ # about this error model and how to work with it in the [API Design Guide](https:
323
+ # //cloud.google.com/apis/design/errors).
324
+ # Corresponds to the JSON property `outputError`
325
+ # @return [Google::Apis::SpeechV1::Status]
326
+ attr_accessor :output_error
327
+
134
328
  # Sequential list of transcription results corresponding to sequential portions
135
329
  # of audio.
136
330
  # Corresponds to the JSON property `results`
@@ -148,6 +342,8 @@ module Google
148
342
 
149
343
  # Update properties of this object
150
344
  def update!(**args)
345
+ @output_config = args[:output_config] if args.key?(:output_config)
346
+ @output_error = args[:output_error] if args.key?(:output_error)
151
347
  @results = args[:results] if args.key?(:results)
152
348
  @total_billed_time = args[:total_billed_time] if args.key?(:total_billed_time)
153
349
  end
@@ -215,6 +411,94 @@ module Google
215
411
  end
216
412
  end
217
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``).
431
+ class Phrase
432
+ include Google::Apis::Core::Hashable
433
+
434
+ # Hint Boost. Overrides the boost set at the phrase set level. Positive value
435
+ # will increase the probability that a specific phrase will be recognized over
436
+ # other similar sounding phrases. The higher the boost, the higher the chance of
437
+ # false positive recognition as well. Negative boost will simply be ignored.
438
+ # Though `boost` can accept a wide range of positive values, most use cases are
439
+ # best served with values between 0 and 20. We recommend using a binary search
440
+ # approach to finding the optimal value for your use case. Speech recognition
441
+ # will skip PhraseSets with a boost value of 0.
442
+ # Corresponds to the JSON property `boost`
443
+ # @return [Float]
444
+ attr_accessor :boost
445
+
446
+ # The phrase itself.
447
+ # Corresponds to the JSON property `value`
448
+ # @return [String]
449
+ attr_accessor :value
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @boost = args[:boost] if args.key?(:boost)
458
+ @value = args[:value] if args.key?(:value)
459
+ end
460
+ end
461
+
462
+ # Provides "hints" to the speech recognizer to favor specific words and phrases
463
+ # in the results.
464
+ class PhraseSet
465
+ include Google::Apis::Core::Hashable
466
+
467
+ # Hint Boost. Positive value will increase the probability that a specific
468
+ # phrase will be recognized over other similar sounding phrases. The higher the
469
+ # boost, the higher the chance of false positive recognition as well. Negative
470
+ # boost values would correspond to anti-biasing. Anti-biasing is not enabled, so
471
+ # negative boost will simply be ignored. Though `boost` can accept a wide range
472
+ # of positive values, most use cases are best served with values between 0 (
473
+ # exclusive) and 20. We recommend using a binary search approach to finding the
474
+ # optimal value for your use case. Speech recognition will skip PhraseSets with
475
+ # a boost value of 0.
476
+ # Corresponds to the JSON property `boost`
477
+ # @return [Float]
478
+ attr_accessor :boost
479
+
480
+ # The resource name of the phrase set.
481
+ # Corresponds to the JSON property `name`
482
+ # @return [String]
483
+ attr_accessor :name
484
+
485
+ # A list of word and phrases.
486
+ # Corresponds to the JSON property `phrases`
487
+ # @return [Array<Google::Apis::SpeechV1::Phrase>]
488
+ attr_accessor :phrases
489
+
490
+ def initialize(**args)
491
+ update!(**args)
492
+ end
493
+
494
+ # Update properties of this object
495
+ def update!(**args)
496
+ @boost = args[:boost] if args.key?(:boost)
497
+ @name = args[:name] if args.key?(:name)
498
+ @phrases = args[:phrases] if args.key?(:phrases)
499
+ end
500
+ end
501
+
218
502
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
219
503
  # Either `content` or `uri` must be supplied. Supplying both or neither returns
220
504
  # google.rpc.Code.INVALID_ARGUMENT. See [content limits](https://cloud.google.
@@ -256,6 +540,25 @@ module Google
256
540
  class RecognitionConfig
257
541
  include Google::Apis::Core::Hashable
258
542
 
543
+ # Speech adaptation configuration.
544
+ # Corresponds to the JSON property `adaptation`
545
+ # @return [Google::Apis::SpeechV1::SpeechAdaptation]
546
+ attr_accessor :adaptation
547
+
548
+ # A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.
549
+ # txt) language tags, listing possible alternative languages of the supplied
550
+ # audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/
551
+ # languages) for a list of the currently supported language codes. If
552
+ # alternative languages are listed, recognition result will contain recognition
553
+ # in the most likely language detected including the main language_code. The
554
+ # recognition result will include the language tag of the language detected in
555
+ # the audio. Note: This feature is only supported for Voice Command and Voice
556
+ # Search use cases and performance may vary for other use cases (e.g., phone
557
+ # call transcription).
558
+ # Corresponds to the JSON property `alternativeLanguageCodes`
559
+ # @return [Array<String>]
560
+ attr_accessor :alternative_language_codes
561
+
259
562
  # The number of channels in the input audio data. ONLY set this for MULTI-
260
563
  # CHANNEL recognition. Valid values for LINEAR16 and FLAC are `1`-`8`. Valid
261
564
  # values for OGG_OPUS are '1'-'254'. Valid value for MULAW, AMR, AMR_WB and
@@ -292,6 +595,34 @@ module Google
292
595
  attr_accessor :enable_separate_recognition_per_channel
293
596
  alias_method :enable_separate_recognition_per_channel?, :enable_separate_recognition_per_channel
294
597
 
598
+ # The spoken emoji behavior for the call If not set, uses default behavior based
599
+ # on model of choice If 'true', adds spoken emoji formatting for the request.
600
+ # This will replace spoken emojis with the corresponding Unicode symbols in the
601
+ # final transcript. If 'false', spoken emojis are not replaced.
602
+ # Corresponds to the JSON property `enableSpokenEmojis`
603
+ # @return [Boolean]
604
+ attr_accessor :enable_spoken_emojis
605
+ alias_method :enable_spoken_emojis?, :enable_spoken_emojis
606
+
607
+ # The spoken punctuation behavior for the call If not set, uses default behavior
608
+ # based on model of choice e.g. command_and_search will enable spoken
609
+ # punctuation by default If 'true', replaces spoken punctuation with the
610
+ # corresponding symbols in the request. For example, "how are you question mark"
611
+ # becomes "how are you?". See https://cloud.google.com/speech-to-text/docs/
612
+ # spoken-punctuation for support. If 'false', spoken punctuation is not replaced.
613
+ # Corresponds to the JSON property `enableSpokenPunctuation`
614
+ # @return [Boolean]
615
+ attr_accessor :enable_spoken_punctuation
616
+ alias_method :enable_spoken_punctuation?, :enable_spoken_punctuation
617
+
618
+ # If `true`, the top result includes a list of words and the confidence for
619
+ # those words. If `false`, no word-level confidence information is returned. The
620
+ # default is `false`.
621
+ # Corresponds to the JSON property `enableWordConfidence`
622
+ # @return [Boolean]
623
+ attr_accessor :enable_word_confidence
624
+ alias_method :enable_word_confidence?, :enable_word_confidence
625
+
295
626
  # If `true`, the top result includes a list of words and the start and end time
296
627
  # offsets (timestamps) for those words. If `false`, no word-level time offset
297
628
  # information is returned. The default is `false`.
@@ -385,10 +716,15 @@ module Google
385
716
 
386
717
  # Update properties of this object
387
718
  def update!(**args)
719
+ @adaptation = args[:adaptation] if args.key?(:adaptation)
720
+ @alternative_language_codes = args[:alternative_language_codes] if args.key?(:alternative_language_codes)
388
721
  @audio_channel_count = args[:audio_channel_count] if args.key?(:audio_channel_count)
389
722
  @diarization_config = args[:diarization_config] if args.key?(:diarization_config)
390
723
  @enable_automatic_punctuation = args[:enable_automatic_punctuation] if args.key?(:enable_automatic_punctuation)
391
724
  @enable_separate_recognition_per_channel = args[:enable_separate_recognition_per_channel] if args.key?(:enable_separate_recognition_per_channel)
725
+ @enable_spoken_emojis = args[:enable_spoken_emojis] if args.key?(:enable_spoken_emojis)
726
+ @enable_spoken_punctuation = args[:enable_spoken_punctuation] if args.key?(:enable_spoken_punctuation)
727
+ @enable_word_confidence = args[:enable_word_confidence] if args.key?(:enable_word_confidence)
392
728
  @enable_word_time_offsets = args[:enable_word_time_offsets] if args.key?(:enable_word_time_offsets)
393
729
  @encoding = args[:encoding] if args.key?(:encoding)
394
730
  @language_code = args[:language_code] if args.key?(:language_code)
@@ -571,11 +907,59 @@ module Google
571
907
  end
572
908
  end
573
909
 
910
+ # Speech adaptation configuration.
911
+ class SpeechAdaptation
912
+ include Google::Apis::Core::Hashable
913
+
914
+ # A collection of custom classes. To specify the classes inline, leave the class'
915
+ # `name` blank and fill in the rest of its fields, giving it a unique `
916
+ # custom_class_id`. Refer to the inline defined class in phrase hints by its `
917
+ # custom_class_id`.
918
+ # Corresponds to the JSON property `customClasses`
919
+ # @return [Array<Google::Apis::SpeechV1::CustomClass>]
920
+ attr_accessor :custom_classes
921
+
922
+ # A collection of phrase set resource names to use.
923
+ # Corresponds to the JSON property `phraseSetReferences`
924
+ # @return [Array<String>]
925
+ attr_accessor :phrase_set_references
926
+
927
+ # A collection of phrase sets. To specify the hints inline, leave the phrase set'
928
+ # s `name` blank and fill in the rest of its fields. Any phrase set can use any
929
+ # custom class.
930
+ # Corresponds to the JSON property `phraseSets`
931
+ # @return [Array<Google::Apis::SpeechV1::PhraseSet>]
932
+ attr_accessor :phrase_sets
933
+
934
+ def initialize(**args)
935
+ update!(**args)
936
+ end
937
+
938
+ # Update properties of this object
939
+ def update!(**args)
940
+ @custom_classes = args[:custom_classes] if args.key?(:custom_classes)
941
+ @phrase_set_references = args[:phrase_set_references] if args.key?(:phrase_set_references)
942
+ @phrase_sets = args[:phrase_sets] if args.key?(:phrase_sets)
943
+ end
944
+ end
945
+
574
946
  # Provides "hints" to the speech recognizer to favor specific words and phrases
575
947
  # in the results.
576
948
  class SpeechContext
577
949
  include Google::Apis::Core::Hashable
578
950
 
951
+ # Hint Boost. Positive value will increase the probability that a specific
952
+ # phrase will be recognized over other similar sounding phrases. The higher the
953
+ # boost, the higher the chance of false positive recognition as well. Negative
954
+ # boost values would correspond to anti-biasing. Anti-biasing is not enabled, so
955
+ # negative boost will simply be ignored. Though `boost` can accept a wide range
956
+ # of positive values, most use cases are best served with values between 0 and
957
+ # 20. We recommend using a binary search approach to finding the optimal value
958
+ # for your use case.
959
+ # Corresponds to the JSON property `boost`
960
+ # @return [Float]
961
+ attr_accessor :boost
962
+
579
963
  # A list of strings containing words and phrases "hints" so that the speech
580
964
  # recognition is more likely to recognize them. This can be used to improve the
581
965
  # accuracy for specific words and phrases, for example, if specific commands are
@@ -596,6 +980,7 @@ module Google
596
980
 
597
981
  # Update properties of this object
598
982
  def update!(**args)
983
+ @boost = args[:boost] if args.key?(:boost)
599
984
  @phrases = args[:phrases] if args.key?(:phrases)
600
985
  end
601
986
  end
@@ -657,6 +1042,18 @@ module Google
657
1042
  # @return [Fixnum]
658
1043
  attr_accessor :channel_tag
659
1044
 
1045
+ # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
1046
+ # language tag of the language in this result. This language code was detected
1047
+ # to have the most likelihood of being spoken in the audio.
1048
+ # Corresponds to the JSON property `languageCode`
1049
+ # @return [String]
1050
+ attr_accessor :language_code
1051
+
1052
+ # Time offset of the end of this result relative to the beginning of the audio.
1053
+ # Corresponds to the JSON property `resultEndTime`
1054
+ # @return [String]
1055
+ attr_accessor :result_end_time
1056
+
660
1057
  def initialize(**args)
661
1058
  update!(**args)
662
1059
  end
@@ -665,6 +1062,8 @@ module Google
665
1062
  def update!(**args)
666
1063
  @alternatives = args[:alternatives] if args.key?(:alternatives)
667
1064
  @channel_tag = args[:channel_tag] if args.key?(:channel_tag)
1065
+ @language_code = args[:language_code] if args.key?(:language_code)
1066
+ @result_end_time = args[:result_end_time] if args.key?(:result_end_time)
668
1067
  end
669
1068
  end
670
1069
 
@@ -732,6 +1131,16 @@ module Google
732
1131
  class WordInfo
733
1132
  include Google::Apis::Core::Hashable
734
1133
 
1134
+ # The confidence estimate between 0.0 and 1.0. A higher number indicates an
1135
+ # estimated greater likelihood that the recognized words are correct. This field
1136
+ # is set only for the top alternative of a non-streaming result or, of a
1137
+ # streaming result where `is_final=true`. This field is not guaranteed to be
1138
+ # accurate and users should not rely on it to be always provided. The default of
1139
+ # 0.0 is a sentinel value indicating `confidence` was not set.
1140
+ # Corresponds to the JSON property `confidence`
1141
+ # @return [Float]
1142
+ attr_accessor :confidence
1143
+
735
1144
  # Time offset relative to the beginning of the audio, and corresponding to the
736
1145
  # end of the spoken word. This field is only set if `enable_word_time_offsets=
737
1146
  # true` and only in the top hypothesis. This is an experimental feature and the
@@ -768,6 +1177,7 @@ module Google
768
1177
 
769
1178
  # Update properties of this object
770
1179
  def update!(**args)
1180
+ @confidence = args[:confidence] if args.key?(:confidence)
771
1181
  @end_time = args[:end_time] if args.key?(:end_time)
772
1182
  @speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
773
1183
  @start_time = args[:start_time] if args.key?(:start_time)
@@ -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.9.0"
19
+ GEM_VERSION = "0.13.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 = "20210825"
25
+ REVISION = "20211104"
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
@@ -158,6 +277,10 @@ module Google
158
277
  class LongRunningRecognizeResponse
159
278
  # @private
160
279
  class Representation < Google::Apis::Core::JsonRepresentation
280
+ property :output_config, as: 'outputConfig', class: Google::Apis::SpeechV1::TranscriptOutputConfig, decorator: Google::Apis::SpeechV1::TranscriptOutputConfig::Representation
281
+
282
+ property :output_error, as: 'outputError', class: Google::Apis::SpeechV1::Status, decorator: Google::Apis::SpeechV1::Status::Representation
283
+
161
284
  collection :results, as: 'results', class: Google::Apis::SpeechV1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1::SpeechRecognitionResult::Representation
162
285
 
163
286
  property :total_billed_time, as: 'totalBilledTime'
@@ -176,6 +299,24 @@ module Google
176
299
  end
177
300
  end
178
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
+
179
320
  class RecognitionAudio
180
321
  # @private
181
322
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -187,11 +328,17 @@ module Google
187
328
  class RecognitionConfig
188
329
  # @private
189
330
  class Representation < Google::Apis::Core::JsonRepresentation
331
+ property :adaptation, as: 'adaptation', class: Google::Apis::SpeechV1::SpeechAdaptation, decorator: Google::Apis::SpeechV1::SpeechAdaptation::Representation
332
+
333
+ collection :alternative_language_codes, as: 'alternativeLanguageCodes'
190
334
  property :audio_channel_count, as: 'audioChannelCount'
191
335
  property :diarization_config, as: 'diarizationConfig', class: Google::Apis::SpeechV1::SpeakerDiarizationConfig, decorator: Google::Apis::SpeechV1::SpeakerDiarizationConfig::Representation
192
336
 
193
337
  property :enable_automatic_punctuation, as: 'enableAutomaticPunctuation'
194
338
  property :enable_separate_recognition_per_channel, as: 'enableSeparateRecognitionPerChannel'
339
+ property :enable_spoken_emojis, as: 'enableSpokenEmojis'
340
+ property :enable_spoken_punctuation, as: 'enableSpokenPunctuation'
341
+ property :enable_word_confidence, as: 'enableWordConfidence'
195
342
  property :enable_word_time_offsets, as: 'enableWordTimeOffsets'
196
343
  property :encoding, as: 'encoding'
197
344
  property :language_code, as: 'languageCode'
@@ -250,9 +397,21 @@ module Google
250
397
  end
251
398
  end
252
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
+
253
411
  class SpeechContext
254
412
  # @private
255
413
  class Representation < Google::Apis::Core::JsonRepresentation
414
+ property :boost, as: 'boost'
256
415
  collection :phrases, as: 'phrases'
257
416
  end
258
417
  end
@@ -273,6 +432,8 @@ module Google
273
432
  collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1::SpeechRecognitionAlternative::Representation
274
433
 
275
434
  property :channel_tag, as: 'channelTag'
435
+ property :language_code, as: 'languageCode'
436
+ property :result_end_time, as: 'resultEndTime'
276
437
  end
277
438
  end
278
439
 
@@ -295,6 +456,7 @@ module Google
295
456
  class WordInfo
296
457
  # @private
297
458
  class Representation < Google::Apis::Core::JsonRepresentation
459
+ property :confidence, as: 'confidence'
298
460
  property :end_time, as: 'endTime'
299
461
  property :speaker_tag, as: 'speakerTag'
300
462
  property :start_time, as: 'startTime'
@@ -126,6 +126,354 @@ 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
+ # `api_version`/projects/`project`/locations/`location`/customClasses
133
+ # @param [Google::Apis::SpeechV1::CreateCustomClassRequest] create_custom_class_request_object
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::SpeechV1::CustomClass] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::SpeechV1::CustomClass]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def create_custom_class(parent, create_custom_class_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:post, 'v1/{+parent}/customClasses', options)
153
+ command.request_representation = Google::Apis::SpeechV1::CreateCustomClassRequest::Representation
154
+ command.request_object = create_custom_class_request_object
155
+ command.response_representation = Google::Apis::SpeechV1::CustomClass::Representation
156
+ command.response_class = Google::Apis::SpeechV1::CustomClass
157
+ command.params['parent'] = parent unless parent.nil?
158
+ command.query['fields'] = fields unless fields.nil?
159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
160
+ execute_or_queue_command(command, &block)
161
+ end
162
+
163
+ # Delete a custom class.
164
+ # @param [String] name
165
+ # Required. The name of the custom class to delete. Format: `api_version`/
166
+ # projects/`project`/locations/`location`/customClasses/`custom_class`
167
+ # @param [String] fields
168
+ # Selector specifying which fields to include in a partial response.
169
+ # @param [String] quota_user
170
+ # Available to use for quota purposes for server-side applications. Can be any
171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172
+ # @param [Google::Apis::RequestOptions] options
173
+ # Request-specific options
174
+ #
175
+ # @yield [result, err] Result & error if block supplied
176
+ # @yieldparam result [Google::Apis::SpeechV1::Empty] parsed result object
177
+ # @yieldparam err [StandardError] error object if request failed
178
+ #
179
+ # @return [Google::Apis::SpeechV1::Empty]
180
+ #
181
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184
+ def delete_project_location_custom_class(name, fields: nil, quota_user: nil, options: nil, &block)
185
+ command = make_simple_command(:delete, 'v1/{+name}', options)
186
+ command.response_representation = Google::Apis::SpeechV1::Empty::Representation
187
+ command.response_class = Google::Apis::SpeechV1::Empty
188
+ command.params['name'] = name unless name.nil?
189
+ command.query['fields'] = fields unless fields.nil?
190
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
191
+ execute_or_queue_command(command, &block)
192
+ end
193
+
194
+ # Get a custom class.
195
+ # @param [String] name
196
+ # Required. The name of the custom class to retrieve. Format: `api_version`/
197
+ # projects/`project`/locations/`location`/customClasses/`custom_class`
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::SpeechV1::CustomClass] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::SpeechV1::CustomClass]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def get_project_location_custom_class(name, fields: nil, quota_user: nil, options: nil, &block)
216
+ command = make_simple_command(:get, 'v1/{+name}', options)
217
+ command.response_representation = Google::Apis::SpeechV1::CustomClass::Representation
218
+ command.response_class = Google::Apis::SpeechV1::CustomClass
219
+ command.params['name'] = name unless name.nil?
220
+ command.query['fields'] = fields unless fields.nil?
221
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ execute_or_queue_command(command, &block)
223
+ end
224
+
225
+ # List custom classes.
226
+ # @param [String] parent
227
+ # Required. The parent, which owns this collection of custom classes. Format: `
228
+ # api_version`/projects/`project`/locations/`location`/customClasses
229
+ # @param [Fixnum] page_size
230
+ # The maximum number of custom classes to return. The service may return fewer
231
+ # than this value. If unspecified, at most 50 custom classes will be returned.
232
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
233
+ # @param [String] page_token
234
+ # A page token, received from a previous `ListCustomClass` call. Provide this to
235
+ # retrieve the subsequent page. When paginating, all other parameters provided
236
+ # to `ListCustomClass` must match the call that provided the page token.
237
+ # @param [String] fields
238
+ # Selector specifying which fields to include in a partial response.
239
+ # @param [String] quota_user
240
+ # Available to use for quota purposes for server-side applications. Can be any
241
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
242
+ # @param [Google::Apis::RequestOptions] options
243
+ # Request-specific options
244
+ #
245
+ # @yield [result, err] Result & error if block supplied
246
+ # @yieldparam result [Google::Apis::SpeechV1::ListCustomClassesResponse] parsed result object
247
+ # @yieldparam err [StandardError] error object if request failed
248
+ #
249
+ # @return [Google::Apis::SpeechV1::ListCustomClassesResponse]
250
+ #
251
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
252
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
253
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
254
+ def list_project_location_custom_classes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
255
+ command = make_simple_command(:get, 'v1/{+parent}/customClasses', options)
256
+ command.response_representation = Google::Apis::SpeechV1::ListCustomClassesResponse::Representation
257
+ command.response_class = Google::Apis::SpeechV1::ListCustomClassesResponse
258
+ command.params['parent'] = parent unless parent.nil?
259
+ command.query['pageSize'] = page_size unless page_size.nil?
260
+ command.query['pageToken'] = page_token unless page_token.nil?
261
+ command.query['fields'] = fields unless fields.nil?
262
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
263
+ execute_or_queue_command(command, &block)
264
+ end
265
+
266
+ # Update a custom class.
267
+ # @param [String] name
268
+ # The resource name of the custom class.
269
+ # @param [Google::Apis::SpeechV1::CustomClass] custom_class_object
270
+ # @param [String] update_mask
271
+ # The list of fields to be updated.
272
+ # @param [String] fields
273
+ # Selector specifying which fields to include in a partial response.
274
+ # @param [String] quota_user
275
+ # Available to use for quota purposes for server-side applications. Can be any
276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
277
+ # @param [Google::Apis::RequestOptions] options
278
+ # Request-specific options
279
+ #
280
+ # @yield [result, err] Result & error if block supplied
281
+ # @yieldparam result [Google::Apis::SpeechV1::CustomClass] parsed result object
282
+ # @yieldparam err [StandardError] error object if request failed
283
+ #
284
+ # @return [Google::Apis::SpeechV1::CustomClass]
285
+ #
286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
289
+ def patch_project_location_custom_class(name, custom_class_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
290
+ command = make_simple_command(:patch, 'v1/{+name}', options)
291
+ command.request_representation = Google::Apis::SpeechV1::CustomClass::Representation
292
+ command.request_object = custom_class_object
293
+ command.response_representation = Google::Apis::SpeechV1::CustomClass::Representation
294
+ command.response_class = Google::Apis::SpeechV1::CustomClass
295
+ command.params['name'] = name unless name.nil?
296
+ command.query['updateMask'] = update_mask unless update_mask.nil?
297
+ command.query['fields'] = fields unless fields.nil?
298
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
299
+ execute_or_queue_command(command, &block)
300
+ end
301
+
302
+ # Create a set of phrase hints. Each item in the set can be a single word or a
303
+ # multi-word phrase. The items in the PhraseSet are favored by the recognition
304
+ # model when you send a call that includes the PhraseSet.
305
+ # @param [String] parent
306
+ # Required. The parent resource where this phrase set will be created. Format: `
307
+ # api_version`/projects/`project`/locations/`location`/phraseSets
308
+ # @param [Google::Apis::SpeechV1::CreatePhraseSetRequest] create_phrase_set_request_object
309
+ # @param [String] fields
310
+ # Selector specifying which fields to include in a partial response.
311
+ # @param [String] quota_user
312
+ # Available to use for quota purposes for server-side applications. Can be any
313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
314
+ # @param [Google::Apis::RequestOptions] options
315
+ # Request-specific options
316
+ #
317
+ # @yield [result, err] Result & error if block supplied
318
+ # @yieldparam result [Google::Apis::SpeechV1::PhraseSet] parsed result object
319
+ # @yieldparam err [StandardError] error object if request failed
320
+ #
321
+ # @return [Google::Apis::SpeechV1::PhraseSet]
322
+ #
323
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
324
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
325
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
326
+ def create_phrase_set(parent, create_phrase_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
327
+ command = make_simple_command(:post, 'v1/{+parent}/phraseSets', options)
328
+ command.request_representation = Google::Apis::SpeechV1::CreatePhraseSetRequest::Representation
329
+ command.request_object = create_phrase_set_request_object
330
+ command.response_representation = Google::Apis::SpeechV1::PhraseSet::Representation
331
+ command.response_class = Google::Apis::SpeechV1::PhraseSet
332
+ command.params['parent'] = parent unless parent.nil?
333
+ command.query['fields'] = fields unless fields.nil?
334
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
335
+ execute_or_queue_command(command, &block)
336
+ end
337
+
338
+ # Delete a phrase set.
339
+ # @param [String] name
340
+ # Required. The name of the phrase set to delete. Format: `api_version`/projects/
341
+ # `project`/locations/`location`/phraseSets/`phrase_set`
342
+ # @param [String] fields
343
+ # Selector specifying which fields to include in a partial response.
344
+ # @param [String] quota_user
345
+ # Available to use for quota purposes for server-side applications. Can be any
346
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
347
+ # @param [Google::Apis::RequestOptions] options
348
+ # Request-specific options
349
+ #
350
+ # @yield [result, err] Result & error if block supplied
351
+ # @yieldparam result [Google::Apis::SpeechV1::Empty] parsed result object
352
+ # @yieldparam err [StandardError] error object if request failed
353
+ #
354
+ # @return [Google::Apis::SpeechV1::Empty]
355
+ #
356
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
357
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
358
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
359
+ def delete_project_location_phrase_set(name, fields: nil, quota_user: nil, options: nil, &block)
360
+ command = make_simple_command(:delete, 'v1/{+name}', options)
361
+ command.response_representation = Google::Apis::SpeechV1::Empty::Representation
362
+ command.response_class = Google::Apis::SpeechV1::Empty
363
+ command.params['name'] = name unless name.nil?
364
+ command.query['fields'] = fields unless fields.nil?
365
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
366
+ execute_or_queue_command(command, &block)
367
+ end
368
+
369
+ # Get a phrase set.
370
+ # @param [String] name
371
+ # Required. The name of the phrase set to retrieve. Format: `api_version`/
372
+ # projects/`project`/locations/`location`/phraseSets/`phrase_set`
373
+ # @param [String] fields
374
+ # Selector specifying which fields to include in a partial response.
375
+ # @param [String] quota_user
376
+ # Available to use for quota purposes for server-side applications. Can be any
377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::SpeechV1::PhraseSet] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::SpeechV1::PhraseSet]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def get_project_location_phrase_set(name, fields: nil, quota_user: nil, options: nil, &block)
391
+ command = make_simple_command(:get, 'v1/{+name}', options)
392
+ command.response_representation = Google::Apis::SpeechV1::PhraseSet::Representation
393
+ command.response_class = Google::Apis::SpeechV1::PhraseSet
394
+ command.params['name'] = name unless name.nil?
395
+ command.query['fields'] = fields unless fields.nil?
396
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
397
+ execute_or_queue_command(command, &block)
398
+ end
399
+
400
+ # List phrase sets.
401
+ # @param [String] parent
402
+ # Required. The parent, which owns this collection of phrase set. Format:
403
+ # projects/`project`/locations/`location`
404
+ # @param [Fixnum] page_size
405
+ # The maximum number of phrase sets to return. The service may return fewer than
406
+ # this value. If unspecified, at most 50 phrase sets will be returned. The
407
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
408
+ # @param [String] page_token
409
+ # A page token, received from a previous `ListPhraseSet` call. Provide this to
410
+ # retrieve the subsequent page. When paginating, all other parameters provided
411
+ # to `ListPhraseSet` must match the call that provided the page token.
412
+ # @param [String] fields
413
+ # Selector specifying which fields to include in a partial response.
414
+ # @param [String] quota_user
415
+ # Available to use for quota purposes for server-side applications. Can be any
416
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
417
+ # @param [Google::Apis::RequestOptions] options
418
+ # Request-specific options
419
+ #
420
+ # @yield [result, err] Result & error if block supplied
421
+ # @yieldparam result [Google::Apis::SpeechV1::ListPhraseSetResponse] parsed result object
422
+ # @yieldparam err [StandardError] error object if request failed
423
+ #
424
+ # @return [Google::Apis::SpeechV1::ListPhraseSetResponse]
425
+ #
426
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
427
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
428
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
429
+ def list_project_location_phrase_sets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
430
+ command = make_simple_command(:get, 'v1/{+parent}/phraseSets', options)
431
+ command.response_representation = Google::Apis::SpeechV1::ListPhraseSetResponse::Representation
432
+ command.response_class = Google::Apis::SpeechV1::ListPhraseSetResponse
433
+ command.params['parent'] = parent unless parent.nil?
434
+ command.query['pageSize'] = page_size unless page_size.nil?
435
+ command.query['pageToken'] = page_token unless page_token.nil?
436
+ command.query['fields'] = fields unless fields.nil?
437
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
438
+ execute_or_queue_command(command, &block)
439
+ end
440
+
441
+ # Update a phrase set.
442
+ # @param [String] name
443
+ # The resource name of the phrase set.
444
+ # @param [Google::Apis::SpeechV1::PhraseSet] phrase_set_object
445
+ # @param [String] update_mask
446
+ # The list of fields to be updated.
447
+ # @param [String] fields
448
+ # Selector specifying which fields to include in a partial response.
449
+ # @param [String] quota_user
450
+ # Available to use for quota purposes for server-side applications. Can be any
451
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
452
+ # @param [Google::Apis::RequestOptions] options
453
+ # Request-specific options
454
+ #
455
+ # @yield [result, err] Result & error if block supplied
456
+ # @yieldparam result [Google::Apis::SpeechV1::PhraseSet] parsed result object
457
+ # @yieldparam err [StandardError] error object if request failed
458
+ #
459
+ # @return [Google::Apis::SpeechV1::PhraseSet]
460
+ #
461
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
462
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
463
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
464
+ def patch_project_location_phrase_set(name, phrase_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
465
+ command = make_simple_command(:patch, 'v1/{+name}', options)
466
+ command.request_representation = Google::Apis::SpeechV1::PhraseSet::Representation
467
+ command.request_object = phrase_set_object
468
+ command.response_representation = Google::Apis::SpeechV1::PhraseSet::Representation
469
+ command.response_class = Google::Apis::SpeechV1::PhraseSet
470
+ command.params['name'] = name unless name.nil?
471
+ command.query['updateMask'] = update_mask unless update_mask.nil?
472
+ command.query['fields'] = fields unless fields.nil?
473
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
474
+ execute_or_queue_command(command, &block)
475
+ end
476
+
129
477
  # Performs asynchronous speech recognition: receive results via the google.
130
478
  # longrunning.Operations interface. Returns either an `Operation.error` or an `
131
479
  # 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.9.0
4
+ version: 0.13.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-09-06 00:00:00.000000000 Z
11
+ date: 2021-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -57,9 +57,9 @@ licenses:
57
57
  - Apache-2.0
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
- changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-speech_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-speech_v1/v0.9.0
62
- source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-speech_v1
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.13.0
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: []
65
65
  require_paths: