google-cloud-speech 0.34.0 → 0.34.1

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: 79f82529dad15e664f7a0b9a6f9768be4eb8d3544e7db4025f1bfc1baeab1ee0
4
- data.tar.gz: 47efddeda7de32c2ec89e98e1490ca3611d2db474bf8f04625bd305cf83f8189
3
+ metadata.gz: 363ea2b2a855f3a5721f14eaba4ebaea0c474912996d8777327a5593d58fb25a
4
+ data.tar.gz: 70445356ae04fe3a805efc76269d17269275d0ae4bc0e19ecc5915a63a2a5abe
5
5
  SHA512:
6
- metadata.gz: 40573fa205b8d2a0b7e703026c16f970a7099241f36632dd85de7e0201b62bf1d986395d77b7931f3c972ffeece223b6f6399b3df55f26b292cab2b00b981147
7
- data.tar.gz: ad99ff39f7c53b3d6b83838dd2be264057a881c145de1dbc749924a366feb9bd2e6ae0e1f2ac1d487fa083e9fa8eb45484dd5947a8630fa66159127a08f6a6ef
6
+ metadata.gz: e9203cea2fc78d9d8cf7dd3d98ecad2e34c9e8e55755920171312221f63c27aca05dc7958260420804c51093ae928d8a070af33286fb117defdc6d0d0094c847
7
+ data.tar.gz: 2fc1a2c2bd6dfa40ab570d3c9447f02414134640a5ed6364d54285254f070e8d65e0af10fc4d8775583361c0e1e4d296a08e6e1d8f2f41dbcefb04d7d312bb69
data/.yardopts CHANGED
@@ -7,3 +7,5 @@
7
7
  ./lib/**/*.rb
8
8
  -
9
9
  README.md
