aws-sdk-polly 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,70 @@
1
+ require 'aws-sigv4'
2
+
3
+ module Aws
4
+ module Polly
5
+
6
+ # Allows you to create presigned URLs for `synthesize_speech`
7
+ #
8
+ # Example Use:
9
+ #
10
+ # signer = Aws::Polly::Presigner.new
11
+ # url = signer.synthesize_speech_presigned_url(
12
+ # output_format: 'mp3',
13
+ # text: 'Hello World',
14
+ # voice_id: 'Ewa'
15
+ # )
16
+ #
17
+ class Presigner
18
+
19
+ # @option options [required, Credentials] :credentials
20
+ # You need provide an object that responds to `#credentials`
21
+ # returning another object that responds to `#access_key_id`, `#secret_access_key`,
22
+ # and `#session_token`.
23
+ #
24
+ # For example, you could provide an instance of following classes:
25
+ # * `Aws::Credentials`
26
+ # * `Aws::SharedCredentials`
27
+ # * `Aws::InstanceProfileCredentials`
28
+ # * `Aws::AssumeRoleCredentials`
29
+ # * `Aws::ECSCredentials`
30
+ #
31
+ # @option options [required, string] :region
32
+ # The region name, e.g. 'us-west-2'
33
+ def initialize(options = {})
34
+ @credentials = options.fetch(:credentials)
35
+ @region = options.fetch(:region)
36
+ end
37
+
38
+ # @param [Hash] params parameter inputs for synthesize_speech operation
39
+ def synthesize_speech_presigned_url(params = {})
40
+ input_shape = Client.api.operation(:synthesize_speech).input.shape
41
+ sign_but_dont_send(input_shape, params)
42
+ end
43
+
44
+ private
45
+
46
+ def sign_but_dont_send(input_shape, params)
47
+ parts = []
48
+ input_shape.members.each do |name, ref|
49
+ parts << [ ref, params[name] ] unless params[name].nil?
50
+ end
51
+ query = Aws::Rest::Request::QuerystringBuilder.new.build(parts)
52
+
53
+ signer = Aws::Sigv4::Signer.new(
54
+ service: 'polly',
55
+ region: @region,
56
+ credentials_provider: @credentials
57
+ )
58
+ url = Aws::Partitions::EndpointProvider.resolve(signer.region, 'polly')
59
+ url += "/v1/speech?#{query}"
60
+ pre_signed_url = signer.presign_url(
61
+ http_method: 'GET',
62
+ url: url,
63
+ body: '',
64
+ expires_in: 900
65
+ ).to_s
66
+ end
67
+ end
68
+
69
+ end
70
+ end
@@ -1,25 +1,23 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module Polly
10
- class Resource
8
+ module Aws::Polly
9
+ class Resource
11
10
 
12
- # @param options ({})
13
- # @option options [Client] :client
14
- def initialize(options = {})
15
- @client = options[:client] || Client.new(options)
16
- end
17
-
18
- # @return [Client]
19
- def client
20
- @client
21
- end
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
22
16
 
17
+ # @return [Client]
18
+ def client
19
+ @client
23
20
  end
21
+
24
22
  end
25
23
  end
@@ -1,362 +1,385 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module Polly
10
- module Types
8
+ module Aws::Polly
9
+ module Types
11
10
 
12
- # @note When making an API call, pass DeleteLexiconInput
13
- # data as a hash:
14
- #
15
- # {
16
- # name: "LexiconName", # required
17
- # }
18
- # @!attribute [rw] name
19
- # The name of the lexicon to delete. Must be an existing lexicon in
20
- # the region.
21
- # @return [String]
22
- class DeleteLexiconInput < Struct.new(
23
- :name)
24
- include Aws::Structure
25
- end
26
-
27
- class DeleteLexiconOutput < Aws::EmptyStructure; end
11
+ # @note When making an API call, you may pass DeleteLexiconInput
12
+ # data as a hash:
13
+ #
14
+ # {
15
+ # name: "LexiconName", # required
16
+ # }
17
+ #
18
+ # @!attribute [rw] name
19
+ # The name of the lexicon to delete. Must be an existing lexicon in
20
+ # the region.
21
+ # @return [String]
22
+ #
23
+ class DeleteLexiconInput < Struct.new(
24
+ :name)
25
+ include Aws::Structure
26
+ end
28
27
 
