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