google-cloud-text_to_speech-v1beta1 0.6.4 → 0.7.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: c08f170eb3ebf2568108d4c70a535f00a42735d0bea20a54e29bec9ec4a25a2b
4
- data.tar.gz: 0db345725c656fbe3310a5d2034522e0256afc656f1c2a94b765e3b43fb517ea
3
+ metadata.gz: e5d2b0a51e56d76100bfd9a77bdc9d2e9ce663a9a91ce7ac3417be646a1ee754
4
+ data.tar.gz: 125fa7369ebf81f8c1940b321fdfcb573cf04aafc54465b3cb8e5f162c9bc278
5
5
  SHA512:
6
- metadata.gz: d4c3f45076d43b93f43acb78c80682f8a856b3da58133336c77691fe455a503b3e880d4488776f8d3e81fa8f1f70daa0cbbd8ae3cc2f51a44d29501fd6c5a8da
7
- data.tar.gz: 2c0de7b050aed3c50b7c8b6f44d921fc568d3f0660e79707b7c2bd55f9355da06bee1f945a4d4ddfab637843427240c59488f6ee2e7641d0d19e2dc8026ce5ab
6
+ metadata.gz: ea34e79be6a960f71dd8b39dc3291334484152dcaf30a13c59cf30d83f27ad0ccf20695f4b261be36ea43578276c41b6a43223405e5022871f76aa8b518cfa39
7
+ data.tar.gz: 6f8782beefbe9a9e886c9539e4d62b2b49fe739d167451a912bb0d5bd3910a531e4ac559243bdbf3150306a2d05da30d30ad2fa9821925f7d7b364b2bdce1a44
@@ -30,6 +30,8 @@ module Google
30
30
  # Service that implements Google Cloud Text-to-Speech API.
31
31
  #
32
32
  class Client
33
+ include Paths
34
+
33
35
  # @private
34
36
  attr_reader :text_to_speech_stub
35
37
 
@@ -170,11 +172,11 @@ module Google
170
172
  # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
171
173
  # If not specified, the API will return all supported voices.
172
174
  # If specified, the ListVoices call will only return voices that can be used
173
- # to synthesize this language_code. E.g. when specifying "en-NZ", you will
174
- # get supported "en-NZ" voices; when specifying "no", you will get supported
175
- # "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh"
176
- # will also get supported "cmn-\*" voices; specifying "zh-hk" will also get
177
- # supported "yue-hk" voices.
175
+ # to synthesize this language_code. E.g. when specifying `"en-NZ"`, you will
176
+ # get supported `"en-NZ"` voices; when specifying `"no"`, you will get
177
+ # supported `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices;
178
+ # specifying `"zh"` will also get supported `"cmn-\*"` voices; specifying
179
+ # `"zh-hk"` will also get supported `"yue-hk"` voices.
178
180
  #
179
181
  # @yield [response, operation] Access the result along with the RPC operation
180
182
  # @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse]
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
20
+ module Google
21
+ module Cloud
22
+ module TextToSpeech
23
+ module V1beta1
24
+ module TextToSpeech
25
+ # Path helper methods for the TextToSpeech API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Model resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/models/{model}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param model [String]
37
+ #
38
+ # @return [::String]
39
+ def model_path project:, location:, model:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/models/#{model}"
44
+ end
45
+
46
+ extend self
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -23,6 +23,7 @@ require "gapic/config/method"
23
23
  require "google/cloud/text_to_speech/v1beta1/version"
24
24
 
25
25
  require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials"
26
+ require "google/cloud/text_to_speech/v1beta1/text_to_speech/paths"
26
27
  require "google/cloud/text_to_speech/v1beta1/text_to_speech/client"
27
28
 
28
29
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module TextToSpeech
23
23
  module V1beta1
24
- VERSION = "0.6.4"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -4,6 +4,7 @@
4
4
  require 'google/api/annotations_pb'
5
5
  require 'google/api/client_pb'
6
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
7
8
  require 'google/protobuf'
8
9
 
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -40,6 +41,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
40
41
  optional :language_code, :string, 1
41
42
  optional :name, :string, 2
42
43
  optional :ssml_gender, :enum, 3, "google.cloud.texttospeech.v1beta1.SsmlVoiceGender"
44
+ optional :custom_voice, :message, 4, "google.cloud.texttospeech.v1beta1.CustomVoiceParams"
43
45
  end
44
46
  add_message "google.cloud.texttospeech.v1beta1.AudioConfig" do
45
47
  optional :audio_encoding, :enum, 1, "google.cloud.texttospeech.v1beta1.AudioEncoding"
@@ -49,6 +51,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
49
51
  optional :sample_rate_hertz, :int32, 5