29
- # @note When making an API call, pass DescribeVoicesInput
30
- # data as a hash:
31
- #
32
- # {
33
- # language_code: "cy-GB", # accepts cy-GB, da-DK, de-DE, en-AU, en-GB, en-GB-WLS, en-IN, en-US, es-ES, es-US, fr-CA, fr-FR, is-IS, it-IT, ja-JP, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sv-SE, tr-TR
34
- # next_token: "NextToken",
35
- # }
36
- # @!attribute [rw] language_code
37
- # The language identification tag (ISO 639 code for the language
38
- # name-ISO 3166 country code) for filtering the list of voices
39
- # returned. If you don't specify this optional parameter, all
40
- # available voices are returned.
41
- # @return [String]
42
- #
43
- # @!attribute [rw] next_token
44
- # An opaque pagination token returned from the previous
45
- # `DescribeVoices` operation. If present, this indicates where to
46
- # continue the listing.
47
- # @return [String]
48
- class DescribeVoicesInput < Struct.new(
49
- :language_code,
50
- :next_token)
51
- include Aws::Structure
52
- end
28
+ class DeleteLexiconOutput < Aws::EmptyStructure; end
53
29
 
54
- # @!attribute [rw] voices
55
- # A list of voices with their properties.
56
- # @return [Array<Types::Voice>]
57
- #
58
- # @!attribute [rw] next_token
59
- # The pagination token to use in the next request to continue the
60
- # listing of voices. `NextToken` is returned only if the response is
61
- # truncated.
62
- # @return [String]
63
- class DescribeVoicesOutput < Struct.new(
64
- :voices,
65
- :next_token)
66
- include Aws::Structure
67
- end
30
+ # @note When making an API call, you may pass DescribeVoicesInput
31
+ # data as a hash:
32
+ #
33
+ # {
34
+ # language_code: "cy-GB", # accepts cy-GB, da-DK, de-DE, en-AU, en-GB, en-GB-WLS, en-IN, en-US, es-ES, es-US, fr-CA, fr-FR, is-IS, it-IT, ja-JP, nb-NO, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sv-SE, tr-TR
35
+ # next_token: "NextToken",
36
+ # }
37
+ #
38
+ # @!attribute [rw] language_code
39
+ # The language identification tag (ISO 639 code for the language
40
+ # name-ISO 3166 country code) for filtering the list of voices
41
+ # returned. If you don't specify this optional parameter, all
42
+ # available voices are returned.
43
+ # @return [String]
44
+ #
45
+ # @!attribute [rw] next_token
46
+ # An opaque pagination token returned from the previous
47
+ # `DescribeVoices` operation. If present, this indicates where to
48
+ # continue the listing.
49
+ # @return [String]
50
+ #
51
+ class DescribeVoicesInput < Struct.new(
52
+ :language_code,
53
+ :next_token)
54
+ include Aws::Structure
55
+ end
68
56
 
69
- # @note When making an API call, pass GetLexiconInput
70
- # data as a hash:
71
- #
72
- # {
73
- # name: "LexiconName", # required
74
- # }
75
- # @!attribute [rw] name
76
- # Name of the lexicon.
77
- # @return [String]
78
- class GetLexiconInput < Struct.new(
79
- :name)
80
- include Aws::Structure
81
- end
57
+ # @!attribute [rw] voices
58
+ # A list of voices with their properties.
59
+ # @return [Array<Types::Voice>]
60
+ #
61
+ # @!attribute [rw] next_token
62
+ # The pagination token to use in the next request to continue the
63
+ # listing of voices. `NextToken` is returned only if the response is
64
+ # truncated.
65
+ # @return [String]
66
+ #
67
+ class DescribeVoicesOutput < Struct.new(
68
+ :voices,
69
+ :next_token)
70
+ include Aws::Structure
71
+ end
82
72
 
