google-cloud-speech-v1 0.4.1 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/speech/v1/cloud_speech_pb.rb +14 -2
- data/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb +1 -2
- data/lib/google/cloud/speech/v1/speech/client.rb +105 -49
- data/lib/google/cloud/speech/v1/speech/operations.rb +149 -37
- data/lib/google/cloud/speech/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/speech/v1/cloud_speech.rb +45 -10
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 379e92e549103dc1380fa9575fc75eedcf5f5fa30b91337ad0bea4da5776a69f
|
4
|
+
data.tar.gz: 8013de3bba51af43d6bccbc4cc2c83020774cefbac956fcd0836685071d2ba2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 568ce91f8be48d7659f8bde1037ab2f598fea9d7f079e9d4424ebbdddb77dc334b26ef5f36cadbd249592b96fa3b3de0b429f35fc8ad8c1a169cda892864e2ad
|
7
|
+
data.tar.gz: e0258c9d483b3c4ea234c098ce216765548da66ee7154393864bee9119df0bd6633492b81f74dc895451ccf12aa1e10c16197a5879b55396daa40476e0489c80
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-speech-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Speech::V1::Speech::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SPEECH_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SPEECH_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/speech/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Speech::V1::Speech::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/speech/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/speech/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/speech/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Speech::V1::Speech::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Speech::V1::RecognizeRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.recognize request
|
38
38
|
```
|
39
39
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/speech/v1/cloud_speech.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,7 +8,10 @@ require 'google/longrunning/operations_pb'
|
|
10
8
|
require 'google/protobuf/any_pb'
|
11
9
|
require 'google/protobuf/duration_pb'
|
12
10
|
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/protobuf/wrappers_pb'
|
13
12
|
require 'google/rpc/status_pb'
|
13
|
+
require 'google/protobuf'
|
14
|
+
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
16
|
add_file("google/cloud/speech/v1/cloud_speech.proto", :syntax => :proto3) do
|
16
17
|
add_message "google.cloud.speech.v1.RecognizeRequest" do
|
@@ -20,6 +21,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
21
|
add_message "google.cloud.speech.v1.LongRunningRecognizeRequest" do
|
21
22
|
optional :config, :message, 1, "google.cloud.speech.v1.RecognitionConfig"
|
22
23
|
optional :audio, :message, 2, "google.cloud.speech.v1.RecognitionAudio"
|
24
|
+
optional :output_config, :message, 4, "google.cloud.speech.v1.TranscriptOutputConfig"
|
25
|
+
end
|
26
|
+
add_message "google.cloud.speech.v1.TranscriptOutputConfig" do
|
27
|
+
oneof :output_type do
|
28
|
+
optional :gcs_uri, :string, 1
|
29
|
+
end
|
23
30
|
end
|
24
31
|
add_message "google.cloud.speech.v1.StreamingRecognizeRequest" do
|
25
32
|
oneof :streaming_request do
|
@@ -116,19 +123,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
116
123
|
end
|
117
124
|
add_message "google.cloud.speech.v1.RecognizeResponse" do
|
118
125
|
repeated :results, :message, 2, "google.cloud.speech.v1.SpeechRecognitionResult"
|
126
|
+
optional :total_billed_time, :message, 3, "google.protobuf.Duration"
|
119
127
|
end
|
120
128
|
add_message "google.cloud.speech.v1.LongRunningRecognizeResponse" do
|
121
129
|
repeated :results, :message, 2, "google.cloud.speech.v1.SpeechRecognitionResult"
|
130
|
+
optional :total_billed_time, :message, 3, "google.protobuf.Duration"
|
122
131
|
end
|
123
132
|
add_message "google.cloud.speech.v1.LongRunningRecognizeMetadata" do
|
124
133
|
optional :progress_percent, :int32, 1
|
125
134
|
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
126
135
|
optional :last_update_time, :message, 3, "google.protobuf.Timestamp"
|
136
|
+
optional :uri, :string, 4
|
127
137
|
end
|
128
138
|
add_message "google.cloud.speech.v1.StreamingRecognizeResponse" do
|
129
139
|
optional :error, :message, 1, "google.rpc.Status"
|
130
140
|
repeated :results, :message, 2, "google.cloud.speech.v1.StreamingRecognitionResult"
|
131
141
|
optional :speech_event_type, :enum, 4, "google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType"
|
142
|
+
optional :total_billed_time, :message, 5, "google.protobuf.Duration"
|
132
143
|
end
|
133
144
|
add_enum "google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType" do
|
134
145
|
value :SPEECH_EVENT_UNSPECIFIED, 0
|
@@ -166,6 +177,7 @@ module Google
|
|
166
177
|
module V1
|
167
178
|
RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognizeRequest").msgclass
|
168
179
|
LongRunningRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeRequest").msgclass
|
180
|
+
TranscriptOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptOutputConfig").msgclass
|
169
181
|
StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeRequest").msgclass
|
170
182
|
StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionConfig").msgclass
|
171
183
|
RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionConfig").msgclass
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/cloud/speech/v1/cloud_speech.proto for package 'google.cloud.speech.v1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2021 Google LLC
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -15,7 +15,6 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
-
#
|
19
18
|
|
20
19
|
require 'grpc'
|
21
20
|
require 'google/cloud/speech/v1/cloud_speech_pb'
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::Speech::V1::Speech::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all Speech clients
|
45
|
+
# ::Google::Cloud::Speech::V1::Speech::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -65,20 +64,14 @@ module Google
|
|
65
64
|
|
66
65
|
default_config.rpcs.recognize.timeout = 5000.0
|
67
66
|
default_config.rpcs.recognize.retry_policy = {
|
68
|
-
initial_delay: 0.1,
|
69
|
-
max_delay: 60.0,
|
70
|
-
multiplier: 1.3,
|
71
|
-
retry_codes: [14, 4]
|
67
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
72
68
|
}
|
73
69
|
|
74
70
|
default_config.rpcs.long_running_recognize.timeout = 5000.0
|
75
71
|
|
76
72
|
default_config.rpcs.streaming_recognize.timeout = 5000.0
|
77
73
|
default_config.rpcs.streaming_recognize.retry_policy = {
|
78
|
-
initial_delay: 0.1,
|
79
|
-
max_delay: 60.0,
|
80
|
-
multiplier: 1.3,
|
81
|
-
retry_codes: [14, 4]
|
74
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
82
75
|
}
|
83
76
|
|
84
77
|
default_config
|
@@ -110,19 +103,15 @@ module Google
|
|
110
103
|
##
|
111
104
|
# Create a new Speech client object.
|
112
105
|
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
# To create a new Speech client with the default
|
116
|
-
# configuration:
|
106
|
+
# @example
|
117
107
|
#
|
118
|
-
#
|
108
|
+
# # Create a client using the default configuration
|
109
|
+
# client = ::Google::Cloud::Speech::V1::Speech::Client.new
|
119
110
|
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
# config.timeout = 10.0
|
125
|
-
# end
|
111
|
+
# # Create a client using a custom configuration
|
112
|
+
# client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config|
|
113
|
+
# config.timeout = 10.0
|
114
|
+
# end
|
126
115
|
#
|
127
116
|
# @yield [config] Configure the Speech client.
|
128
117
|
# @yieldparam config [Client::Configuration]
|
@@ -142,14 +131,13 @@ module Google
|
|
142
131
|
|
143
132
|
# Create credentials
|
144
133
|
credentials = @config.credentials
|
145
|
-
# Use self-signed JWT if the
|
134
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
146
135
|
# but only if the default endpoint does not have a region prefix.
|
147
|
-
enable_self_signed_jwt = @config.
|
148
|
-
@config.endpoint == Client.configure.endpoint &&
|
136
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
149
137
|
!@config.endpoint.split(".").first.include?("-")
|
150
138
|
credentials ||= Credentials.default scope: @config.scope,
|
151
139
|
enable_self_signed_jwt: enable_self_signed_jwt
|
152
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
140
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
153
141
|
credentials = Credentials.new credentials, scope: @config.scope
|
154
142
|
end
|
155
143
|
@quota_project_id = @config.quota_project
|
@@ -211,6 +199,21 @@ module Google
|
|
211
199
|
#
|
212
200
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
213
201
|
#
|
202
|
+
# @example Basic example
|
203
|
+
# require "google/cloud/speech/v1"
|
204
|
+
#
|
205
|
+
# # Create a client object. The client can be reused for multiple calls.
|
206
|
+
# client = Google::Cloud::Speech::V1::Speech::Client.new
|
207
|
+
#
|
208
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
209
|
+
# request = Google::Cloud::Speech::V1::RecognizeRequest.new
|
210
|
+
#
|
211
|
+
# # Call the recognize method.
|
212
|
+
# result = client.recognize request
|
213
|
+
#
|
214
|
+
# # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse.
|
215
|
+
# p result
|
216
|
+
#
|
214
217
|
def recognize request, options = nil
|
215
218
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
216
219
|
|
@@ -231,7 +234,9 @@ module Google
|
|
231
234
|
options.apply_defaults timeout: @config.rpcs.recognize.timeout,
|
232
235
|
metadata: metadata,
|
233
236
|
retry_policy: @config.rpcs.recognize.retry_policy
|
234
|
-
|
237
|
+
|
238
|
+
options.apply_defaults timeout: @config.timeout,
|
239
|
+
metadata: @config.metadata,
|
235
240
|
retry_policy: @config.retry_policy
|
236
241
|
|
237
242
|
@speech_stub.call_rpc :recognize, request, options: options do |response, operation|
|
@@ -260,7 +265,7 @@ module Google
|
|
260
265
|
# @param options [::Gapic::CallOptions, ::Hash]
|
261
266
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
262
267
|
#
|
263
|
-
# @overload long_running_recognize(config: nil, audio: nil)
|
268
|
+
# @overload long_running_recognize(config: nil, audio: nil, output_config: nil)
|
264
269
|
# Pass arguments to `long_running_recognize` via keyword arguments. Note that at
|
265
270
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
266
271
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -270,6 +275,8 @@ module Google
|
|
270
275
|
# process the request.
|
271
276
|
# @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash]
|
272
277
|
# Required. The audio data to be recognized.
|
278
|
+
# @param output_config [::Google::Cloud::Speech::V1::TranscriptOutputConfig, ::Hash]
|
279
|
+
# Optional. Specifies an optional destination for the recognition results.
|
273
280
|
#
|
274
281
|
# @yield [response, operation] Access the result along with the RPC operation
|
275
282
|
# @yieldparam response [::Gapic::Operation]
|
@@ -279,6 +286,28 @@ module Google
|
|
279
286
|
#
|
280
287
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
281
288
|
#
|
289
|
+
# @example Basic example
|
290
|
+
# require "google/cloud/speech/v1"
|
291
|
+
#
|
292
|
+
# # Create a client object. The client can be reused for multiple calls.
|
293
|
+
# client = Google::Cloud::Speech::V1::Speech::Client.new
|
294
|
+
#
|
295
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
296
|
+
# request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new
|
297
|
+
#
|
298
|
+
# # Call the long_running_recognize method.
|
299
|
+
# result = client.long_running_recognize request
|
300
|
+
#
|
301
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
302
|
+
# # object to check the status of an operation, cancel it, or wait
|
303
|
+
# # for results. Here is how to block until completion:
|
304
|
+
# result.wait_until_done! timeout: 60
|
305
|
+
# if result.response?
|
306
|
+
# p result.response
|
307
|
+
# else
|
308
|
+
# puts "Error!"
|
309
|
+
# end
|
310
|
+
#
|
282
311
|
def long_running_recognize request, options = nil
|
283
312
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
284
313
|
|
@@ -299,7 +328,9 @@ module Google
|
|
299
328
|
options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout,
|
300
329
|
metadata: metadata,
|
301
330
|
retry_policy: @config.rpcs.long_running_recognize.retry_policy
|
302
|
-
|
331
|
+
|
332
|
+
options.apply_defaults timeout: @config.timeout,
|
333
|
+
metadata: @config.metadata,
|
303
334
|
retry_policy: @config.retry_policy
|
304
335
|
|
305
336
|
@speech_stub.call_rpc :long_running_recognize, request, options: options do |response, operation|
|
@@ -328,6 +359,30 @@ module Google
|
|
328
359
|
#
|
329
360
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
330
361
|
#
|
362
|
+
# @example Basic example
|
363
|
+
# require "google/cloud/speech/v1"
|
364
|
+
#
|
365
|
+
# # Create a client object. The client can be reused for multiple calls.
|
366
|
+
# client = Google::Cloud::Speech::V1::Speech::Client.new
|
367
|
+
#
|
368
|
+
# # Create an input stream
|
369
|
+
# input = Gapic::StreamInput.new
|
370
|
+
#
|
371
|
+
# # Call the streaming_recognize method to start streaming.
|
372
|
+
# output = client.streaming_recognize input
|
373
|
+
#
|
374
|
+
# # Send requests on the stream. For each request, pass in keyword
|
375
|
+
# # arguments to set fields. Be sure to close the stream when done.
|
376
|
+
# input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new
|
377
|
+
# input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new
|
378
|
+
# input.close
|
379
|
+
#
|
380
|
+
# # Handle streamed responses. These may be interleaved with inputs.
|
381
|
+
# # Each response is of type ::Google::Cloud::Speech::V1::StreamingRecognizeResponse.
|
382
|
+
# output.each do |response|
|
383
|
+
# p response
|
384
|
+
# end
|
385
|
+
#
|
331
386
|
def streaming_recognize request, options = nil
|
332
387
|
unless request.is_a? ::Enumerable
|
333
388
|
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
|
@@ -353,7 +408,9 @@ module Google
|
|
353
408
|
options.apply_defaults timeout: @config.rpcs.streaming_recognize.timeout,
|
354
409
|
metadata: metadata,
|
355
410
|
retry_policy: @config.rpcs.streaming_recognize.retry_policy
|
356
|
-
|
411
|
+
|
412
|
+
options.apply_defaults timeout: @config.timeout,
|
413
|
+
metadata: @config.metadata,
|
357
414
|
retry_policy: @config.retry_policy
|
358
415
|
|
359
416
|
@speech_stub.call_rpc :streaming_recognize, request, options: options do |response, operation|
|
@@ -377,22 +434,21 @@ module Google
|
|
377
434
|
# Configuration can be applied globally to all clients, or to a single client
|
378
435
|
# on construction.
|
379
436
|
#
|
380
|
-
#
|
381
|
-
#
|
382
|
-
#
|
383
|
-
# to 20 seconds,
|
384
|
-
#
|
385
|
-
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
#
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
394
|
-
#
|
395
|
-
# end
|
437
|
+
# @example
|
438
|
+
#
|
439
|
+
# # Modify the global config, setting the timeout for
|
440
|
+
# # recognize to 20 seconds,
|
441
|
+
# # and all remaining timeouts to 10 seconds.
|
442
|
+
# ::Google::Cloud::Speech::V1::Speech::Client.configure do |config|
|
443
|
+
# config.timeout = 10.0
|
444
|
+
# config.rpcs.recognize.timeout = 20.0
|
445
|
+
# end
|
446
|
+
#
|
447
|
+
# # Apply the above configuration only to a new client.
|
448
|
+
# client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config|
|
449
|
+
# config.timeout = 10.0
|
450
|
+
# config.rpcs.recognize.timeout = 20.0
|
451
|
+
# end
|
396
452
|
#
|
397
453
|
# @!attribute [rw] endpoint
|
398
454
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,16 +181,20 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::Speech::V1::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
169
192
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
193
|
metadata: metadata,
|
171
194
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
195
|
+
|
196
|
+
options.apply_defaults timeout: @config.timeout,
|
197
|
+
metadata: @config.metadata,
|
173
198
|
retry_policy: @config.retry_policy
|
174
199
|
|
175
200
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -213,6 +238,28 @@ module Google
|
|
213
238
|
#
|
214
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
215
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
216
263
|
def get_operation request, options = nil
|
217
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
218
265
|
|
@@ -230,16 +277,20 @@ module Google
|
|
230
277
|
gapic_version: ::Google::Cloud::Speech::V1::VERSION
|
231
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
232
279
|
|
233
|
-
header_params = {
|
234
|
-
|
235
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
236
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
237
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
238
287
|
|
239
288
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
289
|
metadata: metadata,
|
241
290
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
291
|
+
|
292
|
+
options.apply_defaults timeout: @config.timeout,
|
293
|
+
metadata: @config.metadata,
|
243
294
|
retry_policy: @config.retry_policy
|
244
295
|
|
245
296
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -283,6 +334,21 @@ module Google
|
|
283
334
|
#
|
284
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
285
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
286
352
|
def delete_operation request, options = nil
|
287
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
288
354
|
|
@@ -300,16 +366,20 @@ module Google
|
|
300
366
|
gapic_version: ::Google::Cloud::Speech::V1::VERSION
|
301
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
302
368
|
|
303
|
-
header_params = {
|
304
|
-
|
305
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
306
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
307
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
308
376
|
|
309
377
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
378
|
metadata: metadata,
|
311
379
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
380
|
+
|
381
|
+
options.apply_defaults timeout: @config.timeout,
|
382
|
+
metadata: @config.metadata,
|
313
383
|
retry_policy: @config.retry_policy
|
314
384
|
|
315
385
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -358,6 +428,21 @@ module Google
|
|
358
428
|
#
|
359
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
360
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
361
446
|
def cancel_operation request, options = nil
|
362
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
363
448
|
|
@@ -375,16 +460,20 @@ module Google
|
|
375
460
|
gapic_version: ::Google::Cloud::Speech::V1::VERSION
|
376
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
377
462
|
|
378
|
-
header_params = {
|
379
|
-
|
380
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
381
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
382
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
383
470
|
|
384
471
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
472
|
metadata: metadata,
|
386
473
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
474
|
+
|
475
|
+
options.apply_defaults timeout: @config.timeout,
|
476
|
+
metadata: @config.metadata,
|
388
477
|
retry_policy: @config.retry_policy
|
389
478
|
|
390
479
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -396,9 +485,9 @@ module Google
|
|
396
485
|
end
|
397
486
|
|
398
487
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
488
|
+
# Waits until the specified long-running operation is done or reaches at most
|
489
|
+
# a specified timeout, returning the latest state. If the operation is
|
490
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
491
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
492
|
# timeout is used. If the server does not support this method, it returns
|
404
493
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -436,6 +525,28 @@ module Google
|
|
436
525
|
#
|
437
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
438
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
439
550
|
def wait_operation request, options = nil
|
440
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
441
552
|
|
@@ -456,7 +567,9 @@ module Google
|
|
456
567
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
568
|
metadata: metadata,
|
458
569
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
570
|
+
|
571
|
+
options.apply_defaults timeout: @config.timeout,
|
572
|
+
metadata: @config.metadata,
|
460
573
|
retry_policy: @config.retry_policy
|
461
574
|
|
462
575
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +594,21 @@ module Google
|
|
481
594
|
# Configuration can be applied globally to all clients, or to a single client
|
482
595
|
# on construction.
|
483
596
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
597
|
+
# @example
|
598
|
+
#
|
599
|
+
# # Modify the global config, setting the timeout for
|
600
|
+
# # list_operations to 20 seconds,
|
601
|
+
# # and all remaining timeouts to 10 seconds.
|
602
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
603
|
+
# config.timeout = 10.0
|
604
|
+
# config.rpcs.list_operations.timeout = 20.0
|
605
|
+
# end
|
606
|
+
#
|
607
|
+
# # Apply the above configuration only to a new client.
|
608
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
609
|
+
# config.timeout = 10.0
|
610
|
+
# config.rpcs.list_operations.timeout = 20.0
|
611
|
+
# end
|
500
612
|
#
|
501
613
|
# @!attribute [rw] endpoint
|
502
614
|
# The hostname or hostname:port of the service endpoint.
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -43,11 +43,25 @@ module Google
|
|
43
43
|
# @!attribute [rw] audio
|
44
44
|
# @return [::Google::Cloud::Speech::V1::RecognitionAudio]
|
45
45
|
# Required. The audio data to be recognized.
|
46
|
+
# @!attribute [rw] output_config
|
47
|
+
# @return [::Google::Cloud::Speech::V1::TranscriptOutputConfig]
|
48
|
+
# Optional. Specifies an optional destination for the recognition results.
|
46
49
|
class LongRunningRecognizeRequest
|
47
50
|
include ::Google::Protobuf::MessageExts
|
48
51
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
49
52
|
end
|
50
53
|
|
54
|
+
# Specifies an optional destination for the recognition results.
|
55
|
+
# @!attribute [rw] gcs_uri
|
56
|
+
# @return [::String]
|
57
|
+
# Specifies a Cloud Storage URI for the recognition results. Must be
|
58
|
+
# specified in the format: `gs://bucket_name/object_name`, and the bucket
|
59
|
+
# must already exist.
|
60
|
+
class TranscriptOutputConfig
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
end
|
64
|
+
|
51
65
|
# The top-level message sent by the client for the `StreamingRecognize` method.
|
52
66
|
# Multiple `StreamingRecognizeRequest` messages are sent. The first message
|
53
67
|
# must contain a `streaming_config` message and must not contain
|
@@ -92,6 +106,16 @@ module Google
|
|
92
106
|
# `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
|
93
107
|
# more than one `StreamingRecognitionResult` with the `is_final` flag set to
|
94
108
|
# `true`.
|
109
|
+
#
|
110
|
+
# The `single_utterance` field can only be used with specified models,
|
111
|
+
# otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
|
112
|
+
# must be set to:
|
113
|
+
#
|
114
|
+
# * `command_and_search`
|
115
|
+
# * `phone_call` AND additional field `useEnhanced`=`true`
|
116
|
+
# * The `model` field is left undefined. In this case the API auto-selects
|
117
|
+
# a model based on any other parameters that you set in
|
118
|
+
# `RecognitionConfig`.
|
95
119
|
# @!attribute [rw] interim_results
|
96
120
|
# @return [::Boolean]
|
97
121
|
# If `true`, interim results (tentative hypotheses) may be
|
@@ -166,7 +190,7 @@ module Google
|
|
166
190
|
# A means to provide context to assist the speech recognition. For more
|
167
191
|
# information, see
|
168
192
|
# [speech
|
169
|
-
# adaptation](https://cloud.google.com/speech-to-text/docs/
|
193
|
+
# adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
|
170
194
|
# @!attribute [rw] enable_word_time_offsets
|
171
195
|
# @return [::Boolean]
|
172
196
|
# If `true`, the top result includes a list of words and
|
@@ -179,9 +203,6 @@ module Google
|
|
179
203
|
# This feature is only available in select languages. Setting this for
|
180
204
|
# requests in other languages has no effect at all.
|
181
205
|
# The default 'false' value does not add punctuation to result hypotheses.
|
182
|
-
# Note: This is currently offered as an experimental service, complimentary
|
183
|
-
# to all users. In the future this may be exclusively available as a
|
184
|
-
# premium feature.
|
185
206
|
# @!attribute [rw] diarization_config
|
186
207
|
# @return [::Google::Cloud::Speech::V1::SpeakerDiarizationConfig]
|
187
208
|
# Config to enable speaker diarization and set additional
|
@@ -217,7 +238,7 @@ module Google
|
|
217
238
|
# </tr>
|
218
239
|
# <tr>
|
219
240
|
# <td><code>video</code></td>
|
220
|
-
# <td>Best for audio that originated from
|
241
|
+
# <td>Best for audio that originated from video or includes multiple
|
221
242
|
# speakers. Ideally the audio is recorded at a 16khz or greater
|
222
243
|
# sampling rate. This is a premium model that costs more than the
|
223
244
|
# standard rate.</td>
|
@@ -253,7 +274,7 @@ module Google
|
|
253
274
|
# a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
|
254
275
|
# recognition can be reduced if lossy codecs are used to capture or transmit
|
255
276
|
# audio, particularly if background noise is present. Lossy codecs include
|
256
|
-
# `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`,
|
277
|
+
# `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`.
|
257
278
|
#
|
258
279
|
# The `FLAC` and `WAV` audio file formats include a header that describes the
|
259
280
|
# included audio content. You can request recognition for `WAV` files that
|
@@ -329,7 +350,7 @@ module Google
|
|
329
350
|
# number of speakers. If not set, the default value is 6.
|
330
351
|
# @!attribute [r] speaker_tag
|
331
352
|
# @return [::Integer]
|
332
|
-
# Unused.
|
353
|
+
# Output only. Unused.
|
333
354
|
class SpeakerDiarizationConfig
|
334
355
|
include ::Google::Protobuf::MessageExts
|
335
356
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -516,6 +537,9 @@ module Google
|
|
516
537
|
# @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionResult>]
|
517
538
|
# Sequential list of transcription results corresponding to
|
518
539
|
# sequential portions of audio.
|
540
|
+
# @!attribute [rw] total_billed_time
|
541
|
+
# @return [::Google::Protobuf::Duration]
|
542
|
+
# When available, billed audio seconds for the corresponding request.
|
519
543
|
class RecognizeResponse
|
520
544
|
include ::Google::Protobuf::MessageExts
|
521
545
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -530,6 +554,9 @@ module Google
|
|
530
554
|
# @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionResult>]
|
531
555
|
# Sequential list of transcription results corresponding to
|
532
556
|
# sequential portions of audio.
|
557
|
+
# @!attribute [rw] total_billed_time
|
558
|
+
# @return [::Google::Protobuf::Duration]
|
559
|
+
# When available, billed audio seconds for the corresponding request.
|
533
560
|
class LongRunningRecognizeResponse
|
534
561
|
include ::Google::Protobuf::MessageExts
|
535
562
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -548,6 +575,10 @@ module Google
|
|
548
575
|
# @!attribute [rw] last_update_time
|
549
576
|
# @return [::Google::Protobuf::Timestamp]
|
550
577
|
# Time of the most recent processing update.
|
578
|
+
# @!attribute [r] uri
|
579
|
+
# @return [::String]
|
580
|
+
# Output only. The URI of the audio file being transcribed. Empty if the audio was sent
|
581
|
+
# as byte content.
|
551
582
|
class LongRunningRecognizeMetadata
|
552
583
|
include ::Google::Protobuf::MessageExts
|
553
584
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -559,8 +590,8 @@ module Google
|
|
559
590
|
# audio, and `single_utterance` is set to false, then no messages are streamed
|
560
591
|
# back to the client.
|
561
592
|
#
|
562
|
-
# Here's an example of a series of
|
563
|
-
#
|
593
|
+
# Here's an example of a series of `StreamingRecognizeResponse`s that might be
|
594
|
+
# returned while processing audio:
|
564
595
|
#
|
565
596
|
# 1. results { alternatives { transcript: "tube" } stability: 0.01 }
|
566
597
|
#
|
@@ -615,6 +646,10 @@ module Google
|
|
615
646
|
# @!attribute [rw] speech_event_type
|
616
647
|
# @return [::Google::Cloud::Speech::V1::StreamingRecognizeResponse::SpeechEventType]
|
617
648
|
# Indicates the type of speech event.
|
649
|
+
# @!attribute [rw] total_billed_time
|
650
|
+
# @return [::Google::Protobuf::Duration]
|
651
|
+
# When available, billed audio seconds for the stream.
|
652
|
+
# Set only if this is the last response in the stream.
|
618
653
|
class StreamingRecognizeResponse
|
619
654
|
include ::Google::Protobuf::MessageExts
|
620
655
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -738,7 +773,7 @@ module Google
|
|
738
773
|
# The word corresponding to this set of information.
|
739
774
|
# @!attribute [r] speaker_tag
|
740
775
|
# @return [::Integer]
|
741
|
-
# A distinct integer value is assigned for every speaker within
|
776
|
+
# Output only. A distinct integer value is assigned for every speaker within
|
742
777
|
# the audio. This field specifies which one of those speakers was detected to
|
743
778
|
# have spoken this word. Value ranges from '1' to diarization_speaker_count.
|
744
779
|
# speaker_tag is set if enable_speaker_diarization = 'true' and only in the
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# Wrapper message for `double`.
|
23
|
+
#
|
24
|
+
# The JSON representation for `DoubleValue` is JSON number.
|
25
|
+
# @!attribute [rw] value
|
26
|
+
# @return [::Float]
|
27
|
+
# The double value.
|
28
|
+
class DoubleValue
|
29
|
+
include ::Google::Protobuf::MessageExts
|
30
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
31
|
+
end
|
32
|
+
|
33
|
+
# Wrapper message for `float`.
|
34
|
+
#
|
35
|
+
# The JSON representation for `FloatValue` is JSON number.
|
36
|
+
# @!attribute [rw] value
|
37
|
+
# @return [::Float]
|
38
|
+
# The float value.
|
39
|
+
class FloatValue
|
40
|
+
include ::Google::Protobuf::MessageExts
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
end
|
43
|
+
|
44
|
+
# Wrapper message for `int64`.
|
45
|
+
#
|
46
|
+
# The JSON representation for `Int64Value` is JSON string.
|
47
|
+
# @!attribute [rw] value
|
48
|
+
# @return [::Integer]
|
49
|
+
# The int64 value.
|
50
|
+
class Int64Value
|
51
|
+
include ::Google::Protobuf::MessageExts
|
52
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# Wrapper message for `uint64`.
|
56
|
+
#
|
57
|
+
# The JSON representation for `UInt64Value` is JSON string.
|
58
|
+
# @!attribute [rw] value
|
59
|
+
# @return [::Integer]
|
60
|
+
# The uint64 value.
|
61
|
+
class UInt64Value
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# Wrapper message for `int32`.
|
67
|
+
#
|
68
|
+
# The JSON representation for `Int32Value` is JSON number.
|
69
|
+
# @!attribute [rw] value
|
70
|
+
# @return [::Integer]
|
71
|
+
# The int32 value.
|
72
|
+
class Int32Value
|
73
|
+
include ::Google::Protobuf::MessageExts
|
74
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
75
|
+
end
|
76
|
+
|
77
|
+
# Wrapper message for `uint32`.
|
78
|
+
#
|
79
|
+
# The JSON representation for `UInt32Value` is JSON number.
|
80
|
+
# @!attribute [rw] value
|
81
|
+
# @return [::Integer]
|
82
|
+
# The uint32 value.
|
83
|
+
class UInt32Value
|
84
|
+
include ::Google::Protobuf::MessageExts
|
85
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
86
|
+
end
|
87
|
+
|
88
|
+
# Wrapper message for `bool`.
|
89
|
+
#
|
90
|
+
# The JSON representation for `BoolValue` is JSON `true` and `false`.
|
91
|
+
# @!attribute [rw] value
|
92
|
+
# @return [::Boolean]
|
93
|
+
# The bool value.
|
94
|
+
class BoolValue
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
|
+
end
|
98
|
+
|
99
|
+
# Wrapper message for `string`.
|
100
|
+
#
|
101
|
+
# The JSON representation for `StringValue` is JSON string.
|
102
|
+
# @!attribute [rw] value
|
103
|
+
# @return [::String]
|
104
|
+
# The string value.
|
105
|
+
class StringValue
|
106
|
+
include ::Google::Protobuf::MessageExts
|
107
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
108
|
+
end
|
109
|
+
|
110
|
+
# Wrapper message for `bytes`.
|
111
|
+
#
|
112
|
+
# The JSON representation for `BytesValue` is JSON string.
|
113
|
+
# @!attribute [rw] value
|
114
|
+
# @return [::String]
|
115
|
+
# The bytes value.
|
116
|
+
class BytesValue
|
117
|
+
include ::Google::Protobuf::MessageExts
|
118
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-speech-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -191,6 +191,7 @@ files:
|
|
191
191
|
- proto_docs/google/protobuf/duration.rb
|
192
192
|
- proto_docs/google/protobuf/empty.rb
|
193
193
|
- proto_docs/google/protobuf/timestamp.rb
|
194
|
+
- proto_docs/google/protobuf/wrappers.rb
|
194
195
|
- proto_docs/google/rpc/status.rb
|
195
196
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
196
197
|
licenses:
|