google-cloud-speech-v1p1beta1 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9f64648fce116e6454625687872ead20b4492ded325ddd341c93b3fc67dcc21
4
- data.tar.gz: 8a85608ac077f1e3a41edee203e81a6744267cdcf4ebe76cc4cfe420cecb5034
3
+ metadata.gz: 6c6bc0706103287ffb5c7469703cf1bdb73a4026f59f4faaabd99e26031f12de
4
+ data.tar.gz: 3a37318b3774468f004c6ab6a33322a575da10ff0fa39d6865e42d7c119fa90a
5
5
  SHA512:
6
- metadata.gz: 00ec80572357ce3e2d29859b7febb485e23046f380414898fe2499ac264e42c41c278f9134b5f0cacc94ee2df7a16fa5692b9bfa559554dc3d8f48c57d1a727f
7
- data.tar.gz: 9b86938fd56b356b4c0876412b426a543965524ee92f8c3ef29477c8104d6513de48e1f308228ac79bf01500588c51501306b3387e9c534f2f6eef852e0a1a68
6
+ metadata.gz: 64d2b0d2ebca78a6cfd91ff449e5fa36c332c5f63dce229c569177945c62a3ec0eccfd9a3156465d200f7a5feda0f6e09f91f82ec25aef5f5c4f93a81e46ab6c
7
+ data.tar.gz: d0814247cad779daa3b295d889fd8a075f17be06cae99ebc7cf75941d25ca31219deeaa8db141d1de0145cafe0abee5ad0d0b1c7fd7b627e1e9950a32a393738
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Cloud Speech-to-Text V1p1beta1
1
+ # Ruby Client for the Cloud Speech-to-Text V1p1beta1 API
2
2
 
3
3
  API Client library for the Cloud Speech-to-Text V1p1beta1 API
4
4
 
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
12
12
  $ gem install google-cloud-speech-v1p1beta1