83
- # @!attribute [rw] lexicon
84
- # Lexicon object that provides name and the string content of the
85
- # lexicon.
86
- # @return [Types::Lexicon]
87
- #
88
- # @!attribute [rw] lexicon_attributes
89
- # Metadata of the lexicon, including phonetic alphabetic used,
90
- # language code, lexicon ARN, number of lexemes defined in the
91
- # lexicon, and size of lexicon in bytes.
92
- # @return [Types::LexiconAttributes]
93
- class GetLexiconOutput < Struct.new(
94
- :lexicon,
95
- :lexicon_attributes)
96
- include Aws::Structure
97
- end
73
+ # @note When making an API call, you may pass GetLexiconInput
74
+ # data as a hash:
75
+ #
76
+ # {
77
+ # name: "LexiconName", # required
78
+ # }
79
+ #
80
+ # @!attribute [rw] name
81
+ # Name of the lexicon.
82
+ # @return [String]
83
+ #
84
+ class GetLexiconInput < Struct.new(
85
+ :name)
86
+ include Aws::Structure
87
+ end
98
88
 
99
- # Provides lexicon name and lexicon content in string format. For more
100
- # information, see [Pronunciation Lexicon Specification (PLS) Version
101
- # 1.0][1].
102
- #
103
- #
104
- #
105
- # [1]: https://www.w3.org/TR/pronunciation-lexicon/
106
- # @!attribute [rw] content
107
- # Lexicon content in string format. The content of a lexicon must be
108
- # in PLS format.
109
- # @return [String]
110
- #
111
- # @!attribute [rw] name
112
- # Name of the lexicon.
113
- # @return [String]
114
- class Lexicon < Struct.new(
115
- :content,
116
- :name)
117
- include Aws::Structure
118
- end
89
+ # @!attribute [rw] lexicon
90
+ # Lexicon object that provides name and the string content of the
91
+ # lexicon.
92
+ # @return [Types::Lexicon]
93
+ #
94
+ # @!attribute [rw] lexicon_attributes
95
+ # Metadata of the lexicon, including phonetic alphabetic used,
96
+ # language code, lexicon ARN, number of lexemes defined in the
97
+ # lexicon, and size of lexicon in bytes.
98
+ # @return [Types::LexiconAttributes]
99
+ #
100
+ class GetLexiconOutput < Struct.new(
101
+ :lexicon,
102
+ :lexicon_attributes)
103
+ include Aws::Structure
104
+ end
119
105
 
120
- # Contains metadata describing the lexicon such as the number of
121
- # lexemes, language code, and so on. For more information, see [Managing
122
- # Lexicons][1].
123
- #
124
- #
125
- #
126
- # [1]: http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html
127
- # @!attribute [rw] alphabet
128
- # Phonetic alphabet used in the lexicon. Valid values are `ipa` and
129
- # `x-sampa`.
130
- # @return [String]
131
- #
132
- # @!attribute [rw] language_code
133
- # Language code that the lexicon applies to. A lexicon with a language
134
- # code such as "en" would be applied to all English languages
135
- # (en-GB, en-US, en-AUS, en-WLS, and so on.
136
- # @return [String]
137
- #
138
- # @!attribute [rw] last_modified
139
- # Date lexicon was last modified (a timestamp value).
140
- # @return [Time]
141
- #
142
- # @!attribute [rw] lexicon_arn
143
- # Amazon Resource Name (ARN) of the lexicon.
144
- # @return [String]
145
- #
146
- # @!attribute [rw] lexemes_count
147
- # Number of lexemes in the lexicon.
148
- # @return [Integer]
149
- #
150
- # @!attribute [rw] size
151
- # Total size of the lexicon, in characters.
152
- # @return [Integer]
153
- class LexiconAttributes < Struct.new(
154
- :alphabet,
155
- :language_code,
156
- :last_modified,
157
- :lexicon_arn,
158
- :lexemes_count,
159
- :size)
160
- include Aws::Structure
161
- end
106
+ # Provides lexicon name and lexicon content in string format. For more
107
+ # information, see [Pronunciation Lexicon Specification (PLS) Version
108
+ # 1.0][1].
109
+ #
110
+ #
111
+ #
112
+ # [1]: https://www.w3.org/TR/pronunciation-lexicon/
113
+ #
114
+ # @!attribute [rw] content
115
+ # Lexicon content in string format. The content of a lexicon must be
116
+ # in PLS format.
117
+ # @return [String]
118
+ #
119
+ # @!attribute [rw] name
120
+ # Name of the lexicon.
121
+ # @return [String]
122
+ #
123
+ class Lexicon < Struct.new(
124
+ :content,
125
+ :name)
126
+ include Aws::Structure
127
+ end
162
128
 
