1 | import {Request} from '../lib/request';
|
2 | import {Response} from '../lib/response';
|
3 | import {AWSError} from '../lib/error';
|
4 | import {PollyCustomizations} from '../lib/services/polly';
|
5 | import {ServiceConfigurationOptions} from '../lib/service';
|
6 | import {ConfigBase as Config} from '../lib/config';
|
7 | import {Presigner as presigner} from '../lib/polly/presigner';
|
8 | import {Readable} from 'stream';
|
9 | interface Blob {}
|
10 | declare class Polly extends PollyCustomizations {
|
11 | |
12 |
|
13 |
|
14 | constructor(options?: Polly.Types.ClientConfiguration)
|
15 | config: Config & Polly.Types.ClientConfiguration;
|
16 | /**
|
17 | * Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see Managing Lexicons.
|
18 | */
|
19 | deleteLexicon(params: Polly.Types.DeleteLexiconInput, callback?: (err: AWSError, data: Polly.Types.DeleteLexiconOutput) => void): Request<Polly.Types.DeleteLexiconOutput, AWSError>;
|
20 | /**
|
21 | * Deletes the specified pronunciation lexicon stored in an AWS Region. A lexicon which has been deleted is not available for speech synthesis, nor is it possible to retrieve it using either the GetLexicon or ListLexicon APIs. For more information, see Managing Lexicons.
|
22 | */
|
23 | deleteLexicon(callback?: (err: AWSError, data: Polly.Types.DeleteLexiconOutput) => void): Request<Polly.Types.DeleteLexiconOutput, AWSError>;
|
24 | /**
|
25 | * Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name. When synthesizing speech ( SynthesizeSpeech ), you provide the voice ID for the voice you want from the list of voices returned by DescribeVoices. For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the DescribeVoices operation you can provide the user with a list of available voices to select from. You can optionally specify a language code to filter the available voices. For example, if you specify en-US, the operation returns a list of all available US English voices. This operation requires permissions to perform the polly:DescribeVoices action.
|
26 | */
|
27 | describeVoices(params: Polly.Types.DescribeVoicesInput, callback?: (err: AWSError, data: Polly.Types.DescribeVoicesOutput) => void): Request<Polly.Types.DescribeVoicesOutput, AWSError>;
|
28 | /**
|
29 | * Returns the list of voices that are available for use when requesting speech synthesis. Each voice speaks a specified language, is either male or female, and is identified by an ID, which is the ASCII version of the voice name. When synthesizing speech ( SynthesizeSpeech ), you provide the voice ID for the voice you want from the list of voices returned by DescribeVoices. For example, you want your news reader application to read news in a specific language, but giving a user the option to choose the voice. Using the DescribeVoices operation you can provide the user with a list of available voices to select from. You can optionally specify a language code to filter the available voices. For example, if you specify en-US, the operation returns a list of all available US English voices. This operation requires permissions to perform the polly:DescribeVoices action.
|
30 | */
|
31 | describeVoices(callback?: (err: AWSError, data: Polly.Types.DescribeVoicesOutput) => void): Request<Polly.Types.DescribeVoicesOutput, AWSError>;
|
32 | /**
|
33 | * Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
|
34 | */
|
35 | getLexicon(params: Polly.Types.GetLexiconInput, callback?: (err: AWSError, data: Polly.Types.GetLexiconOutput) => void): Request<Polly.Types.GetLexiconOutput, AWSError>;
|
36 | /**
|
37 | * Returns the content of the specified pronunciation lexicon stored in an AWS Region. For more information, see Managing Lexicons.
|
38 | */
|
39 | getLexicon(callback?: (err: AWSError, data: Polly.Types.GetLexiconOutput) => void): Request<Polly.Types.GetLexiconOutput, AWSError>;
|
40 | /**
|
41 | * Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task.
|
42 | */
|
43 | getSpeechSynthesisTask(params: Polly.Types.GetSpeechSynthesisTaskInput, callback?: (err: AWSError, data: Polly.Types.GetSpeechSynthesisTaskOutput) => void): Request<Polly.Types.GetSpeechSynthesisTaskOutput, AWSError>;
|
44 | /**
|
45 | * Retrieves a specific SpeechSynthesisTask object based on its TaskID. This object contains information about the given speech synthesis task, including the status of the task, and a link to the S3 bucket containing the output of the task.
|
46 | */
|
47 | getSpeechSynthesisTask(callback?: (err: AWSError, data: Polly.Types.GetSpeechSynthesisTaskOutput) => void): Request<Polly.Types.GetSpeechSynthesisTaskOutput, AWSError>;
|
48 | /**
|
49 | * Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
|
50 | */
|
51 | listLexicons(params: Polly.Types.ListLexiconsInput, callback?: (err: AWSError, data: Polly.Types.ListLexiconsOutput) => void): Request<Polly.Types.ListLexiconsOutput, AWSError>;
|
52 | /**
|
53 | * Returns a list of pronunciation lexicons stored in an AWS Region. For more information, see Managing Lexicons.
|
54 | */
|
55 | listLexicons(callback?: (err: AWSError, data: Polly.Types.ListLexiconsOutput) => void): Request<Polly.Types.ListLexiconsOutput, AWSError>;
|
56 | /**
|
57 | * Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed.
|
58 | */
|
59 | listSpeechSynthesisTasks(params: Polly.Types.ListSpeechSynthesisTasksInput, callback?: (err: AWSError, data: Polly.Types.ListSpeechSynthesisTasksOutput) => void): Request<Polly.Types.ListSpeechSynthesisTasksOutput, AWSError>;
|
60 | /**
|
61 | * Returns a list of SpeechSynthesisTask objects ordered by their creation date. This operation can filter the tasks by their status, for example, allowing users to list only tasks that are completed.
|
62 | */
|
63 | listSpeechSynthesisTasks(callback?: (err: AWSError, data: Polly.Types.ListSpeechSynthesisTasksOutput) => void): Request<Polly.Types.ListSpeechSynthesisTasksOutput, AWSError>;
|
64 | /**
|
65 | * Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation. For more information, see Managing Lexicons.
|
66 | */
|
67 | putLexicon(params: Polly.Types.PutLexiconInput, callback?: (err: AWSError, data: Polly.Types.PutLexiconOutput) => void): Request<Polly.Types.PutLexiconOutput, AWSError>;
|
68 | /**
|
69 | * Stores a pronunciation lexicon in an AWS Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation. For more information, see Managing Lexicons.
|
70 | */
|
71 | putLexicon(callback?: (err: AWSError, data: Polly.Types.PutLexiconOutput) => void): Request<Polly.Types.PutLexiconOutput, AWSError>;
|
72 | /**
|
73 | * Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask. This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status.
|
74 | */
|
75 | startSpeechSynthesisTask(params: Polly.Types.StartSpeechSynthesisTaskInput, callback?: (err: AWSError, data: Polly.Types.StartSpeechSynthesisTaskOutput) => void): Request<Polly.Types.StartSpeechSynthesisTaskOutput, AWSError>;
|
76 | /**
|
77 | * Allows the creation of an asynchronous synthesis task, by starting a new SpeechSynthesisTask. This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn). Once the synthesis task is created, this operation will return a SpeechSynthesisTask object, which will include an identifier of this task as well as the current status.
|
78 | */
|
79 | startSpeechSynthesisTask(callback?: (err: AWSError, data: Polly.Types.StartSpeechSynthesisTaskOutput) => void): Request<Polly.Types.StartSpeechSynthesisTaskOutput, AWSError>;
|
80 | /**
|
81 | * Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see How it Works.
|
82 | */
|
83 | synthesizeSpeech(params: Polly.Types.SynthesizeSpeechInput, callback?: (err: AWSError, data: Polly.Types.SynthesizeSpeechOutput) => void): Request<Polly.Types.SynthesizeSpeechOutput, AWSError>;
|
84 | /**
|
85 | * Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see How it Works.
|
86 | */
|
87 | synthesizeSpeech(callback?: (err: AWSError, data: Polly.Types.SynthesizeSpeechOutput) => void): Request<Polly.Types.SynthesizeSpeechOutput, AWSError>;
|
88 | }
|
89 | declare namespace Polly {
|
90 | export import Presigner = presigner;
|
91 | }
|
92 | declare namespace Polly {
|
93 | export type Alphabet = string;
|
94 | export type AudioStream = Buffer|Uint8Array|Blob|string|Readable;
|
95 | export type ContentType = string;
|
96 | export type DateTime = Date;
|
97 | export interface DeleteLexiconInput {
|
98 | |
99 |
|
100 |
|
101 | Name: LexiconName;
|
102 | }
|
103 | export interface DeleteLexiconOutput {
|
104 | }
|
105 | export interface DescribeVoicesInput {
|
106 | |
107 |
|
108 |
|
109 | Engine?: Engine;
|
110 | |
111 |
|
112 |
|
113 | LanguageCode?: LanguageCode;
|
114 | |
115 |
|
116 |
|
117 | IncludeAdditionalLanguageCodes?: IncludeAdditionalLanguageCodes;
|
118 | |
119 |
|
120 |
|
121 | NextToken?: NextToken;
|
122 | }
|
123 | export interface DescribeVoicesOutput {
|
124 | |
125 |
|
126 |
|
127 | Voices?: VoiceList;
|
128 | |
129 |
|
130 |
|
131 | NextToken?: NextToken;
|
132 | }
|
133 | export type Engine = "standard"|"neural"|string;
|
134 | export type EngineList = Engine[];
|
135 | export type Gender = "Female"|"Male"|string;
|
136 | export interface GetLexiconInput {
|
137 | |
138 |
|
139 |
|
140 | Name: LexiconName;
|
141 | }
|
142 | export interface GetLexiconOutput {
|
143 | |
144 |
|
145 |
|
146 | Lexicon?: Lexicon;
|
147 | |
148 |
|
149 |
|
150 | LexiconAttributes?: LexiconAttributes;
|
151 | }
|
152 | export interface GetSpeechSynthesisTaskInput {
|
153 | |
154 |
|
155 |
|
156 | TaskId: TaskId;
|
157 | }
|
158 | export interface GetSpeechSynthesisTaskOutput {
|
159 | |
160 |
|
161 |
|
162 | SynthesisTask?: SynthesisTask;
|
163 | }
|
164 | export type IncludeAdditionalLanguageCodes = boolean;
|
165 | export type LanguageCode = "arb"|"cmn-CN"|"cy-GB"|"da-DK"|"de-DE"|"en-AU"|"en-GB"|"en-GB-WLS"|"en-IN"|"en-US"|"es-ES"|"es-MX"|"es-US"|"fr-CA"|"fr-FR"|"is-IS"|"it-IT"|"ja-JP"|"hi-IN"|"ko-KR"|"nb-NO"|"nl-NL"|"pl-PL"|"pt-BR"|"pt-PT"|"ro-RO"|"ru-RU"|"sv-SE"|"tr-TR"|string;
|
166 | export type LanguageCodeList = LanguageCode[];
|
167 | export type LanguageName = string;
|
168 | export type LastModified = Date;
|
169 | export type LexemesCount = number;
|
170 | export interface Lexicon {
|
171 | |
172 |
|
173 |
|
174 | Content?: LexiconContent;
|
175 | |
176 |
|
177 |
|
178 | Name?: LexiconName;
|
179 | }
|
180 | export type LexiconArn = string;
|
181 | export interface LexiconAttributes {
|
182 | |
183 |
|
184 |
|
185 | Alphabet?: Alphabet;
|
186 | |
187 |
|
188 |
|
189 | LanguageCode?: LanguageCode;
|
190 | |
191 |
|
192 |
|
193 | LastModified?: LastModified;
|
194 | |
195 |
|
196 |
|
197 | LexiconArn?: LexiconArn;
|
198 | |
199 |
|
200 |
|
201 | LexemesCount?: LexemesCount;
|
202 | |
203 |
|
204 |
|
205 | Size?: Size;
|
206 | }
|
207 | export type LexiconContent = string;
|
208 | export interface LexiconDescription {
|
209 | |
210 |
|
211 |
|
212 | Name?: LexiconName;
|
213 | |
214 |
|
215 |
|
216 | Attributes?: LexiconAttributes;
|
217 | }
|
218 | export type LexiconDescriptionList = LexiconDescription[];
|
219 | export type LexiconName = string;
|
220 | export type LexiconNameList = LexiconName[];
|
221 | export interface ListLexiconsInput {
|
222 | |
223 |
|
224 |
|
225 | NextToken?: NextToken;
|
226 | }
|
227 | export interface ListLexiconsOutput {
|
228 | |
229 |
|
230 |
|
231 | Lexicons?: LexiconDescriptionList;
|
232 | |
233 |
|
234 |
|
235 | NextToken?: NextToken;
|
236 | }
|
237 | export interface ListSpeechSynthesisTasksInput {
|
238 | |
239 |
|
240 |
|
241 | MaxResults?: MaxResults;
|
242 | |
243 |
|
244 |
|
245 | NextToken?: NextToken;
|
246 | |
247 |
|
248 |
|
249 | Status?: TaskStatus;
|
250 | }
|
251 | export interface ListSpeechSynthesisTasksOutput {
|
252 | |
253 |
|
254 |
|
255 | NextToken?: NextToken;
|
256 | |
257 |
|
258 |
|
259 | SynthesisTasks?: SynthesisTasks;
|
260 | }
|
261 | export type MaxResults = number;
|
262 | export type NextToken = string;
|
263 | export type OutputFormat = "json"|"mp3"|"ogg_vorbis"|"pcm"|string;
|
264 | export type OutputS3BucketName = string;
|
265 | export type OutputS3KeyPrefix = string;
|
266 | export type OutputUri = string;
|
267 | export interface PutLexiconInput {
|
268 | |
269 |
|
270 |
|
271 | Name: LexiconName;
|
272 | |
273 |
|
274 |
|
275 | Content: LexiconContent;
|
276 | }
|
277 | export interface PutLexiconOutput {
|
278 | }
|
279 | export type RequestCharacters = number;
|
280 | export type SampleRate = string;
|
281 | export type Size = number;
|
282 | export type SnsTopicArn = string;
|
283 | export type SpeechMarkType = "sentence"|"ssml"|"viseme"|"word"|string;
|
284 | export type SpeechMarkTypeList = SpeechMarkType[];
|
285 | export interface StartSpeechSynthesisTaskInput {
|
286 | |
287 |
|
288 |
|
289 | Engine?: Engine;
|
290 | |
291 |
|
292 |
|
293 | LanguageCode?: LanguageCode;
|
294 | |
295 |
|
296 |
|
297 | LexiconNames?: LexiconNameList;
|
298 | |
299 |
|
300 |
|
301 | OutputFormat: OutputFormat;
|
302 | |
303 |
|
304 |
|
305 | OutputS3BucketName: OutputS3BucketName;
|
306 | |
307 |
|
308 |
|
309 | OutputS3KeyPrefix?: OutputS3KeyPrefix;
|
310 | |
311 |
|
312 |
|
313 | SampleRate?: SampleRate;
|
314 | |
315 |
|
316 |
|
317 | SnsTopicArn?: SnsTopicArn;
|
318 | |
319 |
|
320 |
|
321 | SpeechMarkTypes?: SpeechMarkTypeList;
|
322 | |
323 |
|
324 |
|
325 | Text: Text;
|
326 | |
327 |
|
328 |
|
329 | TextType?: TextType;
|
330 | |
331 |
|
332 |
|
333 | VoiceId: VoiceId;
|
334 | }
|
335 | export interface StartSpeechSynthesisTaskOutput {
|
336 | |
337 |
|
338 |
|
339 | SynthesisTask?: SynthesisTask;
|
340 | }
|
341 | export interface SynthesisTask {
|
342 | |
343 |
|
344 |
|
345 | Engine?: Engine;
|
346 | |
347 |
|
348 |
|
349 | TaskId?: TaskId;
|
350 | |
351 |
|
352 |
|
353 | TaskStatus?: TaskStatus;
|
354 | |
355 |
|
356 |
|
357 | TaskStatusReason?: TaskStatusReason;
|
358 | |
359 |
|
360 |
|
361 | OutputUri?: OutputUri;
|
362 | |
363 |
|
364 |
|
365 | CreationTime?: DateTime;
|
366 | |
367 |
|
368 |
|
369 | RequestCharacters?: RequestCharacters;
|
370 | |
371 |
|
372 |
|
373 | SnsTopicArn?: SnsTopicArn;
|
374 | |
375 |
|
376 |
|
377 | LexiconNames?: LexiconNameList;
|
378 | |
379 |
|
380 |
|
381 | OutputFormat?: OutputFormat;
|
382 | |
383 |
|
384 |
|
385 | SampleRate?: SampleRate;
|
386 | |
387 |
|
388 |
|
389 | SpeechMarkTypes?: SpeechMarkTypeList;
|
390 | |
391 |
|
392 |
|
393 | TextType?: TextType;
|
394 | |
395 |
|
396 |
|
397 | VoiceId?: VoiceId;
|
398 | |
399 |
|
400 |
|
401 | LanguageCode?: LanguageCode;
|
402 | }
|
403 | export type SynthesisTasks = SynthesisTask[];
|
404 | export interface SynthesizeSpeechInput {
|
405 | |
406 |
|
407 |
|
408 | Engine?: Engine;
|
409 | |
410 |
|
411 |
|
412 | LanguageCode?: LanguageCode;
|
413 | |
414 |
|
415 |
|
416 | LexiconNames?: LexiconNameList;
|
417 | |
418 |
|
419 |
|
420 | OutputFormat: OutputFormat;
|
421 | |
422 |
|
423 |
|
424 | SampleRate?: SampleRate;
|
425 | |
426 |
|
427 |
|
428 | SpeechMarkTypes?: SpeechMarkTypeList;
|
429 | |
430 |
|
431 |
|
432 | Text: Text;
|
433 | |
434 |
|
435 |
|
436 | TextType?: TextType;
|
437 | |
438 |
|
439 |
|
440 | VoiceId: VoiceId;
|
441 | }
|
442 | export interface SynthesizeSpeechOutput {
|
443 | |
444 |
|
445 |
|
446 | AudioStream?: AudioStream;
|
447 | |
448 |
|
449 |
|
450 | ContentType?: ContentType;
|
451 | |
452 |
|
453 |
|
454 | RequestCharacters?: RequestCharacters;
|
455 | }
|
456 | export type TaskId = string;
|
457 | export type TaskStatus = "scheduled"|"inProgress"|"completed"|"failed"|string;
|
458 | export type TaskStatusReason = string;
|
459 | export type Text = string;
|
460 | export type TextType = "ssml"|"text"|string;
|
461 | export interface Voice {
|
462 | |
463 |
|
464 |
|
465 | Gender?: Gender;
|
466 | |
467 |
|
468 |
|
469 | Id?: VoiceId;
|
470 | |
471 |
|
472 |
|
473 | LanguageCode?: LanguageCode;
|
474 | |
475 |
|
476 |
|
477 | LanguageName?: LanguageName;
|
478 | |
479 |
|
480 |
|
481 | Name?: VoiceName;
|
482 | |
483 |
|
484 |
|
485 | AdditionalLanguageCodes?: LanguageCodeList;
|
486 | |
487 |
|
488 |
|
489 | SupportedEngines?: EngineList;
|
490 | }
|
491 | export type VoiceId = "Aditi"|"Amy"|"Astrid"|"Bianca"|"Brian"|"Camila"|"Carla"|"Carmen"|"Celine"|"Chantal"|"Conchita"|"Cristiano"|"Dora"|"Emma"|"Enrique"|"Ewa"|"Filiz"|"Geraint"|"Giorgio"|"Gwyneth"|"Hans"|"Ines"|"Ivy"|"Jacek"|"Jan"|"Joanna"|"Joey"|"Justin"|"Karl"|"Kendra"|"Kimberly"|"Lea"|"Liv"|"Lotte"|"Lucia"|"Lupe"|"Mads"|"Maja"|"Marlene"|"Mathieu"|"Matthew"|"Maxim"|"Mia"|"Miguel"|"Mizuki"|"Naja"|"Nicole"|"Penelope"|"Raveena"|"Ricardo"|"Ruben"|"Russell"|"Salli"|"Seoyeon"|"Takumi"|"Tatyana"|"Vicki"|"Vitoria"|"Zeina"|"Zhiyu"|string;
|
492 | export type VoiceList = Voice[];
|
493 | export type VoiceName = string;
|
494 | |
495 |
|
496 |
|
497 | export type apiVersion = "2016-06-10"|"latest"|string;
|
498 | export interface ClientApiVersions {
|
499 | |
500 |
|
501 |
|
502 | apiVersion?: apiVersion;
|
503 | }
|
504 | export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
|
505 | |
506 |
|
507 |
|
508 | export import Types = Polly;
|
509 | }
|
510 | export = Polly;
|