google-api-client 0.33.1 → 0.33.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/generated/google/apis/accessapproval_v1beta1.rb +1 -1
- data/generated/google/apis/accessapproval_v1beta1/classes.rb +11 -0
- data/generated/google/apis/accessapproval_v1beta1/representations.rb +1 -0
- data/generated/google/apis/accesscontextmanager_v1beta.rb +1 -1
- data/generated/google/apis/accesscontextmanager_v1beta/classes.rb +0 -72
- data/generated/google/apis/accesscontextmanager_v1beta/representations.rb +0 -32
- data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +15 -2
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +16 -3
- data/generated/google/apis/admin_datatransfer_v1.rb +1 -1
- data/generated/google/apis/admin_datatransfer_v1/classes.rb +5 -5
- data/generated/google/apis/admin_datatransfer_v1/service.rb +2 -2
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/admin_reports_v1/service.rb +6 -3
- data/generated/google/apis/appengine_v1.rb +1 -1
- data/generated/google/apis/appengine_v1/service.rb +3 -3
- data/generated/google/apis/appengine_v1beta.rb +1 -1
- data/generated/google/apis/appengine_v1beta/service.rb +3 -3
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +9 -1
- data/generated/google/apis/bigqueryconnection_v1beta1.rb +1 -1
- data/generated/google/apis/bigqueryconnection_v1beta1/service.rb +1 -1
- data/generated/google/apis/bigtableadmin_v2.rb +1 -1
- data/generated/google/apis/bigtableadmin_v2/classes.rb +62 -29
- data/generated/google/apis/civicinfo_v2.rb +1 -1
- data/generated/google/apis/civicinfo_v2/representations.rb +2 -2
- data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
- data/generated/google/apis/cloudidentity_v1beta1/classes.rb +2 -2
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +12 -12
- data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2/classes.rb +4 -8
- data/generated/google/apis/cloudresourcemanager_v2/service.rb +11 -13
- data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +4 -8
- data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +11 -13
- data/generated/google/apis/cloudshell_v1.rb +1 -1
- data/generated/google/apis/cloudshell_v1/classes.rb +6 -0
- data/generated/google/apis/cloudshell_v1/representations.rb +1 -0
- data/generated/google/apis/cloudshell_v1alpha1.rb +1 -1
- data/generated/google/apis/cloudshell_v1alpha1/classes.rb +6 -0
- data/generated/google/apis/cloudshell_v1alpha1/representations.rb +1 -0
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +205 -4
- data/generated/google/apis/container_v1/representations.rb +85 -0
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +93 -2
- data/generated/google/apis/container_v1beta1/representations.rb +18 -0
- data/generated/google/apis/docs_v1.rb +1 -1
- data/generated/google/apis/docs_v1/classes.rb +112 -0
- data/generated/google/apis/docs_v1/representations.rb +60 -0
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +2 -1
- data/generated/google/apis/fitness_v1.rb +1 -1
- data/generated/google/apis/fitness_v1/service.rb +1 -1
- data/generated/google/apis/healthcare_v1beta1/service.rb +11 -7
- data/generated/google/apis/licensing_v1.rb +4 -4
- data/generated/google/apis/licensing_v1/classes.rb +15 -7
- data/generated/google/apis/licensing_v1/service.rb +81 -37
- data/generated/google/apis/ml_v1.rb +2 -2
- data/generated/google/apis/ml_v1/classes.rb +9 -0
- data/generated/google/apis/ml_v1/representations.rb +1 -0
- data/generated/google/apis/ml_v1/service.rb +1 -1
- data/generated/google/apis/oslogin_v1.rb +1 -1
- data/generated/google/apis/oslogin_v1/classes.rb +1 -1
- data/generated/google/apis/oslogin_v1/service.rb +8 -5
- data/generated/google/apis/oslogin_v1beta.rb +1 -1
- data/generated/google/apis/oslogin_v1beta/classes.rb +1 -1
- data/generated/google/apis/oslogin_v1beta/service.rb +9 -5
- data/generated/google/apis/reseller_v1.rb +1 -1
- data/generated/google/apis/reseller_v1/service.rb +1 -1
- data/generated/google/apis/run_v1alpha1.rb +1 -1
- data/generated/google/apis/run_v1alpha1/classes.rb +319 -0
- data/generated/google/apis/run_v1alpha1/representations.rb +126 -0
- data/generated/google/apis/run_v1alpha1/service.rb +408 -0
- data/generated/google/apis/speech_v2beta1.rb +34 -0
- data/generated/google/apis/speech_v2beta1/classes.rb +356 -0
- data/generated/google/apis/speech_v2beta1/representations.rb +152 -0
- data/generated/google/apis/speech_v2beta1/service.rb +138 -0
- data/generated/google/apis/sql_v1beta4.rb +1 -1
- data/generated/google/apis/sql_v1beta4/classes.rb +63 -0
- data/generated/google/apis/sql_v1beta4/representations.rb +32 -0
- data/generated/google/apis/sql_v1beta4/service.rb +161 -30
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/testing_v1/classes.rb +141 -0
- data/generated/google/apis/testing_v1/representations.rb +76 -0
- data/generated/google/apis/videointelligence_v1.rb +1 -1
- data/generated/google/apis/videointelligence_v1/classes.rb +34 -34
- data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
- data/generated/google/apis/videointelligence_v1beta2/classes.rb +34 -34
- data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
- data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +34 -34
- data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
- data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +34 -34
- data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
- data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +34 -34
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/service.rb +2 -2
- data/lib/google/apis/version.rb +1 -1
- metadata +6 -2
@@ -0,0 +1,34 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/speech_v2beta1/service.rb'
|
16
|
+
require 'google/apis/speech_v2beta1/classes.rb'
|
17
|
+
require 'google/apis/speech_v2beta1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Cloud Speech-to-Text API
|
22
|
+
#
|
23
|
+
# Converts audio to text by applying powerful neural network models.
|
24
|
+
#
|
25
|
+
# @see https://cloud.google.com/speech-to-text/docs/quickstart-protocol
|
26
|
+
module SpeechV2beta1
|
27
|
+
VERSION = 'V2beta1'
|
28
|
+
REVISION = '20191017'
|
29
|
+
|
30
|
+
# View and manage your data across Google Cloud Platform services
|
31
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,356 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module SpeechV2beta1
|
24
|
+
|
25
|
+
# The response message for Operations.ListOperations.
|
26
|
+
class ListOperationsResponse
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# The standard List next-page token.
|
30
|
+
# Corresponds to the JSON property `nextPageToken`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :next_page_token
|
33
|
+
|
34
|
+
# A list of operations that matches the specified filter in the request.
|
35
|
+
# Corresponds to the JSON property `operations`
|
36
|
+
# @return [Array<Google::Apis::SpeechV2beta1::Operation>]
|
37
|
+
attr_accessor :operations
|
38
|
+
|
39
|
+
def initialize(**args)
|
40
|
+
update!(**args)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Update properties of this object
|
44
|
+
def update!(**args)
|
45
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
46
|
+
@operations = args[:operations] if args.key?(:operations)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Describes the progress of a long-running `LongRunningRecognize` call. It is
|
51
|
+
# included in the `metadata` field of the `Operation` returned by the
|
52
|
+
# `GetOperation` call of the `google::longrunning::Operations` service.
|
53
|
+
class LongRunningRecognizeMetadata
|
54
|
+
include Google::Apis::Core::Hashable
|
55
|
+
|
56
|
+
# Output only. Time of the most recent processing update.
|
57
|
+
# Corresponds to the JSON property `lastUpdateTime`
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :last_update_time
|
60
|
+
|
61
|
+
# Output only. Approximate percentage of audio processed thus far. Guaranteed to
|
62
|
+
# be 100
|
63
|
+
# when the audio is fully processed and the results are available.
|
64
|
+
# Corresponds to the JSON property `progressPercent`
|
65
|
+
# @return [Fixnum]
|
66
|
+
attr_accessor :progress_percent
|
67
|
+
|
68
|
+
# Output only. Time when the request was received.
|
69
|
+
# Corresponds to the JSON property `startTime`
|
70
|
+
# @return [String]
|
71
|
+
attr_accessor :start_time
|
72
|
+
|
73
|
+
def initialize(**args)
|
74
|
+
update!(**args)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Update properties of this object
|
78
|
+
def update!(**args)
|
79
|
+
@last_update_time = args[:last_update_time] if args.key?(:last_update_time)
|
80
|
+
@progress_percent = args[:progress_percent] if args.key?(:progress_percent)
|
81
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# The only message returned to the client by the `LongRunningRecognize` method.
|
86
|
+
# It contains the result as zero or more sequential SpeechRecognitionResult
|
87
|
+
# messages. It is included in the `result.response` field of the `Operation`
|
88
|
+
# returned by the `GetOperation` call of the `google::longrunning::Operations`
|
89
|
+
# service.
|
90
|
+
class LongRunningRecognizeResponse
|
91
|
+
include Google::Apis::Core::Hashable
|
92
|
+
|
93
|
+
# Output only. Sequential list of transcription results corresponding to
|
94
|
+
# sequential portions of audio.
|
95
|
+
# Corresponds to the JSON property `results`
|
96
|
+
# @return [Array<Google::Apis::SpeechV2beta1::SpeechRecognitionResult>]
|
97
|
+
attr_accessor :results
|
98
|
+
|
99
|
+
def initialize(**args)
|
100
|
+
update!(**args)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Update properties of this object
|
104
|
+
def update!(**args)
|
105
|
+
@results = args[:results] if args.key?(:results)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# This resource represents a long-running operation that is the result of a
|
110
|
+
# network API call.
|
111
|
+
class Operation
|
112
|
+
include Google::Apis::Core::Hashable
|
113
|
+
|
114
|
+
# If the value is `false`, it means the operation is still in progress.
|
115
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
116
|
+
# available.
|
117
|
+
# Corresponds to the JSON property `done`
|
118
|
+
# @return [Boolean]
|
119
|
+
attr_accessor :done
|
120
|
+
alias_method :done?, :done
|
121
|
+
|
122
|
+
# The `Status` type defines a logical error model that is suitable for
|
123
|
+
# different programming environments, including REST APIs and RPC APIs. It is
|
124
|
+
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
125
|
+
# three pieces of data: error code, error message, and error details.
|
126
|
+
# You can find out more about this error model and how to work with it in the
|
127
|
+
# [API Design Guide](https://cloud.google.com/apis/design/errors).
|
128
|
+
# Corresponds to the JSON property `error`
|
129
|
+
# @return [Google::Apis::SpeechV2beta1::Status]
|
130
|
+
attr_accessor :error
|
131
|
+
|
132
|
+
# Service-specific metadata associated with the operation. It typically
|
133
|
+
# contains progress information and common metadata such as create time.
|
134
|
+
# Some services might not provide such metadata. Any method that returns a
|
135
|
+
# long-running operation should document the metadata type, if any.
|
136
|
+
# Corresponds to the JSON property `metadata`
|
137
|
+
# @return [Hash<String,Object>]
|
138
|
+
attr_accessor :metadata
|
139
|
+
|
140
|
+
# The server-assigned name, which is only unique within the same service that
|
141
|
+
# originally returns it. If you use the default HTTP mapping, the
|
142
|
+
# `name` should be a resource name ending with `operations/`unique_id``.
|
143
|
+
# Corresponds to the JSON property `name`
|
144
|
+
# @return [String]
|
145
|
+
attr_accessor :name
|
146
|
+
|
147
|
+
# The normal response of the operation in case of success. If the original
|
148
|
+
# method returns no data on success, such as `Delete`, the response is
|
149
|
+
# `google.protobuf.Empty`. If the original method is standard
|
150
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
151
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
152
|
+
# is the original method name. For example, if the original method name
|
153
|
+
# is `TakeSnapshot()`, the inferred response type is
|
154
|
+
# `TakeSnapshotResponse`.
|
155
|
+
# Corresponds to the JSON property `response`
|
156
|
+
# @return [Hash<String,Object>]
|
157
|
+
attr_accessor :response
|
158
|
+
|
159
|
+
def initialize(**args)
|
160
|
+
update!(**args)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Update properties of this object
|
164
|
+
def update!(**args)
|
165
|
+
@done = args[:done] if args.key?(:done)
|
166
|
+
@error = args[:error] if args.key?(:error)
|
167
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
168
|
+
@name = args[:name] if args.key?(:name)
|
169
|
+
@response = args[:response] if args.key?(:response)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Alternative hypotheses (a.k.a. n-best list).
|
174
|
+
class SpeechRecognitionAlternative
|
175
|
+
include Google::Apis::Core::Hashable
|
176
|
+
|
177
|
+
# Output only. The confidence estimate between 0.0 and 1.0. A higher number
|
178
|
+
# indicates an estimated greater likelihood that the recognized words are
|
179
|
+
# correct. This field is set only for the top alternative of a non-streaming
|
180
|
+
# result or, of a streaming result where `is_final=true`.
|
181
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
182
|
+
# to be always provided.
|
183
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
184
|
+
# Corresponds to the JSON property `confidence`
|
185
|
+
# @return [Float]
|
186
|
+
attr_accessor :confidence
|
187
|
+
|
188
|
+
# Output only. Transcript text representing the words that the user spoke.
|
189
|
+
# Corresponds to the JSON property `transcript`
|
190
|
+
# @return [String]
|
191
|
+
attr_accessor :transcript
|
192
|
+
|
193
|
+
# Output only. A list of word-specific information for each recognized word.
|
194
|
+
# Note: When `enable_speaker_diarization` is true, you will see all the words
|
195
|
+
# from the beginning of the audio.
|
196
|
+
# Corresponds to the JSON property `words`
|
197
|
+
# @return [Array<Google::Apis::SpeechV2beta1::WordInfo>]
|
198
|
+
attr_accessor :words
|
199
|
+
|
200
|
+
def initialize(**args)
|
201
|
+
update!(**args)
|
202
|
+
end
|
203
|
+
|
204
|
+
# Update properties of this object
|
205
|
+
def update!(**args)
|
206
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
207
|
+
@transcript = args[:transcript] if args.key?(:transcript)
|
208
|
+
@words = args[:words] if args.key?(:words)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
# A speech recognition result corresponding to a portion of the audio.
|
213
|
+
class SpeechRecognitionResult
|
214
|
+
include Google::Apis::Core::Hashable
|
215
|
+
|
216
|
+
# Output only. May contain one or more recognition hypotheses (up to the
|
217
|
+
# maximum specified in `max_alternatives`).
|
218
|
+
# These alternatives are ordered in terms of accuracy, with the top (first)
|
219
|
+
# alternative being the most probable, as ranked by the recognizer.
|
220
|
+
# Corresponds to the JSON property `alternatives`
|
221
|
+
# @return [Array<Google::Apis::SpeechV2beta1::SpeechRecognitionAlternative>]
|
222
|
+
attr_accessor :alternatives
|
223
|
+
|
224
|
+
# Output only. For multi-channel audio, this is the channel number corresponding
|
225
|
+
# to the
|
226
|
+
# recognized result for the audio from that channel.
|
227
|
+
# For `audio_channel_count` = N, its output values can range from `1` to `N`.
|
228
|
+
# Corresponds to the JSON property `channelTag`
|
229
|
+
# @return [Fixnum]
|
230
|
+
attr_accessor :channel_tag
|
231
|
+
|
232
|
+
# Output only. The
|
233
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the
|
234
|
+
# language in this result. This language code was detected to have the most
|
235
|
+
# likelihood of being spoken in the audio.
|
236
|
+
# Corresponds to the JSON property `languageCode`
|
237
|
+
# @return [String]
|
238
|
+
attr_accessor :language_code
|
239
|
+
|
240
|
+
def initialize(**args)
|
241
|
+
update!(**args)
|
242
|
+
end
|
243
|
+
|
244
|
+
# Update properties of this object
|
245
|
+
def update!(**args)
|
246
|
+
@alternatives = args[:alternatives] if args.key?(:alternatives)
|
247
|
+
@channel_tag = args[:channel_tag] if args.key?(:channel_tag)
|
248
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
# The `Status` type defines a logical error model that is suitable for
|
253
|
+
# different programming environments, including REST APIs and RPC APIs. It is
|
254
|
+
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
255
|
+
# three pieces of data: error code, error message, and error details.
|
256
|
+
# You can find out more about this error model and how to work with it in the
|
257
|
+
# [API Design Guide](https://cloud.google.com/apis/design/errors).
|
258
|
+
class Status
|
259
|
+
include Google::Apis::Core::Hashable
|
260
|
+
|
261
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
262
|
+
# Corresponds to the JSON property `code`
|
263
|
+
# @return [Fixnum]
|
264
|
+
attr_accessor :code
|
265
|
+
|
266
|
+
# A list of messages that carry the error details. There is a common set of
|
267
|
+
# message types for APIs to use.
|
268
|
+
# Corresponds to the JSON property `details`
|
269
|
+
# @return [Array<Hash<String,Object>>]
|
270
|
+
attr_accessor :details
|
271
|
+
|
272
|
+
# A developer-facing error message, which should be in English. Any
|
273
|
+
# user-facing error message should be localized and sent in the
|
274
|
+
# google.rpc.Status.details field, or localized by the client.
|
275
|
+
# Corresponds to the JSON property `message`
|
276
|
+
# @return [String]
|
277
|
+
attr_accessor :message
|
278
|
+
|
279
|
+
def initialize(**args)
|
280
|
+
update!(**args)
|
281
|
+
end
|
282
|
+
|
283
|
+
# Update properties of this object
|
284
|
+
def update!(**args)
|
285
|
+
@code = args[:code] if args.key?(:code)
|
286
|
+
@details = args[:details] if args.key?(:details)
|
287
|
+
@message = args[:message] if args.key?(:message)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
# Word-specific information for recognized words.
|
292
|
+
class WordInfo
|
293
|
+
include Google::Apis::Core::Hashable
|
294
|
+
|
295
|
+
# Output only. The confidence estimate between 0.0 and 1.0. A higher number
|
296
|
+
# indicates an estimated greater likelihood that the recognized words are
|
297
|
+
# correct. This field is set only for the top alternative of a non-streaming
|
298
|
+
# result or, of a streaming result where `is_final=true`.
|
299
|
+
# This field is not guaranteed to be accurate and users should not rely on it
|
300
|
+
# to be always provided.
|
301
|
+
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
302
|
+
# Corresponds to the JSON property `confidence`
|
303
|
+
# @return [Float]
|
304
|
+
attr_accessor :confidence
|
305
|
+
|
306
|
+
# Output only. Time offset relative to the beginning of the audio,
|
307
|
+
# and corresponding to the end of the spoken word.
|
308
|
+
# This field is only set if `enable_word_time_offsets=true` and only
|
309
|
+
# in the top hypothesis.
|
310
|
+
# This is an experimental feature and the accuracy of the time offset can
|
311
|
+
# vary.
|
312
|
+
# Corresponds to the JSON property `endOffset`
|
313
|
+
# @return [String]
|
314
|
+
attr_accessor :end_offset
|
315
|
+
|
316
|
+
# Output only. A distinct integer value is assigned for every speaker within
|
317
|
+
# the audio. This field specifies which one of those speakers was detected to
|
318
|
+
# have spoken this word. Value ranges from `1` to
|
319
|
+
# `diarization_config.max_speaker_count` . `speaker_tag` is set if
|
320
|
+
# `diarization_config.enable_speaker_diarization` = `true` and only in the
|
321
|
+
# top alternative.
|
322
|
+
# Corresponds to the JSON property `speakerTag`
|
323
|
+
# @return [Fixnum]
|
324
|
+
attr_accessor :speaker_tag
|
325
|
+
|
326
|
+
# Output only. Time offset relative to the beginning of the audio,
|
327
|
+
# and corresponding to the start of the spoken word.
|
328
|
+
# This field is only set if `enable_word_time_offsets=true` and only
|
329
|
+
# in the top hypothesis.
|
330
|
+
# This is an experimental feature and the accuracy of the time offset can
|
331
|
+
# vary.
|
332
|
+
# Corresponds to the JSON property `startOffset`
|
333
|
+
# @return [String]
|
334
|
+
attr_accessor :start_offset
|
335
|
+
|
336
|
+
# Output only. The word corresponding to this set of information.
|
337
|
+
# Corresponds to the JSON property `word`
|
338
|
+
# @return [String]
|
339
|
+
attr_accessor :word
|
340
|
+
|
341
|
+
def initialize(**args)
|
342
|
+
update!(**args)
|
343
|
+
end
|
344
|
+
|
345
|
+
# Update properties of this object
|
346
|
+
def update!(**args)
|
347
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
348
|
+
@end_offset = args[:end_offset] if args.key?(:end_offset)
|
349
|
+
@speaker_tag = args[:speaker_tag] if args.key?(:speaker_tag)
|
350
|
+
@start_offset = args[:start_offset] if args.key?(:start_offset)
|
351
|
+
@word = args[:word] if args.key?(:word)
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
@@ -0,0 +1,152 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module SpeechV2beta1
|
24
|
+
|
25
|
+
class ListOperationsResponse
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class LongRunningRecognizeMetadata
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class LongRunningRecognizeResponse
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Operation
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class SpeechRecognitionAlternative
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class SpeechRecognitionResult
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class Status
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class WordInfo
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class ListOperationsResponse
|
74
|
+
# @private
|
75
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
76
|
+
property :next_page_token, as: 'nextPageToken'
|
77
|
+
collection :operations, as: 'operations', class: Google::Apis::SpeechV2beta1::Operation, decorator: Google::Apis::SpeechV2beta1::Operation::Representation
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
class LongRunningRecognizeMetadata
|
83
|
+
# @private
|
84
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
85
|
+
property :last_update_time, as: 'lastUpdateTime'
|
86
|
+
property :progress_percent, as: 'progressPercent'
|
87
|
+
property :start_time, as: 'startTime'
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
class LongRunningRecognizeResponse
|
92
|
+
# @private
|
93
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
94
|
+
collection :results, as: 'results', class: Google::Apis::SpeechV2beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV2beta1::SpeechRecognitionResult::Representation
|
95
|
+
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class Operation
|
100
|
+
# @private
|
101
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
102
|
+
property :done, as: 'done'
|
103
|
+
property :error, as: 'error', class: Google::Apis::SpeechV2beta1::Status, decorator: Google::Apis::SpeechV2beta1::Status::Representation
|
104
|
+
|
105
|
+
hash :metadata, as: 'metadata'
|
106
|
+
property :name, as: 'name'
|
107
|
+
hash :response, as: 'response'
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class SpeechRecognitionAlternative
|
112
|
+
# @private
|
113
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
114
|
+
property :confidence, as: 'confidence'
|
115
|
+
property :transcript, as: 'transcript'
|
116
|
+
collection :words, as: 'words', class: Google::Apis::SpeechV2beta1::WordInfo, decorator: Google::Apis::SpeechV2beta1::WordInfo::Representation
|
117
|
+
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
class SpeechRecognitionResult
|
122
|
+
# @private
|
123
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
124
|
+
collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV2beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV2beta1::SpeechRecognitionAlternative::Representation
|
125
|
+
|
126
|
+
property :channel_tag, as: 'channelTag'
|
127
|
+
property :language_code, as: 'languageCode'
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
class Status
|
132
|
+
# @private
|
133
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
134
|
+
property :code, as: 'code'
|
135
|
+
collection :details, as: 'details'
|
136
|
+
property :message, as: 'message'
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
class WordInfo
|
141
|
+
# @private
|
142
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
143
|
+
property :confidence, as: 'confidence'
|
144
|
+
property :end_offset, as: 'endOffset'
|
145
|
+
property :speaker_tag, as: 'speakerTag'
|
146
|
+
property :start_offset, as: 'startOffset'
|
147
|
+
property :word, as: 'word'
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|