163
- # Describes the content of the lexicon.
164
- # @!attribute [rw] name
165
- # Name of the lexicon.
166
- # @return [String]
167
- #
168
- # @!attribute [rw] attributes
169
- # Provides lexicon metadata.
170
- # @return [Types::LexiconAttributes]
171
- class LexiconDescription < Struct.new(
172
- :name,
173
- :attributes)
174
- include Aws::Structure
175
- end
129
+ # Contains metadata describing the lexicon such as the number of
130
+ # lexemes, language code, and so on. For more information, see [Managing
131
+ # Lexicons][1].
132
+ #
133
+ #
134
+ #
135
+ # [1]: http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html
136
+ #
137
+ # @!attribute [rw] alphabet
138
+ # Phonetic alphabet used in the lexicon. Valid values are `ipa` and
139
+ # `x-sampa`.
140
+ # @return [String]
141
+ #
142
+ # @!attribute [rw] language_code
143
+ # Language code that the lexicon applies to. A lexicon with a language
144
+ # code such as "en" would be applied to all English languages
145
+ # (en-GB, en-US, en-AUS, en-WLS, and so on.
146
+ # @return [String]
147
+ #
148
+ # @!attribute [rw] last_modified
149
+ # Date lexicon was last modified (a timestamp value).
150
+ # @return [Time]
151
+ #
152
+ # @!attribute [rw] lexicon_arn
153
+ # Amazon Resource Name (ARN) of the lexicon.
154
+ # @return [String]
155
+ #
156
+ # @!attribute [rw] lexemes_count
157
+ # Number of lexemes in the lexicon.
158
+ # @return [Integer]
159
+ #
160
+ # @!attribute [rw] size
161
+ # Total size of the lexicon, in characters.
162
+ # @return [Integer]
163
+ #
164
+ class LexiconAttributes < Struct.new(
165
+ :alphabet,
166
+ :language_code,
167
+ :last_modified,
168
+ :lexicon_arn,
169
+ :lexemes_count,
170
+ :size)
171
+ include Aws::Structure
172
+ end
176
173
 
177
- # @note When making an API call, pass ListLexiconsInput
178
- # data as a hash:
179
- #
180
- # {
181
- # next_token: "NextToken",
182
- # }
183
- # @!attribute [rw] next_token
184
- # An opaque pagination token returned from previous `ListLexicons`
185
- # operation. If present, indicates where to continue the list of
186
- # lexicons.
187
- # @return [String]
188
- class ListLexiconsInput < Struct.new(
189
- :next_token)
190
- include Aws::Structure
191
- end
174
+ # Describes the content of the lexicon.
175
+ #
176
+ # @!attribute [rw] name
177
+ # Name of the lexicon.
178
+ # @return [String]
179
+ #
180
+ # @!attribute [rw] attributes
181
+ # Provides lexicon metadata.
182
+ # @return [Types::LexiconAttributes]
183
+ #
184
+ class LexiconDescription < Struct.new(
185
+ :name,
186
+ :attributes)
187
+ include Aws::Structure
188
+ end
192
189
 
193
- # @!attribute [rw] lexicons
194
- # A list of lexicon names and attributes.
195
- # @return [Array<Types::LexiconDescription>]
196
- #
197
- # @!attribute [rw] next_token
198
- # The pagination token to use in the next request to continue the
199
- # listing of lexicons. `NextToken` is returned only if the response is
200
- # truncated.
201
- # @return [String]
202
- class ListLexiconsOutput < Struct.new(
203
- :lexicons,
204
- :next_token)
205
- include Aws::Structure
206
- end
190
+ # @note When making an API call, you may pass ListLexiconsInput
191
+ # data as a hash:
192
+ #
193
+ # {
194
+ # next_token: "NextToken",
195
+ # }
196
+ #
197
+ # @!attribute [rw] next_token
198
+ # An opaque pagination token returned from previous `ListLexicons`
199
+ # operation. If present, indicates where to continue the list of
200
+ # lexicons.
201
+ # @return [String]
202
+ #
203
+ class ListLexiconsInput < Struct.new(
204
+ :next_token)
205
+ include Aws::Structure
206
+ end
207
207
 
