google-cloud-speech 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/google/cloud/speech.rb +4 -4
- data/lib/google/cloud/speech/v1.rb +4 -4
- data/lib/google/cloud/speech/v1/doc/google/cloud/speech/v1/cloud_speech.rb +97 -97
- data/lib/google/cloud/speech/v1/doc/google/longrunning/operations.rb +9 -9
- data/lib/google/cloud/speech/v1/doc/google/protobuf/any.rb +8 -8
- data/lib/google/cloud/speech/v1/doc/google/protobuf/duration.rb +3 -3
- data/lib/google/cloud/speech/v1/doc/google/rpc/status.rb +11 -11
- data/lib/google/cloud/speech/v1/speech_client.rb +2 -2
- data/lib/google/cloud/speech/v1p1beta1.rb +4 -4
- data/lib/google/cloud/speech/v1p1beta1/doc/google/cloud/speech/v1p1beta1/cloud_speech.rb +107 -107
- data/lib/google/cloud/speech/v1p1beta1/doc/google/longrunning/operations.rb +9 -9
- data/lib/google/cloud/speech/v1p1beta1/doc/google/protobuf/any.rb +8 -8
- data/lib/google/cloud/speech/v1p1beta1/doc/google/protobuf/duration.rb +3 -3
- data/lib/google/cloud/speech/v1p1beta1/doc/google/rpc/status.rb +11 -11
- data/lib/google/cloud/speech/v1p1beta1/speech_client.rb +2 -2
- metadata +2 -4
- data/lib/google/cloud/speech/v1/doc/overview.rb +0 -99
- data/lib/google/cloud/speech/v1p1beta1/doc/overview.rb +0 -99
|
@@ -21,7 +21,7 @@ module Google
|
|
|
21
21
|
# @return [String]
|
|
22
22
|
# The server-assigned name, which is only unique within the same service that
|
|
23
23
|
# originally returns it. If you use the default HTTP mapping, the
|
|
24
|
-
#
|
|
24
|
+
# `name` should have the format of `operations/some/unique/name`.
|
|
25
25
|
# @!attribute [rw] metadata
|
|
26
26
|
# @return [Google::Protobuf::Any]
|
|
27
27
|
# Service-specific metadata associated with the operation. It typically
|
|
@@ -30,8 +30,8 @@ module Google
|
|
|
30
30
|
# long-running operation should document the metadata type, if any.
|
|
31
31
|
# @!attribute [rw] done
|
|
32
32
|
# @return [true, false]
|
|
33
|
-
# If the value is
|
|
34
|
-
# If true, the operation is completed, and either
|
|
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
|
|
35
35
|
# available.
|
|
36
36
|
# @!attribute [rw] error
|
|
37
37
|
# @return [Google::Rpc::Status]
|
|
@@ -39,13 +39,13 @@ module Google
|
|
|
39
39
|
# @!attribute [rw] response
|
|
40
40
|
# @return [Google::Protobuf::Any]
|
|
41
41
|
# The normal response of the operation in case of success. If the original
|
|
42
|
-
# method returns no data on success, such as
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
# methods, the response should have the type
|
|
42
|
+
# method returns no data on success, such as `Delete`, the response is
|
|
43
|
+
# `google.protobuf.Empty`. If the original method is standard
|
|
44
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
|
45
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
|
46
46
|
# is the original method name. For example, if the original method name
|
|
47
|
-
# is
|
|
48
|
-
#
|
|
47
|
+
# is `TakeSnapshot()`, the inferred response type is
|
|
48
|
+
# `TakeSnapshotResponse`.
|
|
49
49
|
class Operation; end
|
|
50
50
|
|
|
51
51
|
# The request message for {Google::Longrunning::Operations::GetOperation Operations::GetOperation}.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
module Google
|
|
17
17
|
module Protobuf
|
|
18
|
-
#
|
|
18
|
+
# `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
19
19
|
# URL that describes the type of the serialized message.
|
|
20
20
|
#
|
|
21
21
|
# Protobuf library provides support to pack/unpack Any values in the form
|
|
@@ -69,9 +69,9 @@ module Google
|
|
|
69
69
|
#
|
|
70
70
|
# = JSON
|
|
71
71
|
#
|
|
72
|
-
# The JSON representation of an
|
|
72
|
+
# The JSON representation of an `Any` value uses the regular
|
|
73
73
|
# representation of the deserialized, embedded message, with an
|
|
74
|
-
# additional field
|
|
74
|
+
# additional field `@type` which contains the type URL. Example:
|
|
75
75
|
#
|
|
76
76
|
# package google.profile;
|
|
77
77
|
# message Person {
|
|
@@ -87,7 +87,7 @@ module Google
|
|
|
87
87
|
#
|
|
88
88
|
# If the embedded message type is well-known and has a custom JSON
|
|
89
89
|
# representation, that representation will be embedded adding a field
|
|
90
|
-
#
|
|
90
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
|
91
91
|
# field. Example (for message {Google::Protobuf::Duration}):
|
|
92
92
|
#
|
|
93
93
|
# {
|
|
@@ -99,15 +99,15 @@ module Google
|
|
|
99
99
|
# A URL/resource name that uniquely identifies the type of the serialized
|
|
100
100
|
# protocol buffer message. The last segment of the URL's path must represent
|
|
101
101
|
# the fully qualified name of the type (as in
|
|
102
|
-
#
|
|
102
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
103
103
|
# (e.g., leading "." is not accepted).
|
|
104
104
|
#
|
|
105
105
|
# In practice, teams usually precompile into the binary all types that they
|
|
106
106
|
# expect it to use in the context of Any. However, for URLs which use the
|
|
107
|
-
# scheme
|
|
107
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
108
108
|
# server that maps type URLs to message definitions as follows:
|
|
109
109
|
#
|
|
110
|
-
# * If no scheme is provided,
|
|
110
|
+
# * If no scheme is provided, `https` is assumed.
|
|
111
111
|
# * An HTTP GET on the URL must yield a {Google::Protobuf::Type}
|
|
112
112
|
# value in binary format, or produce an error.
|
|
113
113
|
# * Applications are allowed to cache lookup results based on the
|
|
@@ -120,7 +120,7 @@ module Google
|
|
|
120
120
|
# protobuf release, and it is not used for type URLs beginning with
|
|
121
121
|
# type.googleapis.com.
|
|
122
122
|
#
|
|
123
|
-
# Schemes other than
|
|
123
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
|
124
124
|
# used with implementation specific semantics.
|
|
125
125
|
# @!attribute [rw] value
|
|
126
126
|
# @return [String]
|
|
@@ -82,9 +82,9 @@ module Google
|
|
|
82
82
|
# @return [Integer]
|
|
83
83
|
# Signed fractions of a second at nanosecond resolution of the span
|
|
84
84
|
# of time. Durations less than one second are represented with a 0
|
|
85
|
-
#
|
|
86
|
-
# of one second or more, a non-zero value for the
|
|
87
|
-
# of the same sign as the
|
|
85
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
|
86
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
|
87
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
|
88
88
|
# to +999,999,999 inclusive.
|
|
89
89
|
class Duration; end
|
|
90
90
|
end
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
module Google
|
|
17
17
|
module Rpc
|
|
18
|
-
# The
|
|
18
|
+
# The `Status` type defines a logical error model that is suitable for different
|
|
19
19
|
# programming environments, including REST APIs and RPC APIs. It is used by
|
|
20
20
|
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
|
21
21
|
#
|
|
@@ -24,7 +24,7 @@ module Google
|
|
|
24
24
|
#
|
|
25
25
|
# = Overview
|
|
26
26
|
#
|
|
27
|
-
# The
|
|
27
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
|
28
28
|
# and error details. The error code should be an enum value of
|
|
29
29
|
# {Google::Rpc::Code}, but it may accept additional error codes if needed. The
|
|
30
30
|
# error message should be a developer-facing English message that helps
|
|
@@ -32,40 +32,40 @@ module Google
|
|
|
32
32
|
# error message is needed, put the localized message in the error details or
|
|
33
33
|
# localize it in the client. The optional error details may contain arbitrary
|
|
34
34
|
# information about the error. There is a predefined set of error detail types
|
|
35
|
-
# in the package
|
|
35
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
|
36
36
|
#
|
|
37
37
|
# = Language mapping
|
|
38
38
|
#
|
|
39
|
-
# The
|
|
40
|
-
# is not necessarily the actual wire format. When the
|
|
39
|
+
# The `Status` message is the logical representation of the error model, but it
|
|
40
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
|
41
41
|
# exposed in different client libraries and different wire protocols, it can be
|
|
42
42
|
# mapped differently. For example, it will likely be mapped to some exceptions
|
|
43
43
|
# in Java, but more likely mapped to some error codes in C.
|
|
44
44
|
#
|
|
45
45
|
# = Other uses
|
|
46
46
|
#
|
|
47
|
-
# The error model and the
|
|
47
|
+
# The error model and the `Status` message can be used in a variety of
|
|
48
48
|
# environments, either with or without APIs, to provide a
|
|
49
49
|
# consistent developer experience across different environments.
|
|
50
50
|
#
|
|
51
51
|
# Example uses of this error model include:
|
|
52
52
|
#
|
|
53
53
|
# * Partial errors. If a service needs to return partial errors to the client,
|
|
54
|
-
# it may embed the
|
|
54
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
|
55
55
|
# errors.
|
|
56
56
|
#
|
|
57
57
|
# * Workflow errors. A typical workflow has multiple steps. Each step may
|
|
58
|
-
# have a
|
|
58
|
+
# have a `Status` message for error reporting.
|
|
59
59
|
#
|
|
60
60
|
# * Batch operations. If a client uses batch request and batch response, the
|
|
61
|
-
#
|
|
61
|
+
# `Status` message should be used directly inside batch response, one for
|
|
62
62
|
# each error sub-response.
|
|
63
63
|
#
|
|
64
64
|
# * Asynchronous operations. If an API call embeds asynchronous operation
|
|
65
65
|
# results in its response, the status of those operations should be
|
|
66
|
-
# represented directly using the
|
|
66
|
+
# represented directly using the `Status` message.
|
|
67
67
|
#
|
|
68
|
-
# * Logging. If some API errors are stored in logs, the message
|
|
68
|
+
# * Logging. If some API errors are stored in logs, the message `Status` could
|
|
69
69
|
# be used directly after any stripping needed for security/privacy reasons.
|
|
70
70
|
# @!attribute [rw] code
|
|
71
71
|
# @return [Integer]
|
|
@@ -246,8 +246,8 @@ module Google
|
|
|
246
246
|
|
|
247
247
|
# Performs asynchronous speech recognition: receive results via the
|
|
248
248
|
# google.longrunning.Operations interface. Returns either an
|
|
249
|
-
#
|
|
250
|
-
# a
|
|
249
|
+
# `Operation.error` or an `Operation.response` which contains
|
|
250
|
+
# a `LongRunningRecognizeResponse` message.
|
|
251
251
|
#
|
|
252
252
|
# @param config [Google::Cloud::Speech::V1p1beta1::RecognitionConfig | Hash]
|
|
253
253
|
# *Required* Provides information to the recognizer that specifies how to
|
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.31.
|
|
4
|
+
version: 0.31.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: 2018-09-
|
|
11
|
+
date: 2018-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: google-gax
|
|
@@ -113,7 +113,6 @@ files:
|
|
|
113
113
|
- lib/google/cloud/speech/v1/doc/google/protobuf/any.rb
|
|
114
114
|
- lib/google/cloud/speech/v1/doc/google/protobuf/duration.rb
|
|
115
115
|
- lib/google/cloud/speech/v1/doc/google/rpc/status.rb
|
|
116
|
-
- lib/google/cloud/speech/v1/doc/overview.rb
|
|
117
116
|
- lib/google/cloud/speech/v1/helpers.rb
|
|
118
117
|
- lib/google/cloud/speech/v1/speech_client.rb
|
|
119
118
|
- lib/google/cloud/speech/v1/speech_client_config.json
|
|
@@ -127,7 +126,6 @@ files:
|
|
|
127
126
|
- lib/google/cloud/speech/v1p1beta1/doc/google/protobuf/any.rb
|
|
128
127
|
- lib/google/cloud/speech/v1p1beta1/doc/google/protobuf/duration.rb
|
|
129
128
|
- lib/google/cloud/speech/v1p1beta1/doc/google/rpc/status.rb
|
|
130
|
-
- lib/google/cloud/speech/v1p1beta1/doc/overview.rb
|
|
131
129
|
- lib/google/cloud/speech/v1p1beta1/helpers.rb
|
|
132
130
|
- lib/google/cloud/speech/v1p1beta1/speech_client.rb
|
|
133
131
|
- lib/google/cloud/speech/v1p1beta1/speech_client_config.json
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# Copyright 2018 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
module Google
|
|
17
|
-
module Cloud
|
|
18
|
-
# rubocop:disable LineLength
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
# # Ruby Client for Google Cloud Speech API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
|
22
|
-
#
|
|
23
|
-
# [Google Cloud Speech API][Product Documentation]:
|
|
24
|
-
# Google Cloud Speech API.
|
|
25
|
-
# - [Product Documentation][]
|
|
26
|
-
#
|
|
27
|
-
# ## Quick Start
|
|
28
|
-
# In order to use this library, you first need to go through the following
|
|
29
|
-
# steps:
|
|
30
|
-
#
|
|
31
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
|
32
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
|
33
|
-
# 3. [Enable the Google Cloud Speech API.](https://console.cloud.google.com/apis/library/speech.googleapis.com)
|
|
34
|
-
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
|
35
|
-
#
|
|
36
|
-
# ### Installation
|
|
37
|
-
# ```
|
|
38
|
-
# $ gem install google-cloud-speech
|
|
39
|
-
# ```
|
|
40
|
-
#
|
|
41
|
-
# ### Preview
|
|
42
|
-
# #### SpeechClient
|
|
43
|
-
# ```rb
|
|
44
|
-
# require "google/cloud/speech"
|
|
45
|
-
#
|
|
46
|
-
# speech_client = Google::Cloud::Speech.new
|
|
47
|
-
# language_code = "en-US"
|
|
48
|
-
# sample_rate_hertz = 44100
|
|
49
|
-
# encoding = :FLAC
|
|
50
|
-
# config = {
|
|
51
|
-
# language_code: language_code,
|
|
52
|
-
# sample_rate_hertz: sample_rate_hertz,
|
|
53
|
-
# encoding: encoding
|
|
54
|
-
# }
|
|
55
|
-
# uri = "gs://gapic-toolkit/hello.flac"
|
|
56
|
-
# audio = { uri: uri }
|
|
57
|
-
# response = speech_client.recognize(config, audio)
|
|
58
|
-
# ```
|
|
59
|
-
#
|
|
60
|
-
# ### Next Steps
|
|
61
|
-
# - Read the [Google Cloud Speech API Product documentation][Product Documentation]
|
|
62
|
-
# to learn more about the product and see How-to Guides.
|
|
63
|
-
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
|
64
|
-
# to see the full list of Cloud APIs that we cover.
|
|
65
|
-
#
|
|
66
|
-
# [Product Documentation]: https://cloud.google.com/speech
|
|
67
|
-
#
|
|
68
|
-
# ## Enabling Logging
|
|
69
|
-
#
|
|
70
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
|
71
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
|
72
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
|
73
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
|
74
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
|
75
|
-
#
|
|
76
|
-
# Configuring a Ruby stdlib logger:
|
|
77
|
-
#
|
|
78
|
-
# ```ruby
|
|
79
|
-
# require "logger"
|
|
80
|
-
#
|
|
81
|
-
# module MyLogger
|
|
82
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
|
83
|
-
# def logger
|
|
84
|
-
# LOGGER
|
|
85
|
-
# end
|
|
86
|
-
# end
|
|
87
|
-
#
|
|
88
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
|
89
|
-
# module GRPC
|
|
90
|
-
# extend MyLogger
|
|
91
|
-
# end
|
|
92
|
-
# ```
|
|
93
|
-
#
|
|
94
|
-
module Speech
|
|
95
|
-
module V1
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
end
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# Copyright 2018 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
module Google
|
|
17
|
-
module Cloud
|
|
18
|
-
# rubocop:disable LineLength
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
# # Ruby Client for Cloud Speech API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
|
22
|
-
#
|
|
23
|
-
# [Cloud Speech API][Product Documentation]:
|
|
24
|
-
# Converts audio to text by applying powerful neural network models.
|
|
25
|
-
# - [Product Documentation][]
|
|
26
|
-
#
|
|
27
|
-
# ## Quick Start
|
|
28
|
-
# In order to use this library, you first need to go through the following
|
|
29
|
-
# steps:
|
|
30
|
-
#
|
|
31
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
|
32
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
|
33
|
-
# 3. [Enable the Cloud Speech API.](https://console.cloud.google.com/apis/library/speech.googleapis.com)
|
|
34
|
-
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
|
35
|
-
#
|
|
36
|
-
# ### Installation
|
|
37
|
-
# ```
|
|
38
|
-
# $ gem install google-cloud-speech
|
|
39
|
-
# ```
|
|
40
|
-
#
|
|
41
|
-
# ### Preview
|
|
42
|
-
# #### SpeechClient
|
|
43
|
-
# ```rb
|
|
44
|
-
# require "google/cloud/speech"
|
|
45
|
-
#
|
|
46
|
-
# speech_client = Google::Cloud::Speech.new
|
|
47
|
-
# language_code = "en-US"
|
|
48
|
-
# sample_rate_hertz = 44100
|
|
49
|
-
# encoding = :FLAC
|
|
50
|
-
# config = {
|
|
51
|
-
# language_code: language_code,
|
|
52
|
-
# sample_rate_hertz: sample_rate_hertz,
|
|
53
|
-
# encoding: encoding
|
|
54
|
-
# }
|
|
55
|
-
# uri = "gs://gapic-toolkit/hello.flac"
|
|
56
|
-
# audio = { uri: uri }
|
|
57
|
-
# response = speech_client.recognize(config, audio)
|
|
58
|
-
# ```
|
|
59
|
-
#
|
|
60
|
-
# ### Next Steps
|
|
61
|
-
# - Read the [Cloud Speech API Product documentation][Product Documentation]
|
|
62
|
-
# to learn more about the product and see How-to Guides.
|
|
63
|
-
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
|
64
|
-
# to see the full list of Cloud APIs that we cover.
|
|
65
|
-
#
|
|
66
|
-
# [Product Documentation]: https://cloud.google.com/speech
|
|
67
|
-
#
|
|
68
|
-
# ## Enabling Logging
|
|
69
|
-
#
|
|
70
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
|
71
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
|
72
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
|
73
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
|
74
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
|
75
|
-
#
|
|
76
|
-
# Configuring a Ruby stdlib logger:
|
|
77
|
-
#
|
|
78
|
-
# ```ruby
|
|
79
|
-
# require "logger"
|
|
80
|
-
#
|
|
81
|
-
# module MyLogger
|
|
82
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
|
83
|
-
# def logger
|
|
84
|
-
# LOGGER
|
|
85
|
-
# end
|
|
86
|
-
# end
|
|
87
|
-
#
|
|
88
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
|
89
|
-
# module GRPC
|
|
90
|
-
# extend MyLogger
|
|
91
|
-
# end
|
|
92
|
-
# ```
|
|
93
|
-
#
|
|
94
|
-
module Speech
|
|
95
|
-
module V1p1beta1
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
end
|