google-apis-speech_v1 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/google/apis/speech_v1/classes.rb +328 -0
- data/lib/google/apis/speech_v1/gem_version.rb +2 -2
- data/lib/google/apis/speech_v1/representations.rb +152 -0
- data/lib/google/apis/speech_v1/service.rb +348 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1519e5aeecdd72e81d8c1ab775167db99dcce91144e377df1309c7d93cb08eda
|
4
|
+
data.tar.gz: 666c649bc22d2a860ac1f6d9acd272087adabb04bb09ca44b8f314b8113b7537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f9b994619f4c2b802b187fdb4a7f951486a0a9c17a4b89c531a62cee7f762dee24af8708b56bf8130f1bfea7630c2e41909752d03d48cba17e5d7696c052c1a
|
7
|
+
data.tar.gz: f5af1f125f2b9eecc891b78f2f99cca70eb5c83eb33250dabb8e43874cb0ea44a55209a9de4533401464c98be55885c19c718180611f11fdb89cb55a48b8093d
|
data/CHANGELOG.md
CHANGED
@@ -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,94 @@ 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``).
|
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
|
+
|
235
502
|
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
236
503
|
# Either `content` or `uri` must be supplied. Supplying both or neither returns
|
237
504
|
# google.rpc.Code.INVALID_ARGUMENT. See [content limits](https://cloud.google.
|
@@ -273,6 +540,11 @@ module Google
|
|
273
540
|
class RecognitionConfig
|
274
541
|
include Google::Apis::Core::Hashable
|
275
542
|
|
543
|
+
# Speech adaptation configuration.
|
544
|
+
# Corresponds to the JSON property `adaptation`
|
545
|
+
# @return [Google::Apis::SpeechV1::SpeechAdaptation]
|
546
|
+
attr_accessor :adaptation
|
547
|
+
|
276
548
|
# A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.
|
277
549
|
# txt) language tags, listing possible alternative languages of the supplied
|
278
550
|
# audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/
|
@@ -444,6 +716,7 @@ module Google
|
|
444
716
|
|
445
717
|
# Update properties of this object
|
446
718
|
def update!(**args)
|
719
|
+
@adaptation = args[:adaptation] if args.key?(:adaptation)
|
447
720
|
@alternative_language_codes = args[:alternative_language_codes] if args.key?(:alternative_language_codes)
|
448
721
|
@audio_channel_count = args[:audio_channel_count] if args.key?(:audio_channel_count)
|
449
722
|
@diarization_config = args[:diarization_config] if args.key?(:diarization_config)
|
@@ -634,11 +907,59 @@ module Google
|
|
634
907
|
end
|
635
908
|
end
|
636
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
|
+
|
637
946
|
# Provides "hints" to the speech recognizer to favor specific words and phrases
|
638
947
|
# in the results.
|
639
948
|
class SpeechContext
|
640
949
|
include Google::Apis::Core::Hashable
|
641
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
|
+
|
642
963
|
# A list of strings containing words and phrases "hints" so that the speech
|
643
964
|
# recognition is more likely to recognize them. This can be used to improve the
|
644
965
|
# accuracy for specific words and phrases, for example, if specific commands are
|
@@ -659,6 +980,7 @@ module Google
|
|
659
980
|
|
660
981
|
# Update properties of this object
|
661
982
|
def update!(**args)
|
983
|
+
@boost = args[:boost] if args.key?(:boost)
|
662
984
|
@phrases = args[:phrases] if args.key?(:phrases)
|
663
985
|
end
|
664
986
|
end
|
@@ -727,6 +1049,11 @@ module Google
|
|
727
1049
|
# @return [String]
|
728
1050
|
attr_accessor :language_code
|
729
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
|
+
|
730
1057
|
def initialize(**args)
|
731
1058
|
update!(**args)
|
732
1059
|
end
|
@@ -736,6 +1063,7 @@ module Google
|
|
736
1063
|
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
737
1064
|
@channel_tag = args[:channel_tag] if args.key?(:channel_tag)
|
738
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)
|
739
1067
|
end
|
740
1068
|
end
|
741
1069
|
|
@@ -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.
|
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 = "
|
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
|
@@ -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,6 +328,8 @@ 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
|
@@ -258,9 +397,21 @@ module Google
|
|
258
397
|
end
|
259
398
|
end
|
260
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
|
+
|
261
411
|
class SpeechContext
|
262
412
|
# @private
|
263
413
|
class Representation < Google::Apis::Core::JsonRepresentation
|
414
|
+
property :boost, as: 'boost'
|
264
415
|
collection :phrases, as: 'phrases'
|
265
416
|
end
|
266
417
|
end
|
@@ -282,6 +433,7 @@ module Google
|
|
282
433
|
|
283
434
|
property :channel_tag, as: 'channelTag'
|
284
435
|
property :language_code, as: 'languageCode'
|
436
|
+
property :result_end_time, as: 'resultEndTime'
|
285
437
|
end
|
286
438
|
end
|
287
439
|
|
@@ -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.
|
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-11-
|
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
|
@@ -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.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-speech_v1/v0.13.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: []
|