google-cloud-speech-v1p1beta1 0.2.1 → 0.3.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: 4adf8d1e4eeaa7f2155224cecb3e8c0e92c2a5ccafac16e989a532f58cc34c61
4
- data.tar.gz: 1d0cbe2deab182a6216f549a2067deab137103c2440e4c1c19156ae2365f7edc
3
+ metadata.gz: 2a7d36a6b4cca7e0ddeb2ebe2f047f527f80d35c2716e2e3b1d1d05af8fee913
4
+ data.tar.gz: 1b3d02f922b52450d6c81e4571624d416989bf87ee58ab948cbd2dab2d446081
5
5
  SHA512:
6
- metadata.gz: 8ef921b6faf8847146e3bf9bd1a6b8ec036818c1871fed7681768e5352e2dce8cdea2b77181665ba5d6f292971c261e65517ab1bcd1b8a1ae0a0fb1c8e4354cf
7
- data.tar.gz: 6f661908a45d4c6dadb9e5a14ece5d78ff25f1786aa110bb867b4aba0827cd4011d0588782579640d4897fe861c69b5a64b411c3ba50957152cf85c9bca114ca
6
+ metadata.gz: 649391dfa060f9ae0ea83d8514c584c57fa9504fa8c8f9e46943150a6d2ef57ffe506bdd8e763a0e16373a5486cf8ffd3e4949194e33b7ea027faaf6f3558d79
7
+ data.tar.gz: f5fb885007ba53979d48bb683a35f76ef6614f871abf38b72363a91556560206799ba28d2b610066f5d9937b594ddca9c405273913b22a93b714a0562df56907
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-v1p1beta1/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.
@@ -35,17 +35,17 @@ module Google
35
35
 
36
36
  # Performs synchronous speech recognition: receive results after all audio
37
37
  # has been sent and processed.
38
- rpc :Recognize, RecognizeRequest, RecognizeResponse
38
+ rpc :Recognize, Google::Cloud::Speech::V1p1beta1::RecognizeRequest, Google::Cloud::Speech::V1p1beta1::RecognizeResponse
39
39
  # Performs asynchronous speech recognition: receive results via the
40
40
  # google.longrunning.Operations interface. Returns either an
41
41
  # `Operation.error` or an `Operation.response` which contains
42
42
  # a `LongRunningRecognizeResponse` message.
43
43
  # For more information on asynchronous speech recognition, see the
44
44
  # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
45
- rpc :LongRunningRecognize, LongRunningRecognizeRequest, Google::Longrunning::Operation
45
+ rpc :LongRunningRecognize, Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, Google::Longrunning::Operation
46
46
  # Performs bidirectional streaming speech recognition: receive results while
47
47
  # sending audio. This method is only available via the gRPC API (not REST).
48
- rpc :StreamingRecognize, stream(StreamingRecognizeRequest), stream(StreamingRecognizeResponse)
48
+ rpc :StreamingRecognize, stream(Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest), stream(Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse)
49
49
  end
50
50
 
51
51
  Stub = Service.rpc_stub_class
@@ -70,7 +70,7 @@ module Google
70
70
  initial_delay: 0.1,
71
71
  max_delay: 60.0,
72
72
  multiplier: 1.3,
73
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
73
+ retry_codes: [4, 14]
74
74
  }
75
75
 
76
76
  default_config.rpcs.long_running_recognize.timeout = 5000.0
@@ -80,7 +80,7 @@ module Google
80
80
  initial_delay: 0.1,
81
81
  max_delay: 60.0,
82
82
  multiplier: 1.3,
83
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
83
+ retry_codes: [4, 14]
84
84
  }
85
85
 
86
86
  default_config
@@ -148,7 +148,8 @@ module Google
148
148
  if credentials.is_a?(String) || credentials.is_a?(Hash)
149
149
  credentials = Credentials.new credentials, scope: @config.scope
150
150
  end
151
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
152
153
 
153
154
  @operations_client = Operations.new do |config|
154
155
  config.credentials = credentials
@@ -435,24 +436,28 @@ module Google
435
436
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
436
437
  # trigger a retry.
437
438
  # @return [::Hash]
439
+ # @!attribute [rw] quota_project
440
+ # A separate project against which to charge quota.
441
+ # @return [::String]
438
442
  #
439
443
  class Configuration
440
444
  extend ::Gapic::Config
441
445
 
442
- config_attr :endpoint, "speech.googleapis.com", String
443
- config_attr :credentials, nil do |value|
446
+ config_attr :endpoint, "speech.googleapis.com", ::String
447
+ config_attr :credentials, nil do |value|
444
448
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
445
449
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
446
450
  allowed.any? { |klass| klass === value }
447
451
  end
448
- config_attr :scope, nil, ::String, ::Array, nil
449
- config_attr :lib_name, nil, ::String, nil
450
- config_attr :lib_version, nil, ::String, nil
451
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
452
- config_attr :interceptors, nil, ::Array, nil
453
- config_attr :timeout, nil, ::Numeric, nil
454
- config_attr :metadata, nil, ::Hash, nil
455
- config_attr :retry_policy, nil, ::Hash, Proc, nil
452
+ config_attr :scope, nil, ::String, ::Array, nil
453
+ config_attr :lib_name, nil, ::String, nil
454
+ config_attr :lib_version, nil, ::String, nil
455
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
456
+ config_attr :interceptors, nil, ::Array, nil
457
+ config_attr :timeout, nil, ::Numeric, nil
458
+ config_attr :metadata, nil, ::Hash, nil
459
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
460
+ config_attr :quota_project, nil, ::String, nil
456
461
 
457
462
  # @private
458
463
  def initialize parent_config = nil
@@ -468,7 +473,7 @@ module Google
468
473
  def rpcs
469
474
  @rpcs ||= begin
470
475
  parent_rpcs = nil
471
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
476
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
472
477
  Rpcs.new parent_rpcs
473
478
  end
474
479
  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 V1p1beta1
24
- VERSION = "0.2.1"
24
+ VERSION = "0.3.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-v1p1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.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-v1p1beta1.rb
141
- - lib/google/cloud/common_resources_pb.rb
142
169
  - lib/google/cloud/speech/v1p1beta1.rb
143
170
  - lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb
144
171
  - lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb
@@ -179,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
206
  - !ruby/object:Gem::Version
180
207
  version: '0'
181
208
  requirements: []
182
- rubygems_version: 3.0.6
209
+ rubygems_version: 3.1.3
183
210
  signing_key:
184
211
  specification_version: 4
185
212
  summary: API Client library for the Cloud Speech-to-Text V1p1beta1 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