google-cloud-speech-v1 0.1.4 → 0.2.4

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: e61467bec2b883587f3bbd2b40b86c3b103be3446fb34fe56d5f4281eac996aa
4
- data.tar.gz: 66649e057ae49b6a217b4061a0a54dda84e25951eabad1e8d3a845fb1b5a1169
3
+ metadata.gz: 669b006b4418754372cba923b977d2ba683ac763c2561845dbde00c060066ad8
4
+ data.tar.gz: 3ab78c9578a005002e30a00fddf84a3b652ea7940b6988064eb7f4a7d2c35c86
5
5
  SHA512:
6
- metadata.gz: 2519ad72380ad73d5bdaa281be246787df7e1ea7569c15805471d634e1d0afaafbb42a18ca5d708543d2a76d5173ed6074d059291118d4898772978251b6d013
7
- data.tar.gz: 7288627763768ab25e3cae2c0b4a0121941ababe90fefee268ff9cc9ed31922d2c3014ab11f447250f8de58c133612f6ec3facc3c5efdb67da2ba458ebbbc951
6
+ metadata.gz: 6ee168be86d6969404ef2f85a299258ea54a365c4ee9fef3e9086f702175dac7d593a353fe59b6a492ae8fc00f5d5b730848cfe3fc3b1345af4fd40a92a49aec
7
+ data.tar.gz: 619ffde5af2aa7cb73b3a7e3d48698758e06abc7ae115399b26988367a8bbb3bee072514f4f3c10f11be02ac96a00ebbddfe6e845e2b908ca7cbe94bb2383fae
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/speech.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.recognize request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-speech-v1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/speech-to-text)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -36,17 +36,17 @@ module Google
36
36
 
37
37
  # Performs synchronous speech recognition: receive results after all audio
38
38
  # has been sent and processed.
39
- rpc :Recognize, RecognizeRequest, RecognizeResponse
39
+ rpc :Recognize, Google::Cloud::Speech::V1::RecognizeRequest, Google::Cloud::Speech::V1::RecognizeResponse
40
40
  # Performs asynchronous speech recognition: receive results via the
41
41
  # google.longrunning.Operations interface. Returns either an
42
42
  # `Operation.error` or an `Operation.response` which contains
43
43
  # a `LongRunningRecognizeResponse` message.
44
44
  # For more information on asynchronous speech recognition, see the
45
45
  # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
46
- rpc :LongRunningRecognize, LongRunningRecognizeRequest, Google::Longrunning::Operation
46
+ rpc :LongRunningRecognize, Google::Cloud::Speech::V1::LongRunningRecognizeRequest, Google::Longrunning::Operation
47
47
  # Performs bidirectional streaming speech recognition: receive results while
48
48
  # sending audio. This method is only available via the gRPC API (not REST).
49
- rpc :StreamingRecognize, stream(StreamingRecognizeRequest), stream(StreamingRecognizeResponse)
49
+ rpc :StreamingRecognize, stream(Google::Cloud::Speech::V1::StreamingRecognizeRequest), stream(Google::Cloud::Speech::V1::StreamingRecognizeResponse)
50
50
  end
51
51
 
52
52
  Stub = Service.rpc_stub_class
@@ -68,7 +68,7 @@ module Google
68
68
  initial_delay: 0.1,
69
69
  max_delay: 60.0,
70
70
  multiplier: 1.3,
71
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
71
+ retry_codes: [14, 4]
72
72
  }
73
73
 
74
74
  default_config.rpcs.long_running_recognize.timeout = 5000.0
@@ -78,7 +78,7 @@ module Google
78
78
  initial_delay: 0.1,
79
79
  max_delay: 60.0,
80
80
  multiplier: 1.3,
81
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
81
+ retry_codes: [14, 4]
82
82
  }
83
83
 
84
84
  default_config
@@ -146,7 +146,8 @@ module Google
146
146
  if credentials.is_a?(String) || credentials.is_a?(Hash)
147
147
  credentials = Credentials.new credentials, scope: @config.scope
148
148
  end
149
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
149
+ @quota_project_id = @config.quota_project
150
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
151
 
151
152
  @operations_client = Operations.new do |config|
152
153
  config.credentials = credentials
@@ -433,24 +434,28 @@ module Google
433
434
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
434
435
  # trigger a retry.
435
436
  # @return [::Hash]
437
+ # @!attribute [rw] quota_project
438
+ # A separate project against which to charge quota.
439
+ # @return [::String]
436
440
  #
437
441
  class Configuration
438
442
  extend ::Gapic::Config
439
443
 
440
- config_attr :endpoint, "speech.googleapis.com", String
441
- config_attr :credentials, nil do |value|
444
+ config_attr :endpoint, "speech.googleapis.com", ::String
445
+ config_attr :credentials, nil do |value|
442
446
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
443
447
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
444
448
  allowed.any? { |klass| klass === value }
