google-cloud-text_to_speech 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/google/cloud/text_to_speech.rb +4 -0
- data/lib/google/cloud/text_to_speech/v1.rb +8 -0
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_client.rb +8 -2
- data/lib/google/cloud/text_to_speech/v1beta1.rb +8 -0
- data/lib/google/cloud/text_to_speech/v1beta1/text_to_speech_client.rb +8 -2
- data/lib/google/cloud/text_to_speech/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f25a09e52fffd9d3e3f7864eccebc81fcea03fedb91667fc4765ec0127f48f6b
|
4
|
+
data.tar.gz: 52375ae1d683e3b9fb8defd27227dcffcc26ba53d61905aeb1802d3c524f0d17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb285a68655384f8906c38ea30c43718394a80aa73538206665cb6d65d4007c5eec28059d7bef863faa8e584b5f276188c72471d791198bc469c7e3e74174e0c
|
7
|
+
data.tar.gz: 41cc193bb8028358c2a9749a7c2e6bddcdfbccc51724135fc67556e259a87ef42064d5f6136b93b48e7c627d32055953f795b2a83f62360d9f3f5a0d8f6c812b
|
data/README.md
CHANGED
@@ -33,6 +33,7 @@ voice = { language_code: language_code }
|
|
33
33
|
audio_encoding = :MP3
|
34
34
|
audio_config = { audio_encoding: audio_encoding }
|
35
35
|
response = text_to_speech_client.synthesize_speech(input, voice, audio_config)
|
36
|
+
File.write("example.mp3", response.audio_content, mode: "wb")
|
36
37
|
```
|
37
38
|
|
38
39
|
### Next Steps
|
@@ -135,6 +135,10 @@ module Google
|
|
135
135
|
# The default timeout, in seconds, for calls made through this client.
|
136
136
|
# @param metadata [Hash]
|
137
137
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
138
|
+
# @param service_address [String]
|
139
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
140
|
+
# @param service_port [Integer]
|
141
|
+
# Override for the service port, or `nil` to leave as the default.
|
138
142
|
# @param exception_transformer [Proc]
|
139
143
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
140
144
|
# custom error handling.
|
@@ -123,6 +123,10 @@ module Google
|
|
123
123
|
# The default timeout, in seconds, for calls made through this client.
|
124
124
|
# @param metadata [Hash]
|
125
125
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
126
|
+
# @param service_address [String]
|
127
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
128
|
+
# @param service_port [Integer]
|
129
|
+
# Override for the service port, or `nil` to leave as the default.
|
126
130
|
# @param exception_transformer [Proc]
|
127
131
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
128
132
|
# custom error handling.
|
@@ -132,6 +136,8 @@ module Google
|
|
132
136
|
client_config: nil,
|
133
137
|
timeout: nil,
|
134
138
|
metadata: nil,
|
139
|
+
service_address: nil,
|
140
|
+
service_port: nil,
|
135
141
|
exception_transformer: nil,
|
136
142
|
lib_name: nil,
|
137
143
|
lib_version: nil
|
@@ -143,6 +149,8 @@ module Google
|
|
143
149
|
metadata: metadata,
|
144
150
|
exception_transformer: exception_transformer,
|
145
151
|
lib_name: lib_name,
|
152
|
+
service_address: service_address,
|
153
|
+
service_port: service_port,
|
146
154
|
lib_version: lib_version
|
147
155
|
}.select { |_, v| v != nil }
|
148
156
|
Google::Cloud::TextToSpeech::V1::TextToSpeechClient.new(**kwargs)
|
@@ -85,6 +85,10 @@ module Google
|
|
85
85
|
# The default timeout, in seconds, for calls made through this client.
|
86
86
|
# @param metadata [Hash]
|
87
87
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
88
|
+
# @param service_address [String]
|
89
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
90
|
+
# @param service_port [Integer]
|
91
|
+
# Override for the service port, or `nil` to leave as the default.
|
88
92
|
# @param exception_transformer [Proc]
|
89
93
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
90
94
|
# custom error handling.
|
@@ -94,6 +98,8 @@ module Google
|
|
94
98
|
client_config: {},
|
95
99
|
timeout: DEFAULT_TIMEOUT,
|
96
100
|
metadata: nil,
|
101
|
+
service_address: nil,
|
102
|
+
service_port: nil,
|
97
103
|
exception_transformer: nil,
|
98
104
|
lib_name: nil,
|
99
105
|
lib_version: ""
|
@@ -147,8 +153,8 @@ module Google
|
|
147
153
|
end
|
148
154
|
|
149
155
|
# Allow overriding the service path/port in subclasses.
|
150
|
-
service_path = self.class::SERVICE_ADDRESS
|
151
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
156
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
157
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
152
158
|
interceptors = self.class::GRPC_INTERCEPTORS
|
153
159
|
@text_to_speech_stub = Google::Gax::Grpc.create_stub(
|
154
160
|
service_path,
|
@@ -123,6 +123,10 @@ module Google
|
|
123
123
|
# The default timeout, in seconds, for calls made through this client.
|
124
124
|
# @param metadata [Hash]
|
125
125
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
126
|
+
# @param service_address [String]
|
127
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
128
|
+
# @param service_port [Integer]
|
129
|
+
# Override for the service port, or `nil` to leave as the default.
|
126
130
|
# @param exception_transformer [Proc]
|
127
131
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
128
132
|
# custom error handling.
|
@@ -132,6 +136,8 @@ module Google
|
|
132
136
|
client_config: nil,
|
133
137
|
timeout: nil,
|
134
138
|
metadata: nil,
|
139
|
+
service_address: nil,
|
140
|
+
service_port: nil,
|
135
141
|
exception_transformer: nil,
|
136
142
|
lib_name: nil,
|
137
143
|
lib_version: nil
|
@@ -143,6 +149,8 @@ module Google
|
|
143
149
|
metadata: metadata,
|
144
150
|
exception_transformer: exception_transformer,
|
145
151
|
lib_name: lib_name,
|
152
|
+
service_address: service_address,
|
153
|
+
service_port: service_port,
|
146
154
|
lib_version: lib_version
|
147
155
|
}.select { |_, v| v != nil }
|
148
156
|
Google::Cloud::TextToSpeech::V1beta1::TextToSpeechClient.new(**kwargs)
|
@@ -85,6 +85,10 @@ module Google
|
|
85
85
|
# The default timeout, in seconds, for calls made through this client.
|
86
86
|
# @param metadata [Hash]
|
87
87
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
88
|
+
# @param service_address [String]
|
89
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
90
|
+
# @param service_port [Integer]
|
91
|
+
# Override for the service port, or `nil` to leave as the default.
|
88
92
|
# @param exception_transformer [Proc]
|
89
93
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
90
94
|
# custom error handling.
|
@@ -94,6 +98,8 @@ module Google
|
|
94
98
|
client_config: {},
|
95
99
|
timeout: DEFAULT_TIMEOUT,
|
96
100
|
metadata: nil,
|
101
|
+
service_address: nil,
|
102
|
+
service_port: nil,
|
97
103
|
exception_transformer: nil,
|
98
104
|
lib_name: nil,
|
99
105
|
lib_version: ""
|
@@ -147,8 +153,8 @@ module Google
|
|
147
153
|
end
|
148
154
|
|
149
155
|
# Allow overriding the service path/port in subclasses.
|
150
|
-
service_path = self.class::SERVICE_ADDRESS
|
151
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
156
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
157
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
152
158
|
interceptors = self.class::GRPC_INTERCEPTORS
|
153
159
|
@text_to_speech_stub = Google::Gax::Grpc.create_stub(
|
154
160
|
service_path,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-text_to_speech
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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-
|
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.
|
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.
|
26
|
+
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|