10
+ AUTHENTICATION.md
11
+ LICENSE
@@ -0,0 +1,199 @@
1
+ # Authentication
2
+
3
+ In general, the google-cloud-speech library uses [Service
4
+ Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5
+ credentials to connect to Google Cloud services. When running within [Google
6
+ Cloud Platform environments](#google-cloud-platform-environments)
7
+ the credentials will be discovered automatically. When running on other
8
+ environments, the Service Account credentials can be specified by providing the
9
+ path to the [JSON
10
+ keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
11
+ the account (or the JSON itself) in [environment
12
+ variables](#environment-variables). Additionally, Cloud SDK credentials can also
13
+ be discovered automatically, but this is only recommended during development.
14
+
15
+ ## Quickstart
16
+
17
+ 1. [Create a service account and credentials](#creating-a-service-account).
18
+ 2. Set the [environment variable](#environment-variables).
19
+
20
+ ```sh
21
+ export SPEECH_CREDENTIALS=/path/to/json`
22
+ ```
23
+
24
+ 3. Initialize the client.
25
+
26
+ ```ruby
27
+ require "google/cloud/speech"
28
+
29
+ client = Google::Cloud::Speech.new
30
+ ```
31
+
32
+ ## Project and Credential Lookup
33
+
34
+ The google-cloud-speech library aims to make authentication
35
+ as simple as possible, and provides several mechanisms to configure your system
36
+ without providing **Project ID** and **Service Account Credentials** directly in
37
+ code.
38
+
39
+ **Project ID** is discovered in the following order:
40
+
41
+ 1. Specify project ID in method arguments
42
+ 2. Specify project ID in configuration
43
+ 3. Discover project ID in environment variables
44
+ 4. Discover GCE project ID
45
+ 5. Discover project ID in credentials JSON
46
+
47
+ **Credentials** are discovered in the following order:
48
+
49
+ 1. Specify credentials in method arguments
50
+ 2. Specify credentials in configuration
51
+ 3. Discover credentials path in environment variables
52
+ 4. Discover credentials JSON in environment variables
53
+ 5. Discover credentials file in the Cloud SDK's path
54
+ 6. Discover GCE credentials
55
+
56
+ ### Google Cloud Platform environments
57
+
58
+ While running on Google Cloud Platform environments such as Google Compute
59
+ Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
60
+ The **Project ID** and **Credentials** and are discovered automatically. Code
61
+ should be written as if already authenticated. Just be sure when you [set up the
62
+ GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
63
+ access. For example:
64
+
65
+ * **All APIs**
66
+ * `https://www.googleapis.com/auth/cloud-platform`
67
+ * `https://www.googleapis.com/auth/cloud-platform.read-only`
68
+ * **BigQuery**
69
+ * `https://www.googleapis.com/auth/bigquery`
70
+ * `https://www.googleapis.com/auth/bigquery.insertdata`
71
+ * **Compute Engine**
72
+ * `https://www.googleapis.com/auth/compute`
73
+ * **Datastore**
74
+ * `https://www.googleapis.com/auth/datastore`
75
+ * `https://www.googleapis.com/auth/userinfo.email`
76
+ * **DNS**
77
+ * `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
78
+ * **Pub/Sub**
79
+ * `https://www.googleapis.com/auth/pubsub`
80
+ * **Storage**
81
+ * `https://www.googleapis.com/auth/devstorage.full_control`
82
+ * `https://www.googleapis.com/auth/devstorage.read_only`
83
+ * `https://www.googleapis.com/auth/devstorage.read_write`
84
+
85
+ ### Environment Variables
86
+
87
+ The **Project ID** and **Credentials JSON** can be placed in environment
88
+ variables instead of declaring them directly in code. Each service has its own
89
+ environment variable, allowing for different service accounts to be used for
90
+ different services. (See the READMEs for the individual service gems for
91
+ details.) The path to the **Credentials JSON** file can be stored in the
92
+ environment variable, or the **Credentials JSON** itself can be stored for
93
+ environments such as Docker containers where writing files is difficult or not
94
+ encouraged.
95
+
96
+ The environment variables that google-cloud-speech checks for project ID are:
97
+
98
+ 1. `SPEECH_PROJECT`
99
+ 2. `GOOGLE_CLOUD_PROJECT`
100
+
101
+ The environment variables that google-cloud-speech checks for credentials are configured on {Google::Cloud::Speech::V1::Credentials}:
102
+
103
+ 1. `SPEECH_CREDENTIALS` - Path to JSON file, or JSON contents
104
+ 2. `SPEECH_KEYFILE` - Path to JSON file, or JSON contents
105
+ 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
106
+ 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
107
+ 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
108
+
109
+ ```ruby
110
+ require "google/cloud/speech"
111
+
112
+ ENV["SPEECH_PROJECT"] = "my-project-id"
113
+ ENV["SPEECH_CREDENTIALS"] = "path/to/keyfile.json"
114
+
115
+ client = Google::Cloud::Speech.new
116
+ ```
117
+
118
+ ### Configuration
119
+
120
+ The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
121
+
122
+ ```ruby
123
+ require "google/cloud/speech"
124
+
125
+ Google::Cloud::Speech.configure do |config|
126
+ config.project_id = "my-project-id"
127
+ config.credentials = "path/to/keyfile.json"
128
+ end
129
+
130
+ client = Google::Cloud::Speech.new
131
+ ```
132
+
133
+ ### Cloud SDK
134
+
135
+ This option allows for an easy way to authenticate during development. If
136
+ credentials are not provided in code or in environment variables, then Cloud SDK
137
+ credentials are discovered.
138
+
139
+ To configure your system for this, simply:
140
+
141
+ 1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
142
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
143
+ 3. Write code as if already authenticated.
144
+
145
+ **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
146
+ *should* only be used during development.
147
+
148
+ [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
149
+ [dev-console]: https://console.cloud.google.com/project
150
+
151
+ [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
152
+
153
+ [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
154
+ [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
155
+ [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
156
+
157
+ ## Creating a Service Account
158
+
159
+ Google Cloud requires a **Project ID** and **Service Account Credentials** to
160
+ connect to the APIs. You will use the **Project ID** and **JSON key file** to
161
+ connect to most services with google-cloud-speech.
162
+
163
+ If you are not running this client within [Google Cloud Platform
164
+ environments](#google-cloud-platform-environments), you need a Google
165
+ Developers service account.
166
+
167
+ 1. Visit the [Google Developers Console][dev-console].
168
+ 1. Create a new project or click on an existing project.
169
+ 1. Activate the slide-out navigation tray and select **API Manager**. From
170
+ here, you will enable the APIs that your application requires.
171
+
172
+ ![Enable the APIs that your application requires][enable-apis]
173
+
174
+ *Note: You may need to enable billing in order to use these services.*
175
+
176
+ 1. Select **Credentials** from the side navigation.
177
+
178
+ You should see a screen like one of the following.
179
+
180
+ ![Create a new service account][create-new-service-account]
181
+
182
+ ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
183
+
184
+ Find the "Add credentials" drop down and select "Service account" to be
185
+ guided through downloading a new JSON key file.
186
+
187
+ If you want to re-use an existing service account, you can easily generate a
188
+ new key file. Just select the account you wish to re-use, and click "Generate
189
+ new JSON key":
190
+
191
+ ![Re-use an existing service account][reuse-service-account]
192
+
193
+ The key file you download will be used by this library to authenticate API
194
+ requests and should be stored in a secure location.
195
+
196
+ ## Troubleshooting
197
+
198
+ If you're having trouble authenticating you can ask for help by following the
199
+ {file:TROUBLESHOOTING.md Troubleshooting Guide}.
@@ -93,7 +93,8 @@ module Google
93
93
  # @return [Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding]
94
94
  # Encoding of audio data sent in all `RecognitionAudio` messages.
95
95
  # This field is optional for `FLAC` and `WAV` audio files and required
96
- # for all other audio formats. For details, see {Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
96
+ # for all other audio formats. For details, see
97
+ # {Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
97
98
  # @!attribute [rw] sample_rate_hertz
98
99
  # @return [Integer]
99
100
  # Sample rate in Hertz of the audio data sent in all
@@ -102,7 +103,8 @@ module Google
102
103
  # source to 16000 Hz. If that's not possible, use the native sample rate of
103
104
  # the audio source (instead of re-sampling).
104
105
  # This field is optional for `FLAC` and `WAV` audio files and required
105
- # for all other audio formats. For details, see {Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
106
+ # for all other audio formats. For details, see
107
+ # {Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
106
108
  # @!attribute [rw] audio_channel_count
107
109
  # @return [Integer]
108
110
  # *Optional* The number of channels in the input audio data.
@@ -234,7 +236,8 @@ module Google
234
236
  # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
235
237
  # encoding configuration must match the encoding described in the audio
236
238
  # header; otherwise the request returns an
237
- # {Google::Rpc::Code::INVALID_ARGUMENT} error code.
239
+ # {Google::Rpc::Code::INVALID_ARGUMENT} error
240
+ # code.
238
241
  module AudioEncoding
239
242
  # Not specified.
240
243
  ENCODING_UNSPECIFIED = 0
@@ -295,8 +298,8 @@ module Google
295
298
 
296
299
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
297
300
  # Either `content` or `uri` must be supplied. Supplying both or neither
298
- # returns {Google::Rpc::Code::INVALID_ARGUMENT}. See
299
- # [content limits](https://cloud.google.com/speech-to-text/quotas#content).
301
+ # returns {Google::Rpc::Code::INVALID_ARGUMENT}.
302
+ # See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
300
303
  # @!attribute [rw] content
301
304
  # @return [String]
302
305
  # The audio data bytes encoded as specified in
@@ -309,8 +312,9 @@ module Google
309
312
  # Currently, only Google Cloud Storage URIs are
310
313
  # supported, which must be specified in the following format:
311
314
  # `gs://bucket_name/object_name` (other URI formats return
312
- # {Google::Rpc::Code::INVALID_ARGUMENT}). For more information, see
313
- # [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
315
+ # {Google::Rpc::Code::INVALID_ARGUMENT}).
316
+ # For more information, see [Request
317
+ # URIs](https://cloud.google.com/storage/docs/reference-uris).
314
318
  class RecognitionAudio; end
315
319
 
316
320
  # The only message returned to the client by the `Recognize` method. It
@@ -399,8 +403,8 @@ module Google
399
403
  # one or more (repeated) `results`.
400
404
  # @!attribute [rw] error
401
405
  # @return [Google::Rpc::Status]
402
- # Output only. If set, returns a {Google::Rpc::Status} message that
403
- # specifies the error for the operation.
406
+ # Output only. If set, returns a {Google::Rpc::Status}
407
+ # message that specifies the error for the operation.
404
408
  # @!attribute [rw] results
405
409
  # @return [Array<Google::Cloud::Speech::V1::StreamingRecognitionResult>]
406
410
  # Output only. This repeated list contains zero or more results that
@@ -31,7 +31,7 @@ module Google
31
31
  # @!attribute [rw] done
32
32
  # @return [true, false]
33
33
  # If the value is `false`, it means the operation is still in progress.
34
- # If true, the operation is completed, and either `error` or `response` is
34
+ # If `true`, the operation is completed, and either `error` or `response` is
35
35
  # available.
36
36
  # @!attribute [rw] error
37
37
  # @return [Google::Rpc::Status]
@@ -97,7 +97,8 @@ module Google
97
97
  # @!attribute [rw] type_url
98
98
  # @return [String]
99
99
  # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. The last segment of the URL's path must represent
100
+ # protocol buffer message. This string must contain at least
101
+ # one "/" character. The last segment of the URL's path must represent
101
102
  # the fully qualified name of the type (as in
102
103
  # `path/google.protobuf.Duration`). The name should be in a canonical form
103
104
  # (e.g., leading "." is not accepted).
@@ -15,24 +15,25 @@
15
15
 
16
16
  module Google
17
17
  module Rpc
18
- # The `Status` type defines a logical error model that is suitable for different
19
- # programming environments, including REST APIs and RPC APIs. It is used by
20
- # [gRPC](https://github.com/grpc). The error model is designed to be:
18
+ # The `Status` type defines a logical error model that is suitable for
19
+ # different programming environments, including REST APIs and RPC APIs. It is
20
+ # used by [gRPC](https://github.com/grpc). The error model is designed to be:
21
21
  #
22
22
  # * Simple to use and understand for most users
23
23
  # * Flexible enough to meet unexpected needs
24
24
  #
25
25
  # = Overview
26
26
  #
27
- # The `Status` message contains three pieces of data: error code, error message,
28
- # and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
- # error message should be a developer-facing English message that helps
31
- # developers *understand* and *resolve* the error. If a localized user-facing
32
- # error message is needed, put the localized message in the error details or
33
- # localize it in the client. The optional error details may contain arbitrary
34
- # information about the error. There is a predefined set of error detail types
35
- # in the package `google.rpc` that can be used for common error conditions.
27
+ # The `Status` message contains three pieces of data: error code, error
28
+ # message, and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes
30
+ # if needed. The error message should be a developer-facing English message
31
+ # that helps developers *understand* and *resolve* the error. If a localized
32
+ # user-facing error message is needed, put the localized message in the error
33
+ # details or localize it in the client. The optional error details may contain
34
+ # arbitrary information about the error. There is a predefined set of error
35
+ # detail types in the package `google.rpc` that can be used for common error
36
+ # conditions.
36
37
  #
37
38
  # = Language mapping
38
39
  #
@@ -69,12 +70,14 @@ module Google
69
70
  # be used directly after any stripping needed for security/privacy reasons.
70
71
  # @!attribute [rw] code
71
72
  # @return [Integer]
72
- # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # The status code, which should be an enum value of
74
+ # {Google::Rpc::Code}.
73
75
  # @!attribute [rw] message
74
76
  # @return [String]
75
77
  # A developer-facing error message, which should be in English. Any
76
78
  # user-facing error message should be localized and sent in the
77
- # {Google::Rpc::Status#details} field, or localized by the client.
79
+ # {Google::Rpc::Status#details} field, or localized
80
+ # by the client.
78
81
  # @!attribute [rw] details
79
82
  # @return [Array<Google::Protobuf::Any>]
80
83
  # A list of messages that carry the error details. There is a common set of
@@ -93,7 +93,8 @@ module Google
93
93
  # @return [Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding]
94
94
  # Encoding of audio data sent in all `RecognitionAudio` messages.
95
95
  # This field is optional for `FLAC` and `WAV` audio files and required
96
- # for all other audio formats. For details, see {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
96
+ # for all other audio formats. For details, see
97
+ # {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
97
98
  # @!attribute [rw] sample_rate_hertz
98
99
  # @return [Integer]
99
100
  # Sample rate in Hertz of the audio data sent in all
@@ -102,7 +103,8 @@ module Google
102
103
  # source to 16000 Hz. If that's not possible, use the native sample rate of
103
104
  # the audio source (instead of re-sampling).
104
105
  # This field is optional for `FLAC` and `WAV` audio files and required
105
- # for all other audio formats. For details, see {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
106
+ # for all other audio formats. For details, see
107
+ # {Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}.
106
108
  # @!attribute [rw] audio_channel_count
107
109
  # @return [Integer]
108
110
  # *Optional* The number of channels in the input audio data.
@@ -159,9 +161,10 @@ module Google
159
161
  # won't be filtered out.
160
162
  # @!attribute [rw] speech_contexts
161
163
  # @return [Array<Google::Cloud::Speech::V1p1beta1::SpeechContext>]
162
- # *Optional* array of {Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}.
163
- # A means to provide context to assist the speech recognition. For more
164
- # information, see [Phrase Hints](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints).
164
+ # *Optional* array of
165
+ # {Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}. A means to
166
+ # provide context to assist the speech recognition. For more information, see
167
+ # [Phrase Hints](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints).
165
168
  # @!attribute [rw] enable_word_time_offsets
166
169
  # @return [true, false]
167
170
  # *Optional* If `true`, the top result includes a list of words and
@@ -273,7 +276,8 @@ module Google
273
276
  # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
274
277
  # encoding configuration must match the encoding described in the audio
275
278
  # header; otherwise the request returns an
276
- # {Google::Rpc::Code::INVALID_ARGUMENT} error code.
279
+ # {Google::Rpc::Code::INVALID_ARGUMENT} error
280
+ # code.
277
281
  module AudioEncoding
278
282
  # Not specified.
279
283
  ENCODING_UNSPECIFIED = 0
@@ -465,8 +469,8 @@ module Google
465
469
 
466
470
  # Contains audio data in the encoding specified in the `RecognitionConfig`.
467
471
  # Either `content` or `uri` must be supplied. Supplying both or neither
468
- # returns {Google::Rpc::Code::INVALID_ARGUMENT}. See
469
- # [content limits](https://cloud.google.com/speech-to-text/quotas#content).
472
+ # returns {Google::Rpc::Code::INVALID_ARGUMENT}.
473
+ # See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
470
474
  # @!attribute [rw] content
471
475
  # @return [String]
472
476
  # The audio data bytes encoded as specified in
@@ -479,8 +483,9 @@ module Google
479
483
  # Currently, only Google Cloud Storage URIs are
480
484
  # supported, which must be specified in the following format:
481
485
  # `gs://bucket_name/object_name` (other URI formats return
482
- # {Google::Rpc::Code::INVALID_ARGUMENT}). For more information, see
483
- # [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
486
+ # {Google::Rpc::Code::INVALID_ARGUMENT}).
487
+ # For more information, see [Request
488
+ # URIs](https://cloud.google.com/storage/docs/reference-uris).
484
489
  class RecognitionAudio; end
485
490
 
486
491
  # The only message returned to the client by the `Recognize` method. It
@@ -569,8 +574,8 @@ module Google
569
574
  # one or more (repeated) `results`.
570
575
  # @!attribute [rw] error
571
576
  # @return [Google::Rpc::Status]
572
- # Output only. If set, returns a {Google::Rpc::Status} message that
573
- # specifies the error for the operation.
577
+ # Output only. If set, returns a {Google::Rpc::Status}
578
+ # message that specifies the error for the operation.
574
579
  # @!attribute [rw] results
575
580
  # @return [Array<Google::Cloud::Speech::V1p1beta1::StreamingRecognitionResult>]
576
581
  # Output only. This repeated list contains zero or more results that
@@ -31,7 +31,7 @@ module Google
31
31
  # @!attribute [rw] done
32
32
  # @return [true, false]
33
33
  # If the value is `false`, it means the operation is still in progress.
34
- # If true, the operation is completed, and either `error` or `response` is
34
+ # If `true`, the operation is completed, and either `error` or `response` is
35
35
  # available.
36
36
  # @!attribute [rw] error
37
37
  # @return [Google::Rpc::Status]
@@ -97,7 +97,8 @@ module Google
97
97
  # @!attribute [rw] type_url
98
98
  # @return [String]
99
99
  # A URL/resource name that uniquely identifies the type of the serialized
100
- # protocol buffer message. The last segment of the URL's path must represent
100
+ # protocol buffer message. This string must contain at least
101
+ # one "/" character. The last segment of the URL's path must represent
101
102
  # the fully qualified name of the type (as in
102
103
  # `path/google.protobuf.Duration`). The name should be in a canonical form
103
104
  # (e.g., leading "." is not accepted).
@@ -15,24 +15,25 @@
15
15
 
16
16
  module Google
17
17
  module Rpc
18
- # The `Status` type defines a logical error model that is suitable for different
19
- # programming environments, including REST APIs and RPC APIs. It is used by
20
- # [gRPC](https://github.com/grpc). The error model is designed to be:
18
+ # The `Status` type defines a logical error model that is suitable for
19
+ # different programming environments, including REST APIs and RPC APIs. It is
20
+ # used by [gRPC](https://github.com/grpc). The error model is designed to be:
21
21
  #
22
22
  # * Simple to use and understand for most users
23
23
  # * Flexible enough to meet unexpected needs
24
24
  #
25
25
  # = Overview
26
26
  #
27
- # The `Status` message contains three pieces of data: error code, error message,
28
- # and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
- # error message should be a developer-facing English message that helps
31
- # developers *understand* and *resolve* the error. If a localized user-facing
32
- # error message is needed, put the localized message in the error details or
33
- # localize it in the client. The optional error details may contain arbitrary
34
- # information about the error. There is a predefined set of error detail types
35
- # in the package `google.rpc` that can be used for common error conditions.
27
+ # The `Status` message contains three pieces of data: error code, error
28
+ # message, and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes
30
+ # if needed. The error message should be a developer-facing English message
31
+ # that helps developers *understand* and *resolve* the error. If a localized
32
+ # user-facing error message is needed, put the localized message in the error
33
+ # details or localize it in the client. The optional error details may contain
34
+ # arbitrary information about the error. There is a predefined set of error
35
+ # detail types in the package `google.rpc` that can be used for common error
36
+ # conditions.
36
37
  #
37
38
  # = Language mapping
38
39
  #
@@ -69,12 +70,14 @@ module Google
69
70
  # be used directly after any stripping needed for security/privacy reasons.
70
71
  # @!attribute [rw] code
71
72
  # @return [Integer]
72
- # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # The status code, which should be an enum value of
74
+ # {Google::Rpc::Code}.
73
75
  # @!attribute [rw] message
74
76
  # @return [String]
75
77
  # A developer-facing error message, which should be in English. Any
76
78
  # user-facing error message should be localized and sent in the
77
- # {Google::Rpc::Status#details} field, or localized by the client.
79
+ # {Google::Rpc::Status#details} field, or localized
80
+ # by the client.
78
81
  # @!attribute [rw] details
79
82
  # @return [Array<Google::Protobuf::Any>]
80
83
  # A list of messages that carry the error details. There is a common set of
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.34.0
4
+ version: 0.34.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: 2019-02-04 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.61.0
61
+ version: 0.64.0
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: 0.61.0
68
+ version: 0.64.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -101,6 +101,7 @@ extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
103
  - ".yardopts"
104
+ - AUTHENTICATION.md
104
105
  - LICENSE
105
106
  - README.md
106
107
  - lib/google/cloud/speech.rb
@@ -151,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
152
  - !ruby/object:Gem::Version
152
153
  version: '0'
153
154
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.7.6
155
+ rubygems_version: 3.0.3
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: API Client library for Cloud Speech API