google-cloud-speech 0.35.0 → 0.36.0

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: 5a486e59964640a724d7a70449004707ce610868a9d6776783758b8cefe1d01b
4
- data.tar.gz: 0db54dd44e394919bc4f20d41f0570d52c8f543a136762e34700ef7daed98730
3
+ metadata.gz: fb352210dc8f3c48b6eef990d34453bec5048458b66a72068bbe38e56c2847c3
4
+ data.tar.gz: 4376e8f43a422cb88b18cf1c378c8846b3179ad68a80c001f2e20e941b9986a9
5
5
  SHA512:
6
- metadata.gz: 56f72325d2e5420551029a13e2a1d7fd20a5eba658e3fa84998c5fc413cea15b87ea718839c309d7b6d545ba31b8f5ebdb548f0e475fe53a3bc798c0a716adf6
7
- data.tar.gz: cab1730447f4ffc096e06c35d8d71b4b018a20ffc78414db896af76fb4290b41122174874d0a1b508f00609db8d3275c473c0de36c3d43c32bff598fddc1b269
6
+ metadata.gz: 205b0c2bbad993e0742e9089f1642ea4d326f1eeb4c8d57240e46874e8efcb3069f3201c2820b591c0c5f4ef374b6d54eae1cd97bc422378a1a9d81bd19c0552
7
+ data.tar.gz: 75da456bc41a4903db719a22a15dbdc678c7c1adc2c2d80e7c637d65391af56504af0db896f027e7a2a883a4c4567951d9b6c0c66e8d6c310d3cd7bf952bde05
@@ -145,6 +145,10 @@ module Google
145
145
  # The default timeout, in seconds, for calls made through this client.
146
146
  # @param metadata [Hash]
147
147
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
148
+ # @param service_address [String]
149
+ # Override for the service hostname, or `nil` to leave as the default.
150
+ # @param service_port [Integer]
151
+ # Override for the service port, or `nil` to leave as the default.
148
152
  # @param exception_transformer [Proc]
149
153
  # An optional proc that intercepts any exceptions raised during an API call to inject
150
154
  # custom error handling.
@@ -128,6 +128,10 @@ module Google
128
128
  # The default timeout, in seconds, for calls made through this client.
129
129
  # @param metadata [Hash]
130
130
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
131
+ # @param service_address [String]
132
+ # Override for the service hostname, or `nil` to leave as the default.
133
+ # @param service_port [Integer]
134
+ # Override for the service port, or `nil` to leave as the default.
131
135
  # @param exception_transformer [Proc]
132
136
  # An optional proc that intercepts any exceptions raised during an API call to inject
133
137
  # custom error handling.
@@ -137,6 +141,8 @@ module Google
137
141
  client_config: nil,
138
142
  timeout: nil,
139
143
  metadata: nil,
144
+ service_address: nil,
145
+ service_port: nil,
140
146
  exception_transformer: nil,
141
147
  lib_name: nil,
142
148
  lib_version: nil
@@ -148,6 +154,8 @@ module Google
148
154
  metadata: metadata,
149
155
  exception_transformer: exception_transformer,
150
156
  lib_name: lib_name,
157
+ service_address: service_address,
158
+ service_port: service_port,
151
159
  lib_version: lib_version
152
160
  }.select { |_, v| v != nil }
153
161
  Google::Cloud::Speech::V1::SpeechClient.new(**kwargs)
@@ -206,19 +206,12 @@ module Google
206
206
  # @return [true, false]
207
207
  # *Optional* Set to true to use an enhanced model for speech recognition.
208
208
  # If `use_enhanced` is set to true and the `model` field is not set, then
209
- # an appropriate enhanced model is chosen if:
210
- # 1. project is eligible for requesting enhanced models
211
- # 2. an enhanced model exists for the audio
209
+ # an appropriate enhanced model is chosen if an enhanced model exists for
210
+ # the audio.
212
211
  #
213
212
  # If `use_enhanced` is true and an enhanced version of the specified model
214
213
  # does not exist, then the speech is recognized using the standard version
215
214
  # of the specified model.
216
- #
217
- # Enhanced speech models require that you opt-in to data logging using
218
- # instructions in the
219
- # [documentation](https://cloud.google.com/speech-to-text/docs/enable-data-logging). If you set
220
- # `use_enhanced` to true and you have not enabled audio logging, then you
221
- # will receive an error.
222
215
  class RecognitionConfig
223
216
  # The encoding of the audio data sent in the request.
224
217
  #
@@ -92,6 +92,10 @@ module Google
92
92
  # The default timeout, in seconds, for calls made through this client.
93
93
  # @param metadata [Hash]
94
94
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
95
+ # @param service_address [String]
96
+ # Override for the service hostname, or `nil` to leave as the default.
97
+ # @param service_port [Integer]
98
+ # Override for the service port, or `nil` to leave as the default.
95
99
  # @param exception_transformer [Proc]
96
100
  # An optional proc that intercepts any exceptions raised during an API call to inject
97
101
  # custom error handling.
@@ -101,6 +105,8 @@ module Google
101
105
  client_config: {},
102
106
  timeout: DEFAULT_TIMEOUT,
103
107
  metadata: nil,
108
+ service_address: nil,
109
+ service_port: nil,
104
110
  exception_transformer: nil,
105
111
  lib_name: nil,
106
112
  lib_version: ""
@@ -118,7 +124,10 @@ module Google
118
124
  client_config: client_config,