13
13
  ```
14
14
 
15
+ ## Before You Begin
16
+
17
+ In order to use this library, you first need to go through the following steps:
18
+
19
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. {file:AUTHENTICATION.md Set up authentication.}
22
+
23
+ ## Quick Start
24
+
25
+ ```ruby
26
+ require "google/cloud/speech/v1p1beta1"
27
+
28
+ client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new
29
+ request = my_create_request
30
+ response = client.recognize request
31
+ ```
32
+
33
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-speech-v1p1beta1/latest)
34
+ for class and method documentation.
35
+
36
+ ## Enabling Logging
37
+
38
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
39
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
40
+ or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
41
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
42
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
43
+
44
+ Configuring a Ruby stdlib logger:
45
+
46
+ ```ruby
47
+ require "logger"
48
+
49
+ module MyLogger
50
+ LOGGER = Logger.new $stderr, level: Logger::WARN
51
+ def logger
52
+ LOGGER
53
+ end
54
+ end
55
+
56
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
57
+ module GRPC
58
+ extend MyLogger
59
+ end
60
+ ```
61
+
15
62
  ## Supported Ruby Versions
16
63
 
17
64
  This library is supported on Ruby 2.4+.
@@ -1 +1,21 @@
1
- require "google/cloud/speech/v1p1beta1/version"
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/speech/v1p1beta1"
@@ -17,3 +17,19 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/speech/v1p1beta1/speech"
20
+ require "google/cloud/speech/v1p1beta1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Speech
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/speech/v1p1beta1"
29
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new
30
+ #
31
+ module V1p1beta1
32
+ end
33
+ end
34
+ end
35
+ end
@@ -16,6 +16,34 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/speech/v1p1beta1/speech/client"
20
- require "google/cloud/speech/v1p1beta1/speech/operations"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/speech/v1p1beta1/version"
24
+
21
25
  require "google/cloud/speech/v1p1beta1/speech/credentials"
26
+ require "google/cloud/speech/v1p1beta1/speech/operations"
27
+ require "google/cloud/speech/v1p1beta1/speech/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Speech
32
+ module V1p1beta1
33
+ ##
34
+ # Service that implements Google Cloud Speech API.
35
+ #
36
+ # To load this service and instantiate a client:
37
+ #
38
+ # require "google/cloud/speech/v1p1beta1/speech"
39
+ # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new
40
+ #
41
+ module Speech
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ helper_path = ::File.join __dir__, "speech", "helpers.rb"
49
+ require "google/cloud/speech/v1p1beta1/speech/helpers" if ::File.file? helper_path
@@ -16,15 +16,8 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/common"
20
- require "gapic/config"
21
- require "gapic/config/method"
22
-
23
19
  require "google/cloud/errors"
24
- require "google/cloud/speech/v1p1beta1/version"
25
20
  require "google/cloud/speech/v1p1beta1/cloud_speech_pb"
26
- require "google/cloud/speech/v1p1beta1/speech/credentials"
27
- require "google/cloud/speech/v1p1beta1/speech/operations"
28
21
 
29
22
  module Google
30
23
  module Cloud
@@ -175,20 +168,26 @@ module Google
175
168
  # has been sent and processed.
176
169
  #
177
170
  # @overload recognize(request, options = nil)
178
- # @param request [Google::Cloud::Speech::V1p1beta1::RecognizeRequest | Hash]
179
- # Performs synchronous speech recognition: receive results after all audio
180
- # has been sent and processed.
171
+ # Pass arguments to `recognize` via a request object, either of type
172
+ # {Google::Cloud::Speech::V1p1beta1::RecognizeRequest} or an equivalent Hash.
173
+ #
174
+ # @param request [Google::Cloud::Speech::V1p1beta1::RecognizeRequest, Hash]
175
+ # A request object representing the call parameters. Required. To specify no
176
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
181
177
  # @param options [Gapic::CallOptions, Hash]
182
178
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
183
179
  #
184
180
  # @overload recognize(config: nil, audio: nil)
185
- # @param config [Google::Cloud::Speech::V1p1beta1::RecognitionConfig | Hash]
181
+ # Pass arguments to `recognize` via keyword arguments. Note that at
182
+ # least one keyword argument is required. To specify no parameters, or to keep all
183
+ # the default parameter values, pass an empty Hash as a request object (see above).
184
+ #
185
+ # @param config [Google::Cloud::Speech::V1p1beta1::RecognitionConfig, Hash]
186
186
  # Required. Provides information to the recognizer that specifies how to
187
187
  # process the request.
188
- # @param audio [Google::Cloud::Speech::V1p1beta1::RecognitionAudio | Hash]
188
+ # @param audio [Google::Cloud::Speech::V1p1beta1::RecognitionAudio, Hash]
189
189
  # Required. The audio data to be recognized.
190
190
  #
191
- #
192
191
  # @yield [response, operation] Access the result along with the RPC operation
193
192
  # @yieldparam response [Google::Cloud::Speech::V1p1beta1::RecognizeResponse]
194
193
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -237,24 +236,26 @@ module Google
237
236
  # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
238
237
  #
239
238
  # @overload long_running_recognize(request, options = nil)
240
- # @param request [Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest | Hash]
241
- # Performs asynchronous speech recognition: receive results via the
242
- # google.longrunning.Operations interface. Returns either an
243
- # `Operation.error` or an `Operation.response` which contains
244
- # a `LongRunningRecognizeResponse` message.
245
- # For more information on asynchronous speech recognition, see the
246
- # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
239
+ # Pass arguments to `long_running_recognize` via a request object, either of type
240
+ # {Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest} or an equivalent Hash.
241
+ #
242
+ # @param request [Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, Hash]
243
+ # A request object representing the call parameters. Required. To specify no
244
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
247
245
  # @param options [Gapic::CallOptions, Hash]
248
246
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
249
247
  #
250
248
  # @overload long_running_recognize(config: nil, audio: nil)
251
- # @param config [Google::Cloud::Speech::V1p1beta1::RecognitionConfig | Hash]
249
+ # Pass arguments to `long_running_recognize` via keyword arguments. Note that at
250
+ # least one keyword argument is required. To specify no parameters, or to keep all
251
+ # the default parameter values, pass an empty Hash as a request object (see above).
252
+ #
253
+ # @param config [Google::Cloud::Speech::V1p1beta1::RecognitionConfig, Hash]
252
254
  # Required. Provides information to the recognizer that specifies how to
253
255
  # process the request.
254
- # @param audio [Google::Cloud::Speech::V1p1beta1::RecognitionAudio | Hash]
256
+ # @param audio [Google::Cloud::Speech::V1p1beta1::RecognitionAudio, Hash]
255
257
  # Required. The audio data to be recognized.
256
258
  #
257
- #
258
259
  # @yield [response, operation] Access the result along with the RPC operation
259
260
  # @yieldparam response [Gapic::Operation]
260
261
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -299,7 +300,7 @@ module Google
299
300
  # Performs bidirectional streaming speech recognition: receive results while
300
301
  # sending audio. This method is only available via the gRPC API (not REST).
301
302
  #
302
- # @param request [Gapic::StreamInput, Enumerable<Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest | Hash>]
303
+ # @param request [Gapic::StreamInput, Enumerable<Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest, Hash>]
303
304
  # An enumerable of {Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest} instances.
304
305
  # @param options [Gapic::CallOptions, Hash]
305
306
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@@ -515,13 +516,3 @@ module Google
515
516
  end
516
517
  end
517
518
  end
518
-
519
- # rubocop:disable Lint/HandleExceptions
520
-
521
- # Once client is loaded, load helpers.rb if it exists.
522
- begin
523
- require "google/cloud/speech/v1p1beta1/speech/helpers"
524
- rescue LoadError
525
- end
526
-
527
- # rubocop:enable Lint/HandleExceptions
@@ -16,11 +16,7 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/common"
20
19
  require "gapic/operation"
21
-
22
- require "google/cloud/speech/v1p1beta1/version"
23
- require "google/cloud/speech/v1p1beta1/speech/client"
24
20
  require "google/longrunning/operations_pb"
25
21
 
26
22
  module Google
@@ -109,16 +105,20 @@ module Google
109
105
  # to use different resource name schemes, such as `users/*/operations`.
110
106
  #
111
107
  # @overload list_operations(request, options = nil)
112
- # @param request [Google::Longrunning::ListOperationsRequest | Hash]
113
- # Lists operations that match the specified filter in the request. If the
114
- # server doesn't support this method, it returns `UNIMPLEMENTED`.
108
+ # Pass arguments to `list_operations` via a request object, either of type
109
+ # {Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
115
110
  #
116
- # NOTE: the `name` binding below allows API services to override the binding
117
- # to use different resource name schemes, such as `users/*/operations`.
111
+ # @param request [Google::Longrunning::ListOperationsRequest, Hash]
112
+ # A request object representing the call parameters. Required. To specify no
113
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
118
114
  # @param options [Gapic::CallOptions, Hash]
119
115
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
120
116
  #
121
117
  # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
118
+ # Pass arguments to `list_operations` via keyword arguments. Note that at
119
+ # least one keyword argument is required. To specify no parameters, or to keep all
120
+ # the default parameter values, pass an empty Hash as a request object (see above).
121
+ #
122
122
  # @param name [String]
123
123
  # The name of the operation collection.
124
124
  # @param filter [String]
@@ -128,7 +128,6 @@ module Google
128
128
  # @param page_token [String]
129
129
  # The standard list page token.
130
130
  #
131
- #
132
131
  # @yield [response, operation] Access the result along with the RPC operation
133
132
  # @yieldparam response [Gapic::PagedEnumerable<Gapic::Operation>]
134
133
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -182,18 +181,23 @@ module Google
182
181
  # service.
183
182
  #
184
183
  # @overload get_operation(request, options = nil)
185
- # @param request [Google::Longrunning::GetOperationRequest | Hash]
186
- # Gets the latest state of a long-running operation. Clients can use this
187
- # method to poll the operation result at intervals as recommended by the API
188
- # service.
184
+ # Pass arguments to `get_operation` via a request object, either of type
185
+ # {Google::Longrunning::GetOperationRequest} or an equivalent Hash.
186
+ #
187
+ # @param request [Google::Longrunning::GetOperationRequest, Hash]
188
+ # A request object representing the call parameters. Required. To specify no
189
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
189
190
  # @param options [Gapic::CallOptions, Hash]
190
191
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
191
192
  #
192
193
  # @overload get_operation(name: nil)
194
+ # Pass arguments to `get_operation` via keyword arguments. Note that at
195
+ # least one keyword argument is required. To specify no parameters, or to keep all
196
+ # the default parameter values, pass an empty Hash as a request object (see above).
197
+ #
193
198
  # @param name [String]
194
199
  # The name of the operation resource.
195
200
  #
196
- #
197
201
  # @yield [response, operation] Access the result along with the RPC operation
198
202
  # @yieldparam response [Gapic::Operation]
199
203
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -247,19 +251,23 @@ module Google
247
251
  # `google.rpc.Code.UNIMPLEMENTED`.
248
252
  #
249
253
  # @overload delete_operation(request, options = nil)
250
- # @param request [Google::Longrunning::DeleteOperationRequest | Hash]
251
- # Deletes a long-running operation. This method indicates that the client is
252
- # no longer interested in the operation result. It does not cancel the
253
- # operation. If the server doesn't support this method, it returns
254
- # `google.rpc.Code.UNIMPLEMENTED`.
254
+ # Pass arguments to `delete_operation` via a request object, either of type
255
+ # {Google::Longrunning::DeleteOperationRequest} or an equivalent Hash.
256
+ #
257
+ # @param request [Google::Longrunning::DeleteOperationRequest, Hash]
258
+ # A request object representing the call parameters. Required. To specify no
259
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
255
260
  # @param options [Gapic::CallOptions, Hash]
256
261
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
257
262
  #
258
263
  # @overload delete_operation(name: nil)
264
+ # Pass arguments to `delete_operation` via keyword arguments. Note that at
265
+ # least one keyword argument is required. To specify no parameters, or to keep all
266
+ # the default parameter values, pass an empty Hash as a request object (see above).
267
+ #
259
268
  # @param name [String]
260
269
  # The name of the operation resource to be deleted.
261
270
  #
262
- #
263
271
  # @yield [response, operation] Access the result along with the RPC operation
264
272
  # @yieldparam response [Google::Protobuf::Empty]
265
273
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -318,25 +326,23 @@ module Google
318
326
  # corresponding to `Code.CANCELLED`.
319
327
  #
320
328
  # @overload cancel_operation(request, options = nil)
321
- # @param request [Google::Longrunning::CancelOperationRequest | Hash]
322
- # Starts asynchronous cancellation on a long-running operation. The server
323
- # makes a best effort to cancel the operation, but success is not
324
- # guaranteed. If the server doesn't support this method, it returns
325
- # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
326
- # Operations.GetOperation or
327
- # other methods to check whether the cancellation succeeded or whether the
328
- # operation completed despite cancellation. On successful cancellation,
329
- # the operation is not deleted; instead, it becomes an operation with
330
- # an {Google::Longrunning::Operation#error Operation.error} value with a {Google::Rpc::Status#code google.rpc.Status.code} of 1,
331
- # corresponding to `Code.CANCELLED`.
329
+ # Pass arguments to `cancel_operation` via a request object, either of type
330
+ # {Google::Longrunning::CancelOperationRequest} or an equivalent Hash.
331
+ #
332
+ # @param request [Google::Longrunning::CancelOperationRequest, Hash]
333
+ # A request object representing the call parameters. Required. To specify no
334
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
332
335
  # @param options [Gapic::CallOptions, Hash]
333
336
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
334
337
  #
335
338
  # @overload cancel_operation(name: nil)
339
+ # Pass arguments to `cancel_operation` via keyword arguments. Note that at
340
+ # least one keyword argument is required. To specify no parameters, or to keep all
341
+ # the default parameter values, pass an empty Hash as a request object (see above).
342
+ #
336
343
  # @param name [String]
337
344
  # The name of the operation resource to be cancelled.
338
345
  #
339
- #
340
346
  # @yield [response, operation] Access the result along with the RPC operation
341
347
  # @yieldparam response [Google::Protobuf::Empty]
342
348
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1p1beta1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.1.2"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-speech-v1p1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-01 00:00:00.000000000 Z
11
+ date: 2020-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common