445
449
  end
446
- config_attr :scope, nil, ::String, ::Array, nil
447
- config_attr :lib_name, nil, ::String, nil
448
- config_attr :lib_version, nil, ::String, nil
449
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
450
- config_attr :interceptors, nil, ::Array, nil
451
- config_attr :timeout, nil, ::Numeric, nil
452
- config_attr :metadata, nil, ::Hash, nil
453
- config_attr :retry_policy, nil, ::Hash, Proc, nil
450
+ config_attr :scope, nil, ::String, ::Array, nil
451
+ config_attr :lib_name, nil, ::String, nil
452
+ config_attr :lib_version, nil, ::String, nil
453
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
454
+ config_attr :interceptors, nil, ::Array, nil
455
+ config_attr :timeout, nil, ::Numeric, nil
456
+ config_attr :metadata, nil, ::Hash, nil
457
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
458
+ config_attr :quota_project, nil, ::String, nil
454
459
 
455
460
  # @private
456
461
  def initialize parent_config = nil
@@ -466,7 +471,7 @@ module Google
466
471
  def rpcs
467
472
  @rpcs ||= begin
468
473
  parent_rpcs = nil
469
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
474
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
470
475
  Rpcs.new parent_rpcs
471
476
  end
472
477
  end
@@ -85,6 +85,8 @@ module Google
85
85
  if credentials.is_a?(String) || credentials.is_a?(Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
+ @quota_project_id = @config.quota_project
89
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
88
90
 
89
91
  @operations_stub = ::Gapic::ServiceStub.new(
90
92
  ::Google::Longrunning::Operations::Stub,
@@ -464,24 +466,28 @@ module Google
464
466
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
465
467
  # trigger a retry.
466
468
  # @return [::Hash]
469
+ # @!attribute [rw] quota_project
470
+ # A separate project against which to charge quota.
471
+ # @return [::String]
467
472
  #
468
473
  class Configuration
469
474
  extend ::Gapic::Config
470
475
 
471
- config_attr :endpoint, "speech.googleapis.com", String
472
- config_attr :credentials, nil do |value|
476
+ config_attr :endpoint, "speech.googleapis.com", ::String
477
+ config_attr :credentials, nil do |value|
473
478
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
474
479
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
475
480
  allowed.any? { |klass| klass === value }
476
481
  end
477
- config_attr :scope, nil, ::String, ::Array, nil
478
- config_attr :lib_name, nil, ::String, nil
479
- config_attr :lib_version, nil, ::String, nil
480
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
481
- config_attr :interceptors, nil, ::Array, nil
482
- config_attr :timeout, nil, ::Numeric, nil
483
- config_attr :metadata, nil, ::Hash, nil
484
- config_attr :retry_policy, nil, ::Hash, Proc, nil
482
+ config_attr :scope, nil, ::String, ::Array, nil
483
+ config_attr :lib_name, nil, ::String, nil
484
+ config_attr :lib_version, nil, ::String, nil
485
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
486
+ config_attr :interceptors, nil, ::Array, nil
487
+ config_attr :timeout, nil, ::Numeric, nil
488
+ config_attr :metadata, nil, ::Hash, nil
489
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
490
+ config_attr :quota_project, nil, ::String, nil
485
491
 
486
492
  # @private
487
493
  def initialize parent_config = nil
@@ -497,7 +503,7 @@ module Google
497
503
  def rpcs
498
504
  @rpcs ||= begin
499
505
  parent_rpcs = nil
500
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
506
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
501
507
  Rpcs.new parent_rpcs
502
508
  end
503
509
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1
24
- VERSION = "0.1.4"
24
+ VERSION = "0.2.4"
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-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.4
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-05-05 00:00:00.000000000 Z
11
+ date: 2020-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,42 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.10'
61
+ version: '5.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.10'
68
+ version: '5.14'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-focus
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-rg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.2'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rake
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +166,6 @@ files:
138
166
  - LICENSE.md
139
167
  - README.md
140
168
  - lib/google-cloud-speech-v1.rb
141
- - lib/google/cloud/common_resources_pb.rb
142
169
  - lib/google/cloud/speech/v1.rb
143
170
  - lib/google/cloud/speech/v1/cloud_speech_pb.rb
144
171
  - lib/google/cloud/speech/v1/cloud_speech_services_pb.rb
@@ -176,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
203
  - !ruby/object:Gem::Version
177
204
  version: '0'
178
205
  requirements: []
179
- rubygems_version: 3.0.6
206
+ rubygems_version: 3.1.3
180
207
  signing_key:
181
208
  specification_version: 4
182
209
  summary: API Client library for the Cloud Speech-to-Text V1 API
@@ -1,15 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/common_resources.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/resource_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
9
- end
10
- end
11
-
12
- module Google
13
- module Cloud
14
- end
15
- end