google-cloud-text_to_speech-v1 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/text_to_speech/v1/rest.rb +38 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb +430 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb +163 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb +52 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech.rb +7 -1
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb +4 -4
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb +12 -14
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb +371 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb +793 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb +108 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb +53 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb +7 -1
- data/lib/google/cloud/text_to_speech/v1/version.rb +1 -1
- data/lib/google/cloud/text_to_speech/v1.rb +7 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +15 -7
data/lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/texttospeech/v1/cloud_tts_lrs_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module TextToSpeech
|
24
|
+
module V1
|
25
|
+
module TextToSpeechLongAudioSynthesize
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the TextToSpeechLongAudioSynthesize service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: true,
|
40
|
+
raise_faraday_errors: false
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Baseline implementation for the synthesize_long_audio REST call
|
45
|
+
#
|
46
|
+
# @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest]
|
47
|
+
# A request object representing the call parameters. Required.
|
48
|
+
# @param options [::Gapic::CallOptions]
|
49
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
50
|
+
#
|
51
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
52
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
53
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
54
|
+
#
|
55
|
+
# @return [::Google::Longrunning::Operation]
|
56
|
+
# A result object deserialized from the server's reply
|
57
|
+
def synthesize_long_audio request_pb, options = nil
|
58
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
59
|
+
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_long_audio_request request_pb
|
61
|
+
query_string_params = if query_string_params.any?
|
62
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
63
|
+
else
|
64
|
+
{}
|
65
|
+
end
|
66
|
+
|
67
|
+
response = @client_stub.make_http_request(
|
68
|
+
verb,
|
69
|
+
uri: uri,
|
70
|
+
body: body || "",
|
71
|
+
params: query_string_params,
|
72
|
+
options: options
|
73
|
+
)
|
74
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
75
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
76
|
+
|
77
|
+
yield result, operation if block_given?
|
78
|
+
result
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# @private
|
83
|
+
#
|
84
|
+
# GRPC transcoding helper method for the synthesize_long_audio REST call
|
85
|
+
#
|
86
|
+
# @param request_pb [::Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest]
|
87
|
+
# A request object representing the call parameters. Required.
|
88
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
89
|
+
# Uri, Body, Query string parameters
|
90
|
+
def self.transcode_synthesize_long_audio_request request_pb
|
91
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
92
|
+
.with_bindings(
|
93
|
+
uri_method: :post,
|
94
|
+
uri_template: "/v1/{parent}:SynthesizeLongAudio",
|
95
|
+
body: "*",
|
96
|
+
matches: [
|
97
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/voices/[^/]+/?$}, false]
|
98
|
+
]
|
99
|
+
)
|
100
|
+
transcoder.transcode request_pb
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/text_to_speech/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials"
|
26
|
+
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths"
|
27
|
+
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations"
|
28
|
+
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module TextToSpeech
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Service that implements Google Cloud Text-to-Speech API.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest"
|
40
|
+
# client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new
|
41
|
+
#
|
42
|
+
module TextToSpeechLongAudioSynthesize
|
43
|
+
# Client for the REST transport
|
44
|
+
module Rest
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
53
|
+
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/helpers" if ::File.file? helper_path
|
@@ -26,6 +26,7 @@ require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/cre
|
|
26
26
|
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths"
|
27
27
|
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations"
|
28
28
|
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client"
|
29
|
+
require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest"
|
29
30
|
|
30
31
|
module Google
|
31
32
|
module Cloud
|
@@ -34,11 +35,16 @@ module Google
|
|
34
35
|
##
|
35
36
|
# Service that implements Google Cloud Text-to-Speech API.
|
36
37
|
#
|
37
|
-
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
38
39
|
#
|
39
40
|
# require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize"
|
40
41
|
# client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Client.new
|
41
42
|
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest"
|
46
|
+
# client = ::Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new
|
47
|
+
#
|
42
48
|
module TextToSpeechLongAudioSynthesize
|
43
49
|
end
|
44
50
|
end
|
@@ -24,13 +24,18 @@ module Google
|
|
24
24
|
module Cloud
|
25
25
|
module TextToSpeech
|
26
26
|
##
|
27
|
-
#
|
27
|
+
# API client module.
|
28
28
|
#
|
29
|
-
# @example
|
29
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
30
30
|
#
|
31
31
|
# require "google/cloud/text_to_speech/v1"
|
32
32
|
# client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.new
|
33
33
|
#
|
34
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
35
|
+
#
|
36
|
+
# require "google/cloud/text_to_speech/v1"
|
37
|
+
# client = ::Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new
|
38
|
+
#
|
34
39
|
module V1
|
35
40
|
end
|
36
41
|
end
|
@@ -28,12 +28,14 @@ module Google
|
|
28
28
|
# [API Design Guide](https://cloud.google.com/apis/design/errors).
|
29
29
|
# @!attribute [rw] code
|
30
30
|
# @return [::Integer]
|
31
|
-
# The status code, which should be an enum value of
|
31
|
+
# The status code, which should be an enum value of
|
32
|
+
# [google.rpc.Code][google.rpc.Code].
|
32
33
|
# @!attribute [rw] message
|
33
34
|
# @return [::String]
|
34
35
|
# A developer-facing error message, which should be in English. Any
|
35
36
|
# user-facing error message should be localized and sent in the
|
36
|
-
# {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
|
37
|
+
# {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
|
38
|
+
# by the client.
|
37
39
|
# @!attribute [rw] details
|
38
40
|
# @return [::Array<::Google::Protobuf::Any>]
|
39
41
|
# 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-text_to_speech-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.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:
|
11
|
+
date: 2023-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.17.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 0.17.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.26.
|
53
|
+
version: 1.26.3
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.26.
|
60
|
+
version: 1.26.3
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: minitest
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,15 +172,23 @@ files:
|
|
172
172
|
- README.md
|
173
173
|
- lib/google-cloud-text_to_speech-v1.rb
|
174
174
|
- lib/google/cloud/text_to_speech/v1.rb
|
175
|
+
- lib/google/cloud/text_to_speech/v1/rest.rb
|
175
176
|
- lib/google/cloud/text_to_speech/v1/text_to_speech.rb
|
176
177
|
- lib/google/cloud/text_to_speech/v1/text_to_speech/client.rb
|
177
178
|
- lib/google/cloud/text_to_speech/v1/text_to_speech/credentials.rb
|
178
179
|
- lib/google/cloud/text_to_speech/v1/text_to_speech/paths.rb
|
180
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech/rest.rb
|
181
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech/rest/client.rb
|
182
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech/rest/service_stub.rb
|
179
183
|
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize.rb
|
180
184
|
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/client.rb
|
181
185
|
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/credentials.rb
|
182
186
|
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/operations.rb
|
183
187
|
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/paths.rb
|
188
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest.rb
|
189
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/client.rb
|
190
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/operations.rb
|
191
|
+
- lib/google/cloud/text_to_speech/v1/text_to_speech_long_audio_synthesize/rest/service_stub.rb
|
184
192
|
- lib/google/cloud/text_to_speech/v1/version.rb
|
185
193
|
- lib/google/cloud/texttospeech/v1/cloud_tts_lrs_pb.rb
|
186
194
|
- lib/google/cloud/texttospeech/v1/cloud_tts_lrs_services_pb.rb
|
@@ -218,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
226
|
- !ruby/object:Gem::Version
|
219
227
|
version: '0'
|
220
228
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
229
|
+
rubygems_version: 3.4.2
|
222
230
|
signing_key:
|
223
231
|
specification_version: 4
|
224
232
|
summary: API Client library for the Cloud Text-to-Speech V1 API
|