50
52
  repeated :effects_profile_id, :string, 6
51
53
  end
54
+ add_message "google.cloud.texttospeech.v1beta1.CustomVoiceParams" do
55
+ optional :model, :string, 1
56
+ optional :reported_usage, :enum, 3, "google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage"
57
+ end
58
+ add_enum "google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage" do
59
+ value :REPORTED_USAGE_UNSPECIFIED, 0
60
+ value :REALTIME, 1
61
+ value :OFFLINE, 2
62
+ end
52
63
  add_message "google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse" do
53
64
  optional :audio_content, :bytes, 1
54
65
  repeated :timepoints, :message, 2, "google.cloud.texttospeech.v1beta1.Timepoint"
@@ -88,6 +99,8 @@ module Google
88
99
  SynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesisInput").msgclass
89
100
  VoiceSelectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.VoiceSelectionParams").msgclass
90
101
  AudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AudioConfig").msgclass
102
+ CustomVoiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams").msgclass
103
+ CustomVoiceParams::ReportedUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage").enummodule
91
104
  SynthesizeSpeechResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse").msgclass
92
105
  Timepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.Timepoint").msgclass
93
106
  SsmlVoiceGender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SsmlVoiceGender").enummodule
@@ -28,11 +28,11 @@ module Google
28
28
  # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
29
29
  # If not specified, the API will return all supported voices.
30
30
  # If specified, the ListVoices call will only return voices that can be used
31
- # to synthesize this language_code. E.g. when specifying "en-NZ", you will
32
- # get supported "en-NZ" voices; when specifying "no", you will get supported
33
- # "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh"
34
- # will also get supported "cmn-\*" voices; specifying "zh-hk" will also get
35
- # supported "yue-hk" voices.
31
+ # to synthesize this language_code. E.g. when specifying `"en-NZ"`, you will
32
+ # get supported `"en-NZ"` voices; when specifying `"no"`, you will get
33
+ # supported `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices;
34
+ # specifying `"zh"` will also get supported `"cmn-\*"` voices; specifying
35
+ # `"zh-hk"` will also get supported `"yue-hk"` voices.
36
36
  class ListVoicesRequest
37
37
  include ::Google::Protobuf::MessageExts
38
38
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -137,6 +137,11 @@ module Google
137
137
  # name. Note that this is only a preference, not requirement; if a
138
138
  # voice of the appropriate gender is not available, the synthesizer should
139
139
  # substitute a voice with a different gender rather than failing the request.
140
+ # @!attribute [rw] custom_voice
141
+ # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams]
142
+ # The configuration for a custom voice. If [CustomVoiceParams.model] is set,
143
+ # the service will choose the custom voice matching the specified
144
+ # configuration.
140
145
  class VoiceSelectionParams
141
146
  include ::Google::Protobuf::MessageExts
142
147
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -189,6 +194,35 @@ module Google
189
194
  extend ::Google::Protobuf::MessageExts::ClassMethods
190
195
  end
191
196
 
197
+ # Description of the custom voice to be synthesized.
198
+ # @!attribute [rw] model
199
+ # @return [::String]
200
+ # Required. The name of the AutoML model that synthesizes the custom voice.
201
+ # @!attribute [rw] reported_usage
202
+ # @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams::ReportedUsage]
203
+ # Optional. The usage of the synthesized audio to be reported.
204
+ class CustomVoiceParams
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+
208
+ # The usage of the synthesized audio. You must report your honest and
209
+ # correct usage of the service as it's regulated by contract and will cause
210
+ # significant difference in billing.
211
+ module ReportedUsage
212
+ # Request with reported usage unspecified will be rejected.
213
+ REPORTED_USAGE_UNSPECIFIED = 0
214
+
215
+ # For scenarios where the synthesized audio is not downloadable and can
216
+ # only be used once. For example, real-time request in IVR system.
217
+ REALTIME = 1
218
+
219
+ # For scenarios where the synthesized audio is downloadable and can be
220
+ # reused. For example, the synthesized audio is downloaded, stored in
221
+ # customer service system and played repeatedly.
222
+ OFFLINE = 2
223
+ end
224
+ end
225
+
192
226
  # The message returned to the client by the `SynthesizeSpeech` method.
193
227
  # @!attribute [rw] audio_content
194
228
  # @return [::String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-text_to_speech-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.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-11-08 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -175,6 +175,7 @@ files:
175
175
  - lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb
176
176
  - lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb
177
177
  - lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb
178
+ - lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb
178
179
  - lib/google/cloud/text_to_speech/v1beta1/version.rb
179
180
  - lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb
180
181
  - lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb