google-cloud-text_to_speech 0.1.3 → 0.2.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 +15 -0
- data/lib/google/cloud/text_to_speech.rb +16 -1
- data/lib/google/cloud/text_to_speech/v1.rb +16 -1
- data/lib/google/cloud/text_to_speech/v1/credentials.rb +1 -1
- data/lib/google/cloud/text_to_speech/v1/doc/google/cloud/texttospeech/v1/cloud_tts.rb +31 -21
- data/lib/google/cloud/text_to_speech/v1/text_to_speech_client.rb +2 -3
- data/lib/google/cloud/texttospeech/v1/cloud_tts_pb.rb +1 -0
- data/lib/google/cloud/texttospeech/v1/cloud_tts_services_pb.rb +3 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf511e97f1080d54aa68a1995db34659cc5f23e4712f934dd8ea25a78ebaaaa0
|
4
|
+
data.tar.gz: 376c3fcf1ff8dc1833eec30c22ea0c5022e3060808d77d75d3617ed72479afa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2011d38868ab689be7cc0fe3b44992d38f452b4150f1bef607e696f2dcf32f55f77c6b48b16c6a56bc38030e475a8113d11aeb36a1b13c64ee7b9fdcc8a5a063
|
7
|
+
data.tar.gz: 89925d456eb02a8561b743d96e1d90d46aa0a6a5090327ae7a1687393281e2c30451a92c1553cdef8a8f6730fed802d98bd2291a89d32c55875a49ef73ffe448
|
data/README.md
CHANGED
@@ -20,6 +20,21 @@ steps:
|
|
20
20
|
$ gem install google-cloud-text_to_speech
|
21
21
|
```
|
22
22
|
|
23
|
+
### Preview
|
24
|
+
#### TextToSpeechClient
|
25
|
+
```rb
|
26
|
+
require "google/cloud/text_to_speech"
|
27
|
+
|
28
|
+
text_to_speech_client = Google::Cloud::TextToSpeech.new
|
29
|
+
text = "test"
|
30
|
+
input = { text: text }
|
31
|
+
language_code = "en-US"
|
32
|
+
voice = { language_code: language_code }
|
33
|
+
audio_encoding = :MP3
|
34
|
+
audio_config = { audio_encoding: audio_encoding }
|
35
|
+
response = text_to_speech_client.synthesize_speech(input, voice, audio_config)
|
36
|
+
```
|
37
|
+
|
23
38
|
### Next Steps
|
24
39
|
- Read the [Client Library Documentation][] for Cloud Text-to-Speech API
|
25
40
|
to see other available methods on the client.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -42,6 +42,21 @@ module Google
|
|
42
42
|
# $ gem install google-cloud-text_to_speech
|
43
43
|
# ```
|
44
44
|
#
|
45
|
+
# ### Preview
|
46
|
+
# #### TextToSpeechClient
|
47
|
+
# ```rb
|
48
|
+
# require "google/cloud/text_to_speech"
|
49
|
+
#
|
50
|
+
# text_to_speech_client = Google::Cloud::TextToSpeech.new
|
51
|
+
# text = "test"
|
52
|
+
# input = { text: text }
|
53
|
+
# language_code = "en-US"
|
54
|
+
# voice = { language_code: language_code }
|
55
|
+
# audio_encoding = :MP3
|
56
|
+
# audio_config = { audio_encoding: audio_encoding }
|
57
|
+
# response = text_to_speech_client.synthesize_speech(input, voice, audio_config)
|
58
|
+
# ```
|
59
|
+
#
|
45
60
|
# ### Next Steps
|
46
61
|
# - Read the [Cloud Text-to-Speech API Product documentation][Product Documentation]
|
47
62
|
# to learn more about the product and see How-to Guides.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -42,6 +42,21 @@ module Google
|
|
42
42
|
# $ gem install google-cloud-text_to_speech
|
43
43
|
# ```
|
44
44
|
#
|
45
|
+
# ### Preview
|
46
|
+
# #### TextToSpeechClient
|
47
|
+
# ```rb
|
48
|
+
# require "google/cloud/text_to_speech"
|
49
|
+
#
|
50
|
+
# text_to_speech_client = Google::Cloud::TextToSpeech.new(version: :v1)
|
51
|
+
# text = "test"
|
52
|
+
# input = { text: text }
|
53
|
+
# language_code = "en-US"
|
54
|
+
# voice = { language_code: language_code }
|
55
|
+
# audio_encoding = :MP3
|
56
|
+
# audio_config = { audio_encoding: audio_encoding }
|
57
|
+
# response = text_to_speech_client.synthesize_speech(input, voice, audio_config)
|
58
|
+
# ```
|
59
|
+
#
|
45
60
|
# ### Next Steps
|
46
61
|
# - Read the [Cloud Text-to-Speech API Product documentation][Product Documentation]
|
47
62
|
# to learn more about the product and see How-to Guides.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -140,6 +140,16 @@ module Google
|
|
140
140
|
# result in worse audio quality), unless the specified sample rate is not
|
141
141
|
# supported for the encoding chosen, in which case it will fail the request
|
142
142
|
# and return {Google::Rpc::Code::INVALID_ARGUMENT}.
|
143
|
+
# @!attribute [rw] effects_profile_id
|
144
|
+
# @return [Array<String>]
|
145
|
+
# An identifier which selects 'audio effects' profiles that are applied on
|
146
|
+
# (post synthesized) text to speech.
|
147
|
+
# Effects are applied on top of each other in the order they are given.
|
148
|
+
# See
|
149
|
+
#
|
150
|
+
# [audio-profiles](https:
|
151
|
+
# //cloud.google.com/text-to-speech/docs/audio-profiles)
|
152
|
+
# for current supported profile ids.
|
143
153
|
class AudioConfig; end
|
144
154
|
|
145
155
|
# The message returned to the client by the `SynthesizeSpeech` method.
|
@@ -151,26 +161,6 @@ module Google
|
|
151
161
|
# whereas JSON representations use base64.
|
152
162
|
class SynthesizeSpeechResponse; end
|
153
163
|
|
154
|
-
# Gender of the voice as described in
|
155
|
-
# [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
|
156
|
-
module SsmlVoiceGender
|
157
|
-
# An unspecified gender.
|
158
|
-
# In VoiceSelectionParams, this means that the client doesn't care which
|
159
|
-
# gender the selected voice will have. In the Voice field of
|
160
|
-
# ListVoicesResponse, this may mean that the voice doesn't fit any of the
|
161
|
-
# other categories in this enum, or that the gender of the voice isn't known.
|
162
|
-
SSML_VOICE_GENDER_UNSPECIFIED = 0
|
163
|
-
|
164
|
-
# A male voice.
|
165
|
-
MALE = 1
|
166
|
-
|
167
|
-
# A female voice.
|
168
|
-
FEMALE = 2
|
169
|
-
|
170
|
-
# A gender-neutral voice.
|
171
|
-
NEUTRAL = 3
|
172
|
-
end
|
173
|
-
|
174
164
|
# Configuration to set up audio encoder. The encoding determines the output
|
175
165
|
# audio format that we'd like.
|
176
166
|
module AudioEncoding
|
@@ -190,6 +180,26 @@ module Google
|
|
190
180
|
# than MP3 while using approximately the same bitrate.
|
191
181
|
OGG_OPUS = 3
|
192
182
|
end
|
183
|
+
|
184
|
+
# Gender of the voice as described in
|
185
|
+
# [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
|
186
|
+
module SsmlVoiceGender
|
187
|
+
# An unspecified gender.
|
188
|
+
# In VoiceSelectionParams, this means that the client doesn't care which
|
189
|
+
# gender the selected voice will have. In the Voice field of
|
190
|
+
# ListVoicesResponse, this may mean that the voice doesn't fit any of the
|
191
|
+
# other categories in this enum, or that the gender of the voice isn't known.
|
192
|
+
SSML_VOICE_GENDER_UNSPECIFIED = 0
|
193
|
+
|
194
|
+
# A male voice.
|
195
|
+
MALE = 1
|
196
|
+
|
197
|
+
# A female voice.
|
198
|
+
FEMALE = 2
|
199
|
+
|
200
|
+
# A gender-neutral voice.
|
201
|
+
NEUTRAL = 3
|
202
|
+
end
|
193
203
|
end
|
194
204
|
end
|
195
205
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -174,8 +174,7 @@ module Google
|
|
174
174
|
|
175
175
|
# Service calls
|
176
176
|
|
177
|
-
# Returns a list of
|
178
|
-
# supported for synthesis.
|
177
|
+
# Returns a list of Voice supported for synthesis.
|
179
178
|
#
|
180
179
|
# @param language_code [String]
|
181
180
|
# Optional (but recommended)
|
@@ -40,6 +40,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
40
40
|
optional :pitch, :double, 3
|
41
41
|
optional :volume_gain_db, :double, 4
|
42
42
|
optional :sample_rate_hertz, :int32, 5
|
43
|
+
repeated :effects_profile_id, :string, 6
|
43
44
|
end
|
44
45
|
add_message "google.cloud.texttospeech.v1.SynthesizeSpeechResponse" do
|
45
46
|
optional :audio_content, :bytes, 1
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/cloud/texttospeech/v1/cloud_tts.proto for package 'google.cloud.texttospeech.v1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright 2018 Google
|
4
|
+
# Copyright 2018 Google LLC.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -15,6 +15,7 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
+
#
|
18
19
|
|
19
20
|
|
20
21
|
require 'grpc'
|
@@ -34,8 +35,7 @@ module Google
|
|
34
35
|
self.unmarshal_class_method = :decode
|
35
36
|
self.service_name = 'google.cloud.texttospeech.v1.TextToSpeech'
|
36
37
|
|
37
|
-
# Returns a list of
|
38
|
-
# supported for synthesis.
|
38
|
+
# Returns a list of Voice supported for synthesis.
|
39
39
|
rpc :ListVoices, ListVoicesRequest, ListVoicesResponse
|
40
40
|
# Synthesizes speech synchronously: receive results after all text input
|
41
41
|
# has been processed.
|
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.2.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: 2019-02-04 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
|
+
version: 0.61.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.
|
68
|
+
version: 0.61.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.7.
|
135
|
+
rubygems_version: 2.7.6
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: API Client library for Cloud Text-to-Speech API
|