119
125
  timeout: timeout,
120
126
  lib_name: lib_name,
127
+ service_address: service_address,
128
+ service_port: service_port,
121
129
  lib_version: lib_version,
130
+ metadata: metadata,
122
131
  )
123
132
 
124
133
  if credentials.is_a?(String) || credentials.is_a?(Hash)
@@ -163,8 +172,8 @@ module Google
163
172
  end
164
173
 
165
174
  # Allow overriding the service path/port in subclasses.
166
- service_path = self.class::SERVICE_ADDRESS
167
- port = self.class::DEFAULT_SERVICE_PORT
175
+ service_path = service_address || self.class::SERVICE_ADDRESS
176
+ port = service_port || self.class::DEFAULT_SERVICE_PORT
168
177
  interceptors = self.class::GRPC_INTERCEPTORS
169
178
  @speech_stub = Google::Gax::Grpc.create_stub(
170
179
  service_path,
@@ -127,6 +127,10 @@ module Google
127
127
  # The default timeout, in seconds, for calls made through this client.
128
128
  # @param metadata [Hash]
129
129
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
130
+ # @param service_address [String]
131
+ # Override for the service hostname, or `nil` to leave as the default.
132
+ # @param service_port [Integer]
133
+ # Override for the service port, or `nil` to leave as the default.
130
134
  # @param exception_transformer [Proc]
131
135
  # An optional proc that intercepts any exceptions raised during an API call to inject
132
136
  # custom error handling.
@@ -136,6 +140,8 @@ module Google
136
140
  client_config: nil,
137
141
  timeout: nil,
138
142
  metadata: nil,
143
+ service_address: nil,
144
+ service_port: nil,
139
145
  exception_transformer: nil,
140
146
  lib_name: nil,
141
147
  lib_version: nil
@@ -147,6 +153,8 @@ module Google
147
153
  metadata: metadata,
148
154
  exception_transformer: exception_transformer,
149
155
  lib_name: lib_name,
156
+ service_address: service_address,
157
+ service_port: service_port,
150
158
  lib_version: lib_version
151
159
  }.select { |_, v| v != nil }
152
160
  Google::Cloud::Speech::V1p1beta1::SpeechClient.new(**kwargs)
@@ -243,19 +243,12 @@ module Google
243
243
  # @return [true, false]
244
244
  # *Optional* Set to true to use an enhanced model for speech recognition.
245
245
  # If `use_enhanced` is set to true and the `model` field is not set, then
246
- # an appropriate enhanced model is chosen if:
247
- # 1. project is eligible for requesting enhanced models
248
- # 2. an enhanced model exists for the audio
246
+ # an appropriate enhanced model is chosen if an enhanced model exists for
247
+ # the audio.
249
248
  #
250
249
  # If `use_enhanced` is true and an enhanced version of the specified model
251
250
  # does not exist, then the speech is recognized using the standard version
252
251
  # of the specified model.
253
- #
254
- # Enhanced speech models require that you opt-in to data logging using
255
- # instructions in the
256
- # [documentation](https://cloud.google.com/speech-to-text/docs/enable-data-logging). If you set
257
- # `use_enhanced` to true and you have not enabled audio logging, then you
258
- # will receive an error.
259
252
  class RecognitionConfig
260
253
  # The encoding of the audio data sent in the request.
261
254
  #
@@ -92,6 +92,10 @@ module Google
92
92
  # The default timeout, in seconds, for calls made through this client.
93
93
  # @param metadata [Hash]
94
94
  # Default metadata to be sent with each request. This can be overridden on a per call basis.
95
+ # @param service_address [String]
96
+ # Override for the service hostname, or `nil` to leave as the default.
97
+ # @param service_port [Integer]
98
+ # Override for the service port, or `nil` to leave as the default.
95
99
  # @param exception_transformer [Proc]
96
100
  # An optional proc that intercepts any exceptions raised during an API call to inject
97
101
  # custom error handling.
@@ -101,6 +105,8 @@ module Google
101
105
  client_config: {},
102
106
  timeout: DEFAULT_TIMEOUT,
103
107
  metadata: nil,
108
+ service_address: nil,
109
+ service_port: nil,
104
110
  exception_transformer: nil,
105
111
  lib_name: nil,
106
112
  lib_version: ""
@@ -118,7 +124,10 @@ module Google
118
124
  client_config: client_config,
119
125
  timeout: timeout,
120
126
  lib_name: lib_name,
127
+ service_address: service_address,
128
+ service_port: service_port,
121
129
  lib_version: lib_version,
130
+ metadata: metadata,
122
131
  )
123
132
 
124
133
  if credentials.is_a?(String) || credentials.is_a?(Hash)
@@ -163,8 +172,8 @@ module Google
163
172
  end
164
173
 
165
174
  # Allow overriding the service path/port in subclasses.
166
- service_path = self.class::SERVICE_ADDRESS
167
- port = self.class::DEFAULT_SERVICE_PORT
175
+ service_path = service_address || self.class::SERVICE_ADDRESS
176
+ port = service_port || self.class::DEFAULT_SERVICE_PORT
168
177
  interceptors = self.class::GRPC_INTERCEPTORS
169
178
  @speech_stub = Google::Gax::Grpc.create_stub(
170
179
  service_path,
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Speech
19
- VERSION = "0.35.0".freeze
19
+ VERSION = "0.36.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-speech
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-13 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '1.7'
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: '1.3'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement