google-cloud-speech 1.2.1 → 1.3.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: f95a7c7a5965432e9a0c4d46eea0f7e4a7a355045a28e7aa031248cd93dba4b6
4
- data.tar.gz: b45059bc57c92f1ba1787a64c9337127b4d383c0dfded4d6ed44080abc7c21f7
3
+ metadata.gz: b8e80af4ce365cc8fc7615fb4bad3a54539a12fa1220c5446316a96a1579b498
4
+ data.tar.gz: f3fa6401434504fdccdd2ea0d50a233a29ba2c791d6a643cf23e095a261483ec
5
5
  SHA512:
6
- metadata.gz: a3fa641e7247ec06208f2c6de2a750aaedeaf3f990cc222268af71c26841a712e4fbdbe6c4ec627d26f9a27039835b38cadea6074f057674782fb0647dbe9c34
7
- data.tar.gz: dac270f3e6b59a7361fb996c0c610c4271d797ddc400063aa6b01d47685524ffee4ec9a5c347afe6861ea8169562559753264ad94cb59218a206ed71f4e3f2d1
6
+ metadata.gz: 77349b13f740ad3854efd9cc802b606e1300ff03693fa564451d6cb9b00ab14711566bc159f14779038a65ce06a4e5a0bb89fa137fd56b35a3ef57ed408c18af
7
+ data.tar.gz: ee602831958c1a4abf1cb47f14cd3d232711c06995bf443fa6fab94ca8a7aaaf0397d92e9dcdec87066ec34a0f444fd08fcc2cb75a0fe2bad54abcca0a12e632
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Speech-to-Text API
2
+ --title="Cloud Speech-to-Text API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -82,8 +82,8 @@ client = Google::Cloud::Speech.speech
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/speech"
@@ -93,7 +93,7 @@ client = Google::Cloud::Speech.speech do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/speech"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/MIGRATING.md CHANGED
@@ -295,7 +295,7 @@ end
295
295
  ### Handling Errors
296
296
 
297
297
  The client reports standard
298
- {file:https://github.com/grpc/grpc/blob/master/doc/statuscodes.md gRPC error codes}
298
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
299
299
  by raising exceptions. In older releases, these exceptions were located in the
300
300
  `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
301
301
  exception class, defined in the `google-gax` gem. However, these classes were
data/README.md CHANGED
@@ -11,7 +11,7 @@ verisoned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
14
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-speech/latest)
14
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-speech/latest)
15
15
  for this library, google-cloud-speech, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Speech
19
- VERSION = "1.2.1".freeze
19
+ VERSION = "1.3.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -74,6 +74,36 @@ module Google
74
74
  package_module.const_get(:Speech).const_get(:Client).new(&block)
75
75
  end
76
76
 
77
+ ##
78
+ # Create a new client object for Adaptation.
79
+ #
80
+ # By default, this returns an instance of
81
+ # [Google::Cloud::Speech::V1::Adaptation::Client](https://googleapis.dev/ruby/google-cloud-speech-v1/latest/Google/Cloud/Speech/V1/Adaptation/Client.html)
82
+ # for version V1 of the API.
83
+ # However, you can specify specify a different API version by passing it in the
84
+ # `version` parameter. If the Adaptation service is
85
+ # supported by that API version, and the corresponding gem is available, the
86
+ # appropriate versioned client will be returned.
87
+ #
88
+ # ## About Adaptation
89
+ #
90
+ # Service that implements Google Cloud Speech Adaptation API.
91
+ #
92
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
93
+ # Defaults to `:v1`.
94
+ # @return [Adaptation::Client] A client object for the specified version.
95
+ #
96
+ def self.adaptation version: :v1, &block
97
+ require "google/cloud/speech/#{version.to_s.downcase}"
98
+
99
+ package_name = Google::Cloud::Speech
100
+ .constants
101
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
102
+ .first
103
+ package_module = Google::Cloud::Speech.const_get package_name
104
+ package_module.const_get(:Adaptation).const_get(:Client).new(&block)
105
+ end
106
+
77
107
  ##
78
108
  # Configure the google-cloud-speech library.
79
109
  #
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: 1.2.1
4
+ version: 1.3.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: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2022-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.0'
33
+ version: '0.8'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.0'
43
+ version: '0.8'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  requirements: []
217
- rubygems_version: 3.2.17
217
+ rubygems_version: 3.3.5
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: API Client library for the Cloud Speech-to-Text API