208
- # @note When making an API call, pass PutLexiconInput
209
- # data as a hash:
210
- #
211
- # {
212
- # name: "LexiconName", # required
213
- # content: "LexiconContent", # required
214
- # }
215
- # @!attribute [rw] name
216
- # Name of the lexicon. The name must follow the regular express format
217
- # \[0-9A-Za-z\]\\\{1,20\\}. That is, the name is a case-sensitive
218
- # alphanumeric string up to 20 characters long.
219
- # @return [String]
220
- #
221
- # @!attribute [rw] content
222
- # Content of the PLS lexicon as string data.
223
- # @return [String]
224
- class PutLexiconInput < Struct.new(
225
- :name,
226
- :content)
227
- include Aws::Structure
228
- end
208
+ # @!attribute [rw] lexicons
209
+ # A list of lexicon names and attributes.
210
+ # @return [Array<Types::LexiconDescription>]
211
+ #
212
+ # @!attribute [rw] next_token
213
+ # The pagination token to use in the next request to continue the
214
+ # listing of lexicons. `NextToken` is returned only if the response is
215
+ # truncated.
216
+ # @return [String]
217
+ #
218
+ class ListLexiconsOutput < Struct.new(
219
+ :lexicons,
220
+ :next_token)
221
+ include Aws::Structure
222
+ end
229
223
 
230
- class PutLexiconOutput < Aws::EmptyStructure; end
224
+ # @note When making an API call, you may pass PutLexiconInput
225
+ # data as a hash:
226
+ #
227
+ # {
228
+ # name: "LexiconName", # required
229
+ # content: "LexiconContent", # required
230
+ # }
231
+ #
232
+ # @!attribute [rw] name
233
+ # Name of the lexicon. The name must follow the regular express format
234
+ # \[0-9A-Za-z\]\\\{1,20\\}. That is, the name is a case-sensitive
235
+ # alphanumeric string up to 20 characters long.
236
+ # @return [String]
237
+ #
238
+ # @!attribute [rw] content
239
+ # Content of the PLS lexicon as string data.
240
+ # @return [String]
241
+ #
242
+ class PutLexiconInput < Struct.new(
243
+ :name,
244
+ :content)
245
+ include Aws::Structure
246
+ end
231
247
 
232
- # @note When making an API call, pass SynthesizeSpeechInput
233
- # data as a hash:
234
- #
235
- # {
236
- # lexicon_names: ["LexiconName"],
237
- # output_format: "mp3", # required, accepts mp3, ogg_vorbis, pcm
238
- # sample_rate: "SampleRate",
239
- # text: "Text", # required
240
- # text_type: "ssml", # accepts ssml, text
241
- # voice_id: "Geraint", # required, accepts Geraint, Gwyneth, Mads, Naja, Hans, Marlene, Nicole, Russell, Amy, Brian, Emma, Raveena, Ivy, Joanna, Joey, Justin, Kendra, Kimberly, Salli, Conchita, Enrique, Miguel, Penelope, Chantal, Celine, Mathieu, Dora, Karl, Carla, Giorgio, Mizuki, Liv, Lotte, Ruben, Ewa, Jacek, Jan, Maja, Ricardo, Vitoria, Cristiano, Ines, Carmen, Maxim, Tatyana, Astrid, Filiz
242
- # }
243
- # @!attribute [rw] lexicon_names
244
- # List of one or more pronunciation lexicon names you want the service
245
- # to apply during synthesis. Lexicons are applied only if the language
246
- # of the lexicon is the same as the language of the voice. For
247
- # information about storing lexicons, see [PutLexicon][1].
248
- #
249
- #
250
- #
251
- # [1]: http://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html
252
- # @return [Array<String>]
253
- #
254
- # @!attribute [rw] output_format
255
- # The audio format in which the resulting stream will be encoded.
256
- # @return [String]
257
- #
258
- # @!attribute [rw] sample_rate
259
- # The audio frequency specified in Hz.
260
- #
261
- # The valid values for `mp3` and `ogg_vorbis` are "8000", "16000",
262
- # and "22050". The default value is "22050".
263
- #
264
- # Valid values for `pcm` are "8000" and "16000" The default value
265
- # is "16000".
266
- # @return [String]
267
- #
268
- # @!attribute [rw] text
269
- # Input text to synthesize. If you specify `ssml` as the `TextType`,
270
- # follow the SSML format for the input text.
271
- # @return [String]
272
- #
273
- # @!attribute [rw] text_type
274
- # Specifies whether the input text is plain text or SSML. The default
275
- # value is plain text. For more information, see [Using SSML][1].
276
- #
277
- #
278
- #
279
- # [1]: http://docs.aws.amazon.com/polly/latest/dg/ssml.html
280
- # @return [String]
281
- #
282
- # @!attribute [rw] voice_id
283
- # Voice ID to use for the synthesis. You can get a list of available
284
- # voice IDs by calling the [DescribeVoices][1] operation.
285
- #
286
- #
287
- #
288
- # [1]: http://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html
289
- # @return [String]
290
- class SynthesizeSpeechInput < Struct.new(
291
- :lexicon_names,
292
- :output_format,
293
- :sample_rate,
294
- :text,
295
- :text_type,
296
- :voice_id)
297
- include Aws::Structure
298
- end
248
+ class PutLexiconOutput < Aws::EmptyStructure; end
299
249
 
