google-api-client 0.9.25 → 0.9.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/api_names.yaml +279 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +110 -110
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +25 -25
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +145 -145
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +419 -419
- data/generated/google/apis/cloudbuild_v1/representations.rb +73 -73
- data/generated/google/apis/cloudbuild_v1/service.rb +86 -86
- data/generated/google/apis/cloudkms_v1beta1.rb +34 -0
- data/generated/google/apis/cloudkms_v1beta1/classes.rb +999 -0
- data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
- data/generated/google/apis/cloudkms_v1beta1/service.rb +932 -0
- data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +478 -478
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +96 -96
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +271 -271
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +353 -353
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +81 -81
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +299 -299
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +287 -16
- data/generated/google/apis/container_v1/representations.rb +113 -2
- data/generated/google/apis/container_v1/service.rb +130 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +8 -8
- data/generated/google/apis/genomics_v1/classes.rb +2259 -2257
- data/generated/google/apis/genomics_v1/representations.rb +461 -526
- data/generated/google/apis/genomics_v1/service.rb +1203 -1105
- data/generated/google/apis/gmail_v1.rb +1 -1
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +852 -852
- data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
- data/generated/google/apis/logging_v2beta1/service.rb +230 -230
- data/generated/google/apis/manufacturers_v1.rb +34 -0
- data/generated/google/apis/manufacturers_v1/classes.rb +258 -0
- data/generated/google/apis/manufacturers_v1/representations.rb +103 -0
- data/generated/google/apis/manufacturers_v1/service.rb +138 -0
- data/generated/google/apis/monitoring_v3.rb +7 -7
- data/generated/google/apis/monitoring_v3/classes.rb +744 -744
- data/generated/google/apis/monitoring_v3/representations.rb +164 -164
- data/generated/google/apis/monitoring_v3/service.rb +335 -335
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +3 -3
- data/generated/google/apis/pubsub_v1/classes.rb +325 -325
- data/generated/google/apis/pubsub_v1/representations.rb +80 -80
- data/generated/google/apis/pubsub_v1/service.rb +256 -256
- data/generated/google/apis/sheets_v4.rb +3 -3
- data/generated/google/apis/sheets_v4/classes.rb +4283 -4283
- data/generated/google/apis/sheets_v4/representations.rb +833 -833
- data/generated/google/apis/sheets_v4/service.rb +184 -184
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +213 -211
- data/generated/google/apis/speech_v1beta1/representations.rb +49 -49
- data/generated/google/apis/speech_v1beta1/service.rb +71 -71
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +20 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +861 -859
- data/generated/google/apis/vision_v1/representations.rb +140 -140
- data/generated/google/apis/vision_v1/service.rb +4 -4
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1/classes.rb +139 -139
- data/generated/google/apis/youtubereporting_v1/representations.rb +36 -36
- data/generated/google/apis/youtubereporting_v1/service.rb +152 -152
- data/lib/google/apis/version.rb +1 -1
- metadata +9 -1
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://cloud.google.com/speech/
|
26
26
|
module SpeechV1beta1
|
27
27
|
VERSION = 'V1beta1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20170125'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -22,110 +22,16 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module SpeechV1beta1
|
24
24
|
|
25
|
-
# The
|
26
|
-
|
27
|
-
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
28
|
-
# - Simple to use and understand for most users
|
29
|
-
# - Flexible enough to meet unexpected needs
|
30
|
-
# # Overview
|
31
|
-
# The `Status` message contains three pieces of data: error code, error message,
|
32
|
-
# and error details. The error code should be an enum value of
|
33
|
-
# google.rpc.Code, but it may accept additional error codes if needed. The
|
34
|
-
# error message should be a developer-facing English message that helps
|
35
|
-
# developers *understand* and *resolve* the error. If a localized user-facing
|
36
|
-
# error message is needed, put the localized message in the error details or
|
37
|
-
# localize it in the client. The optional error details may contain arbitrary
|
38
|
-
# information about the error. There is a predefined set of error detail types
|
39
|
-
# in the package `google.rpc` which can be used for common error conditions.
|
40
|
-
# # Language mapping
|
41
|
-
# The `Status` message is the logical representation of the error model, but it
|
42
|
-
# is not necessarily the actual wire format. When the `Status` message is
|
43
|
-
# exposed in different client libraries and different wire protocols, it can be
|
44
|
-
# mapped differently. For example, it will likely be mapped to some exceptions
|
45
|
-
# in Java, but more likely mapped to some error codes in C.
|
46
|
-
# # Other uses
|
47
|
-
# The error model and the `Status` message can be used in a variety of
|
48
|
-
# environments, either with or without APIs, to provide a
|
49
|
-
# consistent developer experience across different environments.
|
50
|
-
# Example uses of this error model include:
|
51
|
-
# - Partial errors. If a service needs to return partial errors to the client,
|
52
|
-
# it may embed the `Status` in the normal response to indicate the partial
|
53
|
-
# errors.
|
54
|
-
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
55
|
-
# have a `Status` message for error reporting purpose.
|
56
|
-
# - Batch operations. If a client uses batch request and batch response, the
|
57
|
-
# `Status` message should be used directly inside batch response, one for
|
58
|
-
# each error sub-response.
|
59
|
-
# - Asynchronous operations. If an API call embeds asynchronous operation
|
60
|
-
# results in its response, the status of those operations should be
|
61
|
-
# represented directly using the `Status` message.
|
62
|
-
# - Logging. If some API errors are stored in logs, the message `Status` could
|
63
|
-
# be used directly after any stripping needed for security/privacy reasons.
|
64
|
-
class Status
|
65
|
-
include Google::Apis::Core::Hashable
|
66
|
-
|
67
|
-
# The status code, which should be an enum value of google.rpc.Code.
|
68
|
-
# Corresponds to the JSON property `code`
|
69
|
-
# @return [Fixnum]
|
70
|
-
attr_accessor :code
|
71
|
-
|
72
|
-
# A list of messages that carry the error details. There will be a
|
73
|
-
# common set of message types for APIs to use.
|
74
|
-
# Corresponds to the JSON property `details`
|
75
|
-
# @return [Array<Hash<String,Object>>]
|
76
|
-
attr_accessor :details
|
77
|
-
|
78
|
-
# A developer-facing error message, which should be in English. Any
|
79
|
-
# user-facing error message should be localized and sent in the
|
80
|
-
# google.rpc.Status.details field, or localized by the client.
|
81
|
-
# Corresponds to the JSON property `message`
|
82
|
-
# @return [String]
|
83
|
-
attr_accessor :message
|
84
|
-
|
85
|
-
def initialize(**args)
|
86
|
-
update!(**args)
|
87
|
-
end
|
88
|
-
|
89
|
-
# Update properties of this object
|
90
|
-
def update!(**args)
|
91
|
-
@code = args[:code] if args.key?(:code)
|
92
|
-
@details = args[:details] if args.key?(:details)
|
93
|
-
@message = args[:message] if args.key?(:message)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
98
|
-
# Either `content` or `uri` must be supplied. Supplying both or neither
|
99
|
-
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
100
|
-
# [audio limits](https://cloud.google.com/speech/limits#content).
|
101
|
-
class RecognitionAudio
|
25
|
+
# The request message for Operations.CancelOperation.
|
26
|
+
class CancelOperationRequest
|
102
27
|
include Google::Apis::Core::Hashable
|
103
28
|
|
104
|
-
# The audio data bytes encoded as specified in
|
105
|
-
# `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
|
106
|
-
# pure binary representation, whereas JSON representations use base64.
|
107
|
-
# Corresponds to the JSON property `content`
|
108
|
-
# @return [String]
|
109
|
-
attr_accessor :content
|
110
|
-
|
111
|
-
# URI that points to a file that contains audio data bytes as specified in
|
112
|
-
# `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
|
113
|
-
# supported, which must be specified in the following format:
|
114
|
-
# `gs://bucket_name/object_name` (other URI formats return
|
115
|
-
# google.rpc.Code.INVALID_ARGUMENT). For more information, see
|
116
|
-
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
117
|
-
# Corresponds to the JSON property `uri`
|
118
|
-
# @return [String]
|
119
|
-
attr_accessor :uri
|
120
|
-
|
121
29
|
def initialize(**args)
|
122
30
|
update!(**args)
|
123
31
|
end
|
124
32
|
|
125
33
|
# Update properties of this object
|
126
34
|
def update!(**args)
|
127
|
-
@content = args[:content] if args.key?(:content)
|
128
|
-
@uri = args[:uri] if args.key?(:uri)
|
129
35
|
end
|
130
36
|
end
|
131
37
|
|
@@ -177,14 +83,6 @@ module Google
|
|
177
83
|
# @return [Google::Apis::SpeechV1beta1::Status]
|
178
84
|
attr_accessor :error
|
179
85
|
|
180
|
-
# If the value is `false`, it means the operation is still in progress.
|
181
|
-
# If true, the operation is completed, and either `error` or `response` is
|
182
|
-
# available.
|
183
|
-
# Corresponds to the JSON property `done`
|
184
|
-
# @return [Boolean]
|
185
|
-
attr_accessor :done
|
186
|
-
alias_method :done?, :done
|
187
|
-
|
188
86
|
# Service-specific metadata associated with the operation. It typically
|
189
87
|
# contains progress information and common metadata such as create time.
|
190
88
|
# Some services might not provide such metadata. Any method that returns a
|
@@ -193,6 +91,14 @@ module Google
|
|
193
91
|
# @return [Hash<String,Object>]
|
194
92
|
attr_accessor :metadata
|
195
93
|
|
94
|
+
# If the value is `false`, it means the operation is still in progress.
|
95
|
+
# If true, the operation is completed, and either `error` or `response` is
|
96
|
+
# available.
|
97
|
+
# Corresponds to the JSON property `done`
|
98
|
+
# @return [Boolean]
|
99
|
+
attr_accessor :done
|
100
|
+
alias_method :done?, :done
|
101
|
+
|
196
102
|
# The normal response of the operation in case of success. If the original
|
197
103
|
# method returns no data on success, such as `Delete`, the response is
|
198
104
|
# `google.protobuf.Empty`. If the original method is standard
|
@@ -219,55 +125,13 @@ module Google
|
|
219
125
|
# Update properties of this object
|
220
126
|
def update!(**args)
|
221
127
|
@error = args[:error] if args.key?(:error)
|
222
|
-
@done = args[:done] if args.key?(:done)
|
223
128
|
@metadata = args[:metadata] if args.key?(:metadata)
|
129
|
+
@done = args[:done] if args.key?(:done)
|
224
130
|
@response = args[:response] if args.key?(:response)
|
225
131
|
@name = args[:name] if args.key?(:name)
|
226
132
|
end
|
227
133
|
end
|
228
134
|
|
229
|
-
# Alternative hypotheses (a.k.a. n-best list).
|
230
|
-
class SpeechRecognitionAlternative
|
231
|
-
include Google::Apis::Core::Hashable
|
232
|
-
|
233
|
-
# [Output-only] Transcript text representing the words that the user spoke.
|
234
|
-
# Corresponds to the JSON property `transcript`
|
235
|
-
# @return [String]
|
236
|
-
attr_accessor :transcript
|
237
|
-
|
238
|
-
# [Output-only] The confidence estimate between 0.0 and 1.0. A higher number
|
239
|
-
# means the system is more confident that the recognition is correct.
|
240
|
-
# This field is typically provided only for the top hypothesis, and only for
|
241
|
-
# `is_final=true` results.
|
242
|
-
# The default of 0.0 is a sentinel value indicating confidence was not set.
|
243
|
-
# Corresponds to the JSON property `confidence`
|
244
|
-
# @return [Float]
|
245
|
-
attr_accessor :confidence
|
246
|
-
|
247
|
-
def initialize(**args)
|
248
|
-
update!(**args)
|
249
|
-
end
|
250
|
-
|
251
|
-
# Update properties of this object
|
252
|
-
def update!(**args)
|
253
|
-
@transcript = args[:transcript] if args.key?(:transcript)
|
254
|
-
@confidence = args[:confidence] if args.key?(:confidence)
|
255
|
-
end
|
256
|
-
end
|
257
|
-
|
258
|
-
# The request message for Operations.CancelOperation.
|
259
|
-
class CancelOperationRequest
|
260
|
-
include Google::Apis::Core::Hashable
|
261
|
-
|
262
|
-
def initialize(**args)
|
263
|
-
update!(**args)
|
264
|
-
end
|
265
|
-
|
266
|
-
# Update properties of this object
|
267
|
-
def update!(**args)
|
268
|
-
end
|
269
|
-
end
|
270
|
-
|
271
135
|
# The `RecognitionConfig` message provides information to the recognizer
|
272
136
|
# that specifies how to process the request.
|
273
137
|
class RecognitionConfig
|
@@ -278,11 +142,20 @@ module Google
|
|
278
142
|
# within each `SpeechRecognitionResult`.
|
279
143
|
# The server may return fewer than `max_alternatives`.
|
280
144
|
# Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
|
281
|
-
#
|
145
|
+
# one. If omitted, will return a maximum of one.
|
282
146
|
# Corresponds to the JSON property `maxAlternatives`
|
283
147
|
# @return [Fixnum]
|
284
148
|
attr_accessor :max_alternatives
|
285
149
|
|
150
|
+
# [Required] Sample rate in Hertz of the audio data sent in all
|
151
|
+
# `RecognitionAudio` messages. Valid values are: 8000-48000.
|
152
|
+
# 16000 is optimal. For best results, set the sampling rate of the audio
|
153
|
+
# source to 16000 Hz. If that's not possible, use the native sample rate of
|
154
|
+
# the audio source (instead of re-sampling).
|
155
|
+
# Corresponds to the JSON property `sampleRate`
|
156
|
+
# @return [Fixnum]
|
157
|
+
attr_accessor :sample_rate
|
158
|
+
|
286
159
|
# [Optional] The language of the supplied audio as a BCP-47 language tag.
|
287
160
|
# Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt
|
288
161
|
# If omitted, defaults to "en-US". See
|
@@ -312,15 +185,6 @@ module Google
|
|
312
185
|
attr_accessor :profanity_filter
|
313
186
|
alias_method :profanity_filter?, :profanity_filter
|
314
187
|
|
315
|
-
# [Required] Sample rate in Hertz of the audio data sent in all
|
316
|
-
# `RecognitionAudio` messages. Valid values are: 8000-48000.
|
317
|
-
# 16000 is optimal. For best results, set the sampling rate of the audio
|
318
|
-
# source to 16000 Hz. If that's not possible, use the native sample rate of
|
319
|
-
# the audio source (instead of re-sampling).
|
320
|
-
# Corresponds to the JSON property `sampleRate`
|
321
|
-
# @return [Fixnum]
|
322
|
-
attr_accessor :sample_rate
|
323
|
-
|
324
188
|
def initialize(**args)
|
325
189
|
update!(**args)
|
326
190
|
end
|
@@ -328,11 +192,11 @@ module Google
|
|
328
192
|
# Update properties of this object
|
329
193
|
def update!(**args)
|
330
194
|
@max_alternatives = args[:max_alternatives] if args.key?(:max_alternatives)
|
195
|
+
@sample_rate = args[:sample_rate] if args.key?(:sample_rate)
|
331
196
|
@language_code = args[:language_code] if args.key?(:language_code)
|
332
197
|
@speech_context = args[:speech_context] if args.key?(:speech_context)
|
333
198
|
@encoding = args[:encoding] if args.key?(:encoding)
|
334
199
|
@profanity_filter = args[:profanity_filter] if args.key?(:profanity_filter)
|
335
|
-
@sample_rate = args[:sample_rate] if args.key?(:sample_rate)
|
336
200
|
end
|
337
201
|
end
|
338
202
|
|
@@ -341,6 +205,12 @@ module Google
|
|
341
205
|
class SyncRecognizeRequest
|
342
206
|
include Google::Apis::Core::Hashable
|
343
207
|
|
208
|
+
# The `RecognitionConfig` message provides information to the recognizer
|
209
|
+
# that specifies how to process the request.
|
210
|
+
# Corresponds to the JSON property `config`
|
211
|
+
# @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
|
212
|
+
attr_accessor :config
|
213
|
+
|
344
214
|
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
345
215
|
# Either `content` or `uri` must be supplied. Supplying both or neither
|
346
216
|
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
@@ -349,32 +219,76 @@ module Google
|
|
349
219
|
# @return [Google::Apis::SpeechV1beta1::RecognitionAudio]
|
350
220
|
attr_accessor :audio
|
351
221
|
|
352
|
-
# The `RecognitionConfig` message provides information to the recognizer
|
353
|
-
# that specifies how to process the request.
|
354
|
-
# Corresponds to the JSON property `config`
|
355
|
-
# @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
|
356
|
-
attr_accessor :config
|
357
|
-
|
358
222
|
def initialize(**args)
|
359
223
|
update!(**args)
|
360
224
|
end
|
361
225
|
|
362
226
|
# Update properties of this object
|
363
227
|
def update!(**args)
|
364
|
-
@audio = args[:audio] if args.key?(:audio)
|
365
228
|
@config = args[:config] if args.key?(:config)
|
229
|
+
@audio = args[:audio] if args.key?(:audio)
|
366
230
|
end
|
367
231
|
end
|
368
232
|
|
369
|
-
#
|
370
|
-
|
233
|
+
# The `Status` type defines a logical error model that is suitable for different
|
234
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
235
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
236
|
+
# - Simple to use and understand for most users
|
237
|
+
# - Flexible enough to meet unexpected needs
|
238
|
+
# # Overview
|
239
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
240
|
+
# and error details. The error code should be an enum value of
|
241
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
242
|
+
# error message should be a developer-facing English message that helps
|
243
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
244
|
+
# error message is needed, put the localized message in the error details or
|
245
|
+
# localize it in the client. The optional error details may contain arbitrary
|
246
|
+
# information about the error. There is a predefined set of error detail types
|
247
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
248
|
+
# # Language mapping
|
249
|
+
# The `Status` message is the logical representation of the error model, but it
|
250
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
251
|
+
# exposed in different client libraries and different wire protocols, it can be
|
252
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
253
|
+
# in Java, but more likely mapped to some error codes in C.
|
254
|
+
# # Other uses
|
255
|
+
# The error model and the `Status` message can be used in a variety of
|
256
|
+
# environments, either with or without APIs, to provide a
|
257
|
+
# consistent developer experience across different environments.
|
258
|
+
# Example uses of this error model include:
|
259
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
260
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
261
|
+
# errors.
|
262
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
263
|
+
# have a `Status` message for error reporting purpose.
|
264
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
265
|
+
# `Status` message should be used directly inside batch response, one for
|
266
|
+
# each error sub-response.
|
267
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
268
|
+
# results in its response, the status of those operations should be
|
269
|
+
# represented directly using the `Status` message.
|
270
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
271
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
272
|
+
class Status
|
371
273
|
include Google::Apis::Core::Hashable
|
372
274
|
|
373
|
-
#
|
374
|
-
#
|
375
|
-
# Corresponds to the JSON property `
|
376
|
-
# @return [Array<
|
377
|
-
attr_accessor :
|
275
|
+
# A list of messages that carry the error details. There will be a
|
276
|
+
# common set of message types for APIs to use.
|
277
|
+
# Corresponds to the JSON property `details`
|
278
|
+
# @return [Array<Hash<String,Object>>]
|
279
|
+
attr_accessor :details
|
280
|
+
|
281
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
282
|
+
# Corresponds to the JSON property `code`
|
283
|
+
# @return [Fixnum]
|
284
|
+
attr_accessor :code
|
285
|
+
|
286
|
+
# A developer-facing error message, which should be in English. Any
|
287
|
+
# user-facing error message should be localized and sent in the
|
288
|
+
# google.rpc.Status.details field, or localized by the client.
|
289
|
+
# Corresponds to the JSON property `message`
|
290
|
+
# @return [String]
|
291
|
+
attr_accessor :message
|
378
292
|
|
379
293
|
def initialize(**args)
|
380
294
|
update!(**args)
|
@@ -382,7 +296,75 @@ module Google
|
|
382
296
|
|
383
297
|
# Update properties of this object
|
384
298
|
def update!(**args)
|
385
|
-
@
|
299
|
+
@details = args[:details] if args.key?(:details)
|
300
|
+
@code = args[:code] if args.key?(:code)
|
301
|
+
@message = args[:message] if args.key?(:message)
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
# `SyncRecognizeResponse` is the only message returned to the client by
|
306
|
+
# `SyncRecognize`. It contains the result as zero or more sequential
|
307
|
+
# `SpeechRecognitionResult` messages.
|
308
|
+
class SyncRecognizeResponse
|
309
|
+
include Google::Apis::Core::Hashable
|
310
|
+
|
311
|
+
# [Output-only] Sequential list of transcription results corresponding to
|
312
|
+
# sequential portions of audio.
|
313
|
+
# Corresponds to the JSON property `results`
|
314
|
+
# @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionResult>]
|
315
|
+
attr_accessor :results
|
316
|
+
|
317
|
+
def initialize(**args)
|
318
|
+
update!(**args)
|
319
|
+
end
|
320
|
+
|
321
|
+
# Update properties of this object
|
322
|
+
def update!(**args)
|
323
|
+
@results = args[:results] if args.key?(:results)
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
328
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
329
|
+
# or the response type of an API method. For instance:
|
330
|
+
# service Foo `
|
331
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
332
|
+
# `
|
333
|
+
# The JSON representation for `Empty` is empty JSON object ````.
|
334
|
+
class Empty
|
335
|
+
include Google::Apis::Core::Hashable
|
336
|
+
|
337
|
+
def initialize(**args)
|
338
|
+
update!(**args)
|
339
|
+
end
|
340
|
+
|
341
|
+
# Update properties of this object
|
342
|
+
def update!(**args)
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
# Provides "hints" to the speech recognizer to favor specific words and phrases
|
347
|
+
# in the results.
|
348
|
+
class SpeechContext
|
349
|
+
include Google::Apis::Core::Hashable
|
350
|
+
|
351
|
+
# [Optional] A list of strings containing words and phrases "hints" so that
|
352
|
+
# the speech recognition is more likely to recognize them. This can be used
|
353
|
+
# to improve the accuracy for specific words and phrases, for example, if
|
354
|
+
# specific commands are typically spoken by the user. This can also be used
|
355
|
+
# to add additional words to the vocabulary of the recognizer. See
|
356
|
+
# [usage limits](https://cloud.google.com/speech/limits#content).
|
357
|
+
# Corresponds to the JSON property `phrases`
|
358
|
+
# @return [Array<String>]
|
359
|
+
attr_accessor :phrases
|
360
|
+
|
361
|
+
def initialize(**args)
|
362
|
+
update!(**args)
|
363
|
+
end
|
364
|
+
|
365
|
+
# Update properties of this object
|
366
|
+
def update!(**args)
|
367
|
+
@phrases = args[:phrases] if args.key?(:phrases)
|
386
368
|
end
|
387
369
|
end
|
388
370
|
|
@@ -411,36 +393,46 @@ module Google
|
|
411
393
|
end
|
412
394
|
end
|
413
395
|
|
414
|
-
#
|
415
|
-
|
416
|
-
# or the response type of an API method. For instance:
|
417
|
-
# service Foo `
|
418
|
-
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
419
|
-
# `
|
420
|
-
# The JSON representation for `Empty` is empty JSON object ````.
|
421
|
-
class Empty
|
396
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
397
|
+
class SpeechRecognitionAlternative
|
422
398
|
include Google::Apis::Core::Hashable
|
423
399
|
|
400
|
+
# [Output-only] The confidence estimate between 0.0 and 1.0. A higher number
|
401
|
+
# indicates an estimated greater likelihood that the recognized words are
|
402
|
+
# correct. This field is typically provided only for the top hypothesis, and
|
403
|
+
# only for `is_final=true` results. Clients should not rely on the
|
404
|
+
# `confidence` field as it is not guaranteed to be accurate, or even set, in
|
405
|
+
# any of the results.
|
406
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
407
|
+
# Corresponds to the JSON property `confidence`
|
408
|
+
# @return [Float]
|
409
|
+
attr_accessor :confidence
|
410
|
+
|
411
|
+
# [Output-only] Transcript text representing the words that the user spoke.
|
412
|
+
# Corresponds to the JSON property `transcript`
|
413
|
+
# @return [String]
|
414
|
+
attr_accessor :transcript
|
415
|
+
|
424
416
|
def initialize(**args)
|
425
417
|
update!(**args)
|
426
418
|
end
|
427
419
|
|
428
420
|
# Update properties of this object
|
429
421
|
def update!(**args)
|
422
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
423
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
430
424
|
end
|
431
425
|
end
|
432
426
|
|
433
|
-
#
|
434
|
-
|
435
|
-
# `SpeechRecognitionResult` messages.
|
436
|
-
class SyncRecognizeResponse
|
427
|
+
# A speech recognition result corresponding to a portion of the audio.
|
428
|
+
class SpeechRecognitionResult
|
437
429
|
include Google::Apis::Core::Hashable
|
438
430
|
|
439
|
-
# [Output-only]
|
440
|
-
#
|
441
|
-
# Corresponds to the JSON property `
|
442
|
-
# @return [Array<Google::Apis::SpeechV1beta1::
|
443
|
-
attr_accessor :
|
431
|
+
# [Output-only] May contain one or more recognition hypotheses (up to the
|
432
|
+
# maximum specified in `max_alternatives`).
|
433
|
+
# Corresponds to the JSON property `alternatives`
|
434
|
+
# @return [Array<Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative>]
|
435
|
+
attr_accessor :alternatives
|
444
436
|
|
445
437
|
def initialize(**args)
|
446
438
|
update!(**args)
|
@@ -448,24 +440,33 @@ module Google
|
|
448
440
|
|
449
441
|
# Update properties of this object
|
450
442
|
def update!(**args)
|
451
|
-
@
|
443
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
452
444
|
end
|
453
445
|
end
|
454
446
|
|
455
|
-
#
|
456
|
-
#
|
457
|
-
|
447
|
+
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
448
|
+
# Either `content` or `uri` must be supplied. Supplying both or neither
|
449
|
+
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
450
|
+
# [audio limits](https://cloud.google.com/speech/limits#content).
|
451
|
+
class RecognitionAudio
|
458
452
|
include Google::Apis::Core::Hashable
|
459
453
|
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
|
466
|
-
|
467
|
-
#
|
468
|
-
|
454
|
+
# The audio data bytes encoded as specified in
|
455
|
+
# `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a
|
456
|
+
# pure binary representation, whereas JSON representations use base64.
|
457
|
+
# Corresponds to the JSON property `content`
|
458
|
+
# @return [String]
|
459
|
+
attr_accessor :content
|
460
|
+
|
461
|
+
# URI that points to a file that contains audio data bytes as specified in
|
462
|
+
# `RecognitionConfig`. Currently, only Google Cloud Storage URIs are
|
463
|
+
# supported, which must be specified in the following format:
|
464
|
+
# `gs://bucket_name/object_name` (other URI formats return
|
465
|
+
# google.rpc.Code.INVALID_ARGUMENT). For more information, see
|
466
|
+
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
467
|
+
# Corresponds to the JSON property `uri`
|
468
|
+
# @return [String]
|
469
|
+
attr_accessor :uri
|
469
470
|
|
470
471
|
def initialize(**args)
|
471
472
|
update!(**args)
|
@@ -473,7 +474,8 @@ module Google
|
|
473
474
|
|
474
475
|
# Update properties of this object
|
475
476
|
def update!(**args)
|
476
|
-
@
|
477
|
+
@content = args[:content] if args.key?(:content)
|
478
|
+
@uri = args[:uri] if args.key?(:uri)
|
477
479
|
end
|
478
480
|
end
|
479
481
|
|
@@ -482,6 +484,12 @@ module Google
|
|
482
484
|
class AsyncRecognizeRequest
|
483
485
|
include Google::Apis::Core::Hashable
|
484
486
|
|
487
|
+
# The `RecognitionConfig` message provides information to the recognizer
|
488
|
+
# that specifies how to process the request.
|
489
|
+
# Corresponds to the JSON property `config`
|
490
|
+
# @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
|
491
|
+
attr_accessor :config
|
492
|
+
|
485
493
|
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
486
494
|
# Either `content` or `uri` must be supplied. Supplying both or neither
|
487
495
|
# returns google.rpc.Code.INVALID_ARGUMENT. See
|
@@ -490,20 +498,14 @@ module Google
|
|
490
498
|
# @return [Google::Apis::SpeechV1beta1::RecognitionAudio]
|
491
499
|
attr_accessor :audio
|
492
500
|
|
493
|
-
# The `RecognitionConfig` message provides information to the recognizer
|
494
|
-
# that specifies how to process the request.
|
495
|
-
# Corresponds to the JSON property `config`
|
496
|
-
# @return [Google::Apis::SpeechV1beta1::RecognitionConfig]
|
497
|
-
attr_accessor :config
|
498
|
-
|
499
501
|
def initialize(**args)
|
500
502
|
update!(**args)
|
501
503
|
end
|
502
504
|
|
503
505
|
# Update properties of this object
|
504
506
|
def update!(**args)
|
505
|
-
@audio = args[:audio] if args.key?(:audio)
|
506
507
|
@config = args[:config] if args.key?(:config)
|
508
|
+
@audio = args[:audio] if args.key?(:audio)
|
507
509
|
end
|
508
510
|
end
|
509
511
|
end
|