300
- # @!attribute [rw] audio_stream
301
- # Stream containing the synthesized speech.
302
- # @return [IO]
303
- #
304
- # @!attribute [rw] content_type
305
- # Specifies the type audio stream. This should reflect the
306
- # `OutputFormat` parameter in your request.
307
- #
308
- # * If you request `mp3` as the `OutputFormat`, the `ContentType`
309
- # returned is audio/mpeg.
310
- #
311
- # * If you request `ogg_vorbis` as the `OutputFormat`, the
312
- # `ContentType` returned is audio/ogg.
313
- #
314
- # * If you request `pcm` as the `OutputFormat`, the `ContentType`
315
- # returned is audio/pcm.
316
- # @return [String]
317
- #
318
- # @!attribute [rw] request_characters
319
- # Number of characters synthesized.
320
- # @return [Integer]
321
- class SynthesizeSpeechOutput < Struct.new(
322
- :audio_stream,
323
- :content_type,
324
- :request_characters)
325
- include Aws::Structure
326
- end
250
+ # @note When making an API call, you may pass SynthesizeSpeechInput
251
+ # data as a hash:
252
+ #
253
+ # {
254
+ # lexicon_names: ["LexiconName"],
255
+ # output_format: "mp3", # required, accepts mp3, ogg_vorbis, pcm
256
+ # sample_rate: "SampleRate",
257
+ # text: "Text", # required
258
+ # text_type: "ssml", # accepts ssml, text
259
+ # voice_id: "Geraint", # required, accepts Geraint, Gwyneth, Mads, Naja, Hans, Marlene, Nicole, Russell, Amy, Brian, Emma, Raveena, Ivy, Joanna, Joey, Justin, Kendra, Kimberly, Salli, Conchita, Enrique, Miguel, Penelope, Chantal, Celine, Mathieu, Dora, Karl, Carla, Giorgio, Mizuki, Liv, Lotte, Ruben, Ewa, Jacek, Jan, Maja, Ricardo, Vitoria, Cristiano, Ines, Carmen, Maxim, Tatyana, Astrid, Filiz
260
+ # }
261
+ #
262
+ # @!attribute [rw] lexicon_names
263
+ # List of one or more pronunciation lexicon names you want the service
264
+ # to apply during synthesis. Lexicons are applied only if the language
265
+ # of the lexicon is the same as the language of the voice. For
266
+ # information about storing lexicons, see [PutLexicon][1].
267
+ #
268
+ #
269
+ #
270
+ # [1]: http://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html
271
+ # @return [Array<String>]
272
+ #
273
+ # @!attribute [rw] output_format
274
+ # The audio format in which the resulting stream will be encoded.
275
+ # @return [String]
276
+ #
277
+ # @!attribute [rw] sample_rate
278
+ # The audio frequency specified in Hz.
279
+ #
280
+ # The valid values for `mp3` and `ogg_vorbis` are "8000", "16000",
281
+ # and "22050". The default value is "22050".
282
+ #
283
+ # Valid values for `pcm` are "8000" and "16000" The default value
284
+ # is "16000".
285
+ # @return [String]
286
+ #
287
+ # @!attribute [rw] text
288
+ # Input text to synthesize. If you specify `ssml` as the `TextType`,
289
+ # follow the SSML format for the input text.
290
+ # @return [String]
291
+ #
292
+ # @!attribute [rw] text_type
293
+ # Specifies whether the input text is plain text or SSML. The default
294
+ # value is plain text. For more information, see [Using SSML][1].
295
+ #
296
+ #
297
+ #
298
+ # [1]: http://docs.aws.amazon.com/polly/latest/dg/ssml.html
299
+ # @return [String]
300
+ #
301
+ # @!attribute [rw] voice_id
302
+ # Voice ID to use for the synthesis. You can get a list of available
303
+ # voice IDs by calling the [DescribeVoices][1] operation.
304
+ #
305
+ #
306
+ #
307
+ # [1]: http://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html
308
+ # @return [String]
309
+ #
310
+ class SynthesizeSpeechInput < Struct.new(
311
+ :lexicon_names,
312
+ :output_format,
313
+ :sample_rate,
314
+ :text,
315
+ :text_type,
316
+ :voice_id)
317
+ include Aws::Structure
318
+ end
327
319
 
328
- # Description of the voice.
329
- # @!attribute [rw] gender
330
- # Gender of the voice.
331
- # @return [String]
332
- #
333
- # @!attribute [rw] id
334
- # Amazon Polly assigned voice ID. This is the ID that you specify when
335
- # calling the `SynthesizeSpeech` operation.
336
- # @return [String]
337
- #
338
- # @!attribute [rw] language_code
339
- # Language code of the voice.
340
- # @return [String]
341
- #
342
- # @!attribute [rw] language_name
343
- # Human readable name of the language in English.
344
- # @return [String]
345
- #
346
- # @!attribute [rw] name
347
- # Name of the voice (for example, Salli, Kendra, etc.). This provides
348
- # a human readable voice name that you might display in your
349
- # application.
350
- # @return [String]
351
- class Voice < Struct.new(
352
- :gender,
353
- :id,
354
- :language_code,
355
- :language_name,
356
- :name)
357
- include Aws::Structure
358
- end
320
+ # @!attribute [rw] audio_stream
321
+ # Stream containing the synthesized speech.
322
+ # @return [IO]
323
+ #
324
+ # @!attribute [rw] content_type
325
+ # Specifies the type audio stream. This should reflect the
326
+ # `OutputFormat` parameter in your request.
327
+ #
328
+ # * If you request `mp3` as the `OutputFormat`, the `ContentType`
329
+ # returned is audio/mpeg.
330
+ #
331
+ # * If you request `ogg_vorbis` as the `OutputFormat`, the
332
+ # `ContentType` returned is audio/ogg.
333
+ #
334
+ # * If you request `pcm` as the `OutputFormat`, the `ContentType`
335
+ # returned is audio/pcm in a signed 16-bit, 1 channel (mono),
336
+ # little-endian format.
337
+ # @return [String]
338
+ #
339
+ # @!attribute [rw] request_characters
340
+ # Number of characters synthesized.
341
+ # @return [Integer]
342
+ #
343
+ class SynthesizeSpeechOutput < Struct.new(
344
+ :audio_stream,
345
+ :content_type,
346
+ :request_characters)
347
+ include Aws::Structure
348
+ end
359
349
 
350
+ # Description of the voice.
351
+ #
352
+ # @!attribute [rw] gender
353
+ # Gender of the voice.
354
+ # @return [String]
355
+ #
356
+ # @!attribute [rw] id
357
+ # Amazon Polly assigned voice ID. This is the ID that you specify when
358
+ # calling the `SynthesizeSpeech` operation.
359
+ # @return [String]
360
+ #
361
+ # @!attribute [rw] language_code
362
+ # Language code of the voice.
363
+ # @return [String]
364
+ #
365
+ # @!attribute [rw] language_name
366
+ # Human readable name of the language in English.
367
+ # @return [String]
368
+ #
369
+ # @!attribute [rw] name
370
+ # Name of the voice (for example, Salli, Kendra, etc.). This provides
371
+ # a human readable voice name that you might display in your
372
+ # application.
373
+ # @return [String]
374
+ #
375
+ class Voice < Struct.new(
376
+ :gender,
377
+ :id,
378
+ :language_code,
379
+ :language_name,
380
+ :name)
381
+ include Aws::Structure
360
382
  end
383
+
361
384
  end
362
385
  end