-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathShotstackTextToSpeechOptions.js
More file actions
729 lines (712 loc) · 36.3 KB
/
ShotstackTextToSpeechOptions.js
File metadata and controls
729 lines (712 loc) · 36.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
* Shotstack
* Official Node SDK for the Shotstack Cloud Video Editing API
*
* The version of the OpenAPI document: v1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
/**
* The ShotstackTextToSpeechOptions model module.
* @module model/ShotstackTextToSpeechOptions
* @version 0.2.9
*/
var ShotstackTextToSpeechOptions = /*#__PURE__*/function () {
/**
* Constructs a new <code>ShotstackTextToSpeechOptions</code>.
* Options for the Shotstack text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response.
* @alias module:model/ShotstackTextToSpeechOptions
* @param type {module:model/ShotstackTextToSpeechOptions.TypeEnum} The type of asset to generate - set to `text-to-speech` for text-to-speech.
* @param text {String} The text to convert to speech.
* @param voice {module:model/ShotstackTextToSpeechOptions.VoiceEnum} The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets: <ul> <li>Arabic - Gulf (ar-AE)</li> <ul> <li>`Hala`</li> </ul> <li>Dutch - Belgian (nl-BE)</li> <ul> <li>`Lisa`</li> </ul> <li>Catalan (ca-ES)</li> <ul> <li>`Arlet`</li> </ul> <li>Chinese - Cantonese (yue-CN)</li> <ul> <li>`Hiujin`</li> </ul> <li>Chinese - Mandarin (cmn-CN)</li> <ul> <li>`Zhiyu`</li> </ul> <li>Danish (da-DK)</li> <ul> <li>`Sofie`</li> </ul> <li>Dutch (nl-NL)</li> <ul> <li>`Laura`</li> </ul> <li>English - Australian (en-AU)</li> <ul> <li>`Olivia`</li> </ul> <li>English - British (en-GB)</li> <ul> <li>`Amy`</li> <li>`Emma`</li> <li>`Brian`</li> <li>`Arthur`</li> </ul> <li>English - Indian (en-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>English - Ireland (en-IE)</li> <ul> <li>`Niamh`</li> </ul> <li>English - New Zealand (en-NZ)</li> <ul> <li>`Aria`</li> </ul> <li>English - South African (en-ZA)</li> <ul> <li>`Ayanda`</li> </ul> <li>English - US (en-US)</li> <ul> <li>`Ivy`</li> <li>`Joanna`</li> <li>`Kendra`</li> <li>`Kimberly`</li> <li>`Salli`</li> <li>`Joey`</li> <li>`Justin`</li> <li>`Kevin`</li> <li>`Matthew`</li> <li>`Ruth`</li> <li>`Stephen`</li> </ul> <li>Finnish (fi-FI)</li> <ul> <li>`Suvi`</li> </ul> <li>French (fr-FR)</li> <ul> <li>`Léa`</li> <li>`Rémi`</li> </ul> <li>French - Canadian (fr-CA)</li> <ul> <li>`Gabrielle`</li> <li>`Liam`</li> </ul> <li>German (de-DE)</li> <ul> <li>`Vicki`</li> <li>`Daniel`</li> </ul> <li>German - Austrian (de-AT)</li> <ul> <li>`Hannah`</li> </ul> <li>Hindi (hi-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>Italian (it-IT)</li> <ul> <li>`Bianca`</li> <li>`Adriano`</li> </ul> <li>Japanese (ja-JP)</li> <ul> <li>`Takumi`</li> <li>`Kazuha`</li> <li>`Tomoko`</li> </ul> <li>Korean (ko-KR)</li> <ul> <li>`Seoyeon`</li> </ul> <li>Norwegian (nb-NO)</li> <ul> <li>`Ida`</li> </ul> <li>Polish (pl-PL)</li> <ul> <li>`Ola`</li> </ul> <li>Portuguese - Brazilian (pt-BR)</li> <ul> <li>`Camila`</li> <li>`Vitória` or `Vitoria`</li> <li>`Thiago`</li> </ul> <li>Portuguese - European (pt-PT)</li> <ul> <li>`Inês` or `Ines`</li> </ul> <li>Spanish (es-ES)</li> <ul> <li>`Lucia`</li> <li>`Sergio`</li> </ul> <li>Spanish - Mexican (es-MX)</li> <ul> <li>`Mia`</li> <li>`Andrés`</li> </ul> <li>Spanish - US (es-US)</li> <ul> <li>`Lupe`</li> <li>`Pedro`</li> </ul> <li>Swedish (sv-SE)</li> <ul> <li>`Elin`</li> </ul> </ul>
*/
function ShotstackTextToSpeechOptions(type, text, voice) {
_classCallCheck(this, ShotstackTextToSpeechOptions);
ShotstackTextToSpeechOptions.initialize(this, type, text, voice);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
return _createClass(ShotstackTextToSpeechOptions, [{
key: "getType",
value:
/**
* Returns The type of asset to generate - set to `text-to-speech` for text-to-speech.
* @return {module:model/ShotstackTextToSpeechOptions.TypeEnum}
*/
function getType() {
return this.type;
}
/**
* Sets The type of asset to generate - set to `text-to-speech` for text-to-speech.
* @param {module:model/ShotstackTextToSpeechOptions.TypeEnum} type The type of asset to generate - set to `text-to-speech` for text-to-speech.
*/
}, {
key: "setType",
value: function setType(type) {
this['type'] = type;
return this;
}
/**
* Returns The text to convert to speech.
* @return {String}
*/
}, {
key: "getText",
value: function getText() {
return this.text;
}
/**
* Sets The text to convert to speech.
* @param {String} text The text to convert to speech.
*/
}, {
key: "setText",
value: function setText(text) {
this['text'] = text;
return this;
}
/**
* Returns The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets: <ul> <li>Arabic - Gulf (ar-AE)</li> <ul> <li>`Hala`</li> </ul> <li>Dutch - Belgian (nl-BE)</li> <ul> <li>`Lisa`</li> </ul> <li>Catalan (ca-ES)</li> <ul> <li>`Arlet`</li> </ul> <li>Chinese - Cantonese (yue-CN)</li> <ul> <li>`Hiujin`</li> </ul> <li>Chinese - Mandarin (cmn-CN)</li> <ul> <li>`Zhiyu`</li> </ul> <li>Danish (da-DK)</li> <ul> <li>`Sofie`</li> </ul> <li>Dutch (nl-NL)</li> <ul> <li>`Laura`</li> </ul> <li>English - Australian (en-AU)</li> <ul> <li>`Olivia`</li> </ul> <li>English - British (en-GB)</li> <ul> <li>`Amy`</li> <li>`Emma`</li> <li>`Brian`</li> <li>`Arthur`</li> </ul> <li>English - Indian (en-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>English - Ireland (en-IE)</li> <ul> <li>`Niamh`</li> </ul> <li>English - New Zealand (en-NZ)</li> <ul> <li>`Aria`</li> </ul> <li>English - South African (en-ZA)</li> <ul> <li>`Ayanda`</li> </ul> <li>English - US (en-US)</li> <ul> <li>`Ivy`</li> <li>`Joanna`</li> <li>`Kendra`</li> <li>`Kimberly`</li> <li>`Salli`</li> <li>`Joey`</li> <li>`Justin`</li> <li>`Kevin`</li> <li>`Matthew`</li> <li>`Ruth`</li> <li>`Stephen`</li> </ul> <li>Finnish (fi-FI)</li> <ul> <li>`Suvi`</li> </ul> <li>French (fr-FR)</li> <ul> <li>`Léa`</li> <li>`Rémi`</li> </ul> <li>French - Canadian (fr-CA)</li> <ul> <li>`Gabrielle`</li> <li>`Liam`</li> </ul> <li>German (de-DE)</li> <ul> <li>`Vicki`</li> <li>`Daniel`</li> </ul> <li>German - Austrian (de-AT)</li> <ul> <li>`Hannah`</li> </ul> <li>Hindi (hi-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>Italian (it-IT)</li> <ul> <li>`Bianca`</li> <li>`Adriano`</li> </ul> <li>Japanese (ja-JP)</li> <ul> <li>`Takumi`</li> <li>`Kazuha`</li> <li>`Tomoko`</li> </ul> <li>Korean (ko-KR)</li> <ul> <li>`Seoyeon`</li> </ul> <li>Norwegian (nb-NO)</li> <ul> <li>`Ida`</li> </ul> <li>Polish (pl-PL)</li> <ul> <li>`Ola`</li> </ul> <li>Portuguese - Brazilian (pt-BR)</li> <ul> <li>`Camila`</li> <li>`Vitória` or `Vitoria`</li> <li>`Thiago`</li> </ul> <li>Portuguese - European (pt-PT)</li> <ul> <li>`Inês` or `Ines`</li> </ul> <li>Spanish (es-ES)</li> <ul> <li>`Lucia`</li> <li>`Sergio`</li> </ul> <li>Spanish - Mexican (es-MX)</li> <ul> <li>`Mia`</li> <li>`Andrés`</li> </ul> <li>Spanish - US (es-US)</li> <ul> <li>`Lupe`</li> <li>`Pedro`</li> </ul> <li>Swedish (sv-SE)</li> <ul> <li>`Elin`</li> </ul> </ul>
* @return {module:model/ShotstackTextToSpeechOptions.VoiceEnum}
*/
}, {
key: "getVoice",
value: function getVoice() {
return this.voice;
}
/**
* Sets The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets: <ul> <li>Arabic - Gulf (ar-AE)</li> <ul> <li>`Hala`</li> </ul> <li>Dutch - Belgian (nl-BE)</li> <ul> <li>`Lisa`</li> </ul> <li>Catalan (ca-ES)</li> <ul> <li>`Arlet`</li> </ul> <li>Chinese - Cantonese (yue-CN)</li> <ul> <li>`Hiujin`</li> </ul> <li>Chinese - Mandarin (cmn-CN)</li> <ul> <li>`Zhiyu`</li> </ul> <li>Danish (da-DK)</li> <ul> <li>`Sofie`</li> </ul> <li>Dutch (nl-NL)</li> <ul> <li>`Laura`</li> </ul> <li>English - Australian (en-AU)</li> <ul> <li>`Olivia`</li> </ul> <li>English - British (en-GB)</li> <ul> <li>`Amy`</li> <li>`Emma`</li> <li>`Brian`</li> <li>`Arthur`</li> </ul> <li>English - Indian (en-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>English - Ireland (en-IE)</li> <ul> <li>`Niamh`</li> </ul> <li>English - New Zealand (en-NZ)</li> <ul> <li>`Aria`</li> </ul> <li>English - South African (en-ZA)</li> <ul> <li>`Ayanda`</li> </ul> <li>English - US (en-US)</li> <ul> <li>`Ivy`</li> <li>`Joanna`</li> <li>`Kendra`</li> <li>`Kimberly`</li> <li>`Salli`</li> <li>`Joey`</li> <li>`Justin`</li> <li>`Kevin`</li> <li>`Matthew`</li> <li>`Ruth`</li> <li>`Stephen`</li> </ul> <li>Finnish (fi-FI)</li> <ul> <li>`Suvi`</li> </ul> <li>French (fr-FR)</li> <ul> <li>`Léa`</li> <li>`Rémi`</li> </ul> <li>French - Canadian (fr-CA)</li> <ul> <li>`Gabrielle`</li> <li>`Liam`</li> </ul> <li>German (de-DE)</li> <ul> <li>`Vicki`</li> <li>`Daniel`</li> </ul> <li>German - Austrian (de-AT)</li> <ul> <li>`Hannah`</li> </ul> <li>Hindi (hi-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>Italian (it-IT)</li> <ul> <li>`Bianca`</li> <li>`Adriano`</li> </ul> <li>Japanese (ja-JP)</li> <ul> <li>`Takumi`</li> <li>`Kazuha`</li> <li>`Tomoko`</li> </ul> <li>Korean (ko-KR)</li> <ul> <li>`Seoyeon`</li> </ul> <li>Norwegian (nb-NO)</li> <ul> <li>`Ida`</li> </ul> <li>Polish (pl-PL)</li> <ul> <li>`Ola`</li> </ul> <li>Portuguese - Brazilian (pt-BR)</li> <ul> <li>`Camila`</li> <li>`Vitória` or `Vitoria`</li> <li>`Thiago`</li> </ul> <li>Portuguese - European (pt-PT)</li> <ul> <li>`Inês` or `Ines`</li> </ul> <li>Spanish (es-ES)</li> <ul> <li>`Lucia`</li> <li>`Sergio`</li> </ul> <li>Spanish - Mexican (es-MX)</li> <ul> <li>`Mia`</li> <li>`Andrés`</li> </ul> <li>Spanish - US (es-US)</li> <ul> <li>`Lupe`</li> <li>`Pedro`</li> </ul> <li>Swedish (sv-SE)</li> <ul> <li>`Elin`</li> </ul> </ul>
* @param {module:model/ShotstackTextToSpeechOptions.VoiceEnum} voice The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets: <ul> <li>Arabic - Gulf (ar-AE)</li> <ul> <li>`Hala`</li> </ul> <li>Dutch - Belgian (nl-BE)</li> <ul> <li>`Lisa`</li> </ul> <li>Catalan (ca-ES)</li> <ul> <li>`Arlet`</li> </ul> <li>Chinese - Cantonese (yue-CN)</li> <ul> <li>`Hiujin`</li> </ul> <li>Chinese - Mandarin (cmn-CN)</li> <ul> <li>`Zhiyu`</li> </ul> <li>Danish (da-DK)</li> <ul> <li>`Sofie`</li> </ul> <li>Dutch (nl-NL)</li> <ul> <li>`Laura`</li> </ul> <li>English - Australian (en-AU)</li> <ul> <li>`Olivia`</li> </ul> <li>English - British (en-GB)</li> <ul> <li>`Amy`</li> <li>`Emma`</li> <li>`Brian`</li> <li>`Arthur`</li> </ul> <li>English - Indian (en-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>English - Ireland (en-IE)</li> <ul> <li>`Niamh`</li> </ul> <li>English - New Zealand (en-NZ)</li> <ul> <li>`Aria`</li> </ul> <li>English - South African (en-ZA)</li> <ul> <li>`Ayanda`</li> </ul> <li>English - US (en-US)</li> <ul> <li>`Ivy`</li> <li>`Joanna`</li> <li>`Kendra`</li> <li>`Kimberly`</li> <li>`Salli`</li> <li>`Joey`</li> <li>`Justin`</li> <li>`Kevin`</li> <li>`Matthew`</li> <li>`Ruth`</li> <li>`Stephen`</li> </ul> <li>Finnish (fi-FI)</li> <ul> <li>`Suvi`</li> </ul> <li>French (fr-FR)</li> <ul> <li>`Léa`</li> <li>`Rémi`</li> </ul> <li>French - Canadian (fr-CA)</li> <ul> <li>`Gabrielle`</li> <li>`Liam`</li> </ul> <li>German (de-DE)</li> <ul> <li>`Vicki`</li> <li>`Daniel`</li> </ul> <li>German - Austrian (de-AT)</li> <ul> <li>`Hannah`</li> </ul> <li>Hindi (hi-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>Italian (it-IT)</li> <ul> <li>`Bianca`</li> <li>`Adriano`</li> </ul> <li>Japanese (ja-JP)</li> <ul> <li>`Takumi`</li> <li>`Kazuha`</li> <li>`Tomoko`</li> </ul> <li>Korean (ko-KR)</li> <ul> <li>`Seoyeon`</li> </ul> <li>Norwegian (nb-NO)</li> <ul> <li>`Ida`</li> </ul> <li>Polish (pl-PL)</li> <ul> <li>`Ola`</li> </ul> <li>Portuguese - Brazilian (pt-BR)</li> <ul> <li>`Camila`</li> <li>`Vitória` or `Vitoria`</li> <li>`Thiago`</li> </ul> <li>Portuguese - European (pt-PT)</li> <ul> <li>`Inês` or `Ines`</li> </ul> <li>Spanish (es-ES)</li> <ul> <li>`Lucia`</li> <li>`Sergio`</li> </ul> <li>Spanish - Mexican (es-MX)</li> <ul> <li>`Mia`</li> <li>`Andrés`</li> </ul> <li>Spanish - US (es-US)</li> <ul> <li>`Lupe`</li> <li>`Pedro`</li> </ul> <li>Swedish (sv-SE)</li> <ul> <li>`Elin`</li> </ul> </ul>
*/
}, {
key: "setVoice",
value: function setVoice(voice) {
this['voice'] = voice;
return this;
}
/**
* Returns The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages: <ul> <li>`cmn-CN`</li> <li>`da-DK`</li> <li>`de-DE`</li> <li>`en-AU`</li> <li>`en-GB`</li> <li>`en-IN`</li> <li>`en-US`</li> <li>`es-ES`</li> <li>`es-MX`</li> <li>`es-US`</li> <li>`fr-CA`</li> <li>`fr-FR`</li> <li>`it-IT`</li> <li>`ja-JP`</li> <li>`hi-IN`</li> <li>`ko-KR`</li> <li>`nb-NO`</li> <li>`nl-NL`</li> <li>`pl-PL`</li> <li>`pt-BR`</li> <li>`pt-PT`</li> <li>`sv-SE`</li> <li>`en-NZ`</li> <li>`en-ZA`</li> <li>`ca-ES`</li> <li>`de-AT`</li> <li>`yue-CN`</li> <li>`ar-AE`</li> <li>`fi-FI`</li> </ul>
* @return {module:model/ShotstackTextToSpeechOptions.LanguageEnum}
*/
}, {
key: "getLanguage",
value: function getLanguage() {
return this.language;
}
/**
* Sets The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages: <ul> <li>`cmn-CN`</li> <li>`da-DK`</li> <li>`de-DE`</li> <li>`en-AU`</li> <li>`en-GB`</li> <li>`en-IN`</li> <li>`en-US`</li> <li>`es-ES`</li> <li>`es-MX`</li> <li>`es-US`</li> <li>`fr-CA`</li> <li>`fr-FR`</li> <li>`it-IT`</li> <li>`ja-JP`</li> <li>`hi-IN`</li> <li>`ko-KR`</li> <li>`nb-NO`</li> <li>`nl-NL`</li> <li>`pl-PL`</li> <li>`pt-BR`</li> <li>`pt-PT`</li> <li>`sv-SE`</li> <li>`en-NZ`</li> <li>`en-ZA`</li> <li>`ca-ES`</li> <li>`de-AT`</li> <li>`yue-CN`</li> <li>`ar-AE`</li> <li>`fi-FI`</li> </ul>
* @param {module:model/ShotstackTextToSpeechOptions.LanguageEnum} language The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages: <ul> <li>`cmn-CN`</li> <li>`da-DK`</li> <li>`de-DE`</li> <li>`en-AU`</li> <li>`en-GB`</li> <li>`en-IN`</li> <li>`en-US`</li> <li>`es-ES`</li> <li>`es-MX`</li> <li>`es-US`</li> <li>`fr-CA`</li> <li>`fr-FR`</li> <li>`it-IT`</li> <li>`ja-JP`</li> <li>`hi-IN`</li> <li>`ko-KR`</li> <li>`nb-NO`</li> <li>`nl-NL`</li> <li>`pl-PL`</li> <li>`pt-BR`</li> <li>`pt-PT`</li> <li>`sv-SE`</li> <li>`en-NZ`</li> <li>`en-ZA`</li> <li>`ca-ES`</li> <li>`de-AT`</li> <li>`yue-CN`</li> <li>`ar-AE`</li> <li>`fi-FI`</li> </ul>
*/
}, {
key: "setLanguage",
value: function setLanguage(language) {
this['language'] = language;
return this;
}
/**
* Returns Set the voice to newscaster mode.<br /><br /> *Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice.
* @return {Boolean}
*/
}, {
key: "getNewscaster",
value: function getNewscaster() {
return this.newscaster;
}
/**
* Sets Set the voice to newscaster mode.<br /><br /> *Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice.
* @param {Boolean} newscaster Set the voice to newscaster mode.<br /><br /> *Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice.
*/
}, {
key: "setNewscaster",
value: function setNewscaster(newscaster) {
this['newscaster'] = newscaster;
return this;
}
}], [{
key: "initialize",
value: function initialize(obj, type, text, voice) {
obj['type'] = type || 'text-to-speech';
obj['text'] = text;
obj['voice'] = voice;
}
/**
* Constructs a <code>ShotstackTextToSpeechOptions</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ShotstackTextToSpeechOptions} obj Optional instance to populate.
* @return {module:model/ShotstackTextToSpeechOptions} The populated <code>ShotstackTextToSpeechOptions</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new ShotstackTextToSpeechOptions();
if (data.hasOwnProperty('type')) {
obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('text')) {
obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String');
}
if (data.hasOwnProperty('voice')) {
obj['voice'] = _ApiClient["default"].convertToType(data['voice'], 'String');
}
if (data.hasOwnProperty('language')) {
obj['language'] = _ApiClient["default"].convertToType(data['language'], 'String');
}
if (data.hasOwnProperty('newscaster')) {
obj['newscaster'] = _ApiClient["default"].convertToType(data['newscaster'], 'Boolean');
}
}
return obj;
}
/**
* Validates the JSON data with respect to <code>ShotstackTextToSpeechOptions</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ShotstackTextToSpeechOptions</code>.
*/
}, {
key: "validateJSON",
value: function validateJSON(data) {
// check to make sure all required properties are present in the JSON string
var _iterator = _createForOfIteratorHelper(ShotstackTextToSpeechOptions.RequiredProperties),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var property = _step.value;
if (!data.hasOwnProperty(property)) {
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
}
}
// ensure the json data is a string
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
}
// ensure the json data is a string
if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) {
throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']);
}
// ensure the json data is a string
if (data['voice'] && !(typeof data['voice'] === 'string' || data['voice'] instanceof String)) {
throw new Error("Expected the field `voice` to be a primitive type in the JSON string but got " + data['voice']);
}
// ensure the json data is a string
if (data['language'] && !(typeof data['language'] === 'string' || data['language'] instanceof String)) {
throw new Error("Expected the field `language` to be a primitive type in the JSON string but got " + data['language']);
}
return true;
}
}]);
}();
ShotstackTextToSpeechOptions.RequiredProperties = ["type", "text", "voice"];
/**
* The type of asset to generate - set to `text-to-speech` for text-to-speech.
* @member {module:model/ShotstackTextToSpeechOptions.TypeEnum} type
* @default 'text-to-speech'
*/
ShotstackTextToSpeechOptions.prototype['type'] = 'text-to-speech';
/**
* The text to convert to speech.
* @member {String} text
*/
ShotstackTextToSpeechOptions.prototype['text'] = undefined;
/**
* The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets: <ul> <li>Arabic - Gulf (ar-AE)</li> <ul> <li>`Hala`</li> </ul> <li>Dutch - Belgian (nl-BE)</li> <ul> <li>`Lisa`</li> </ul> <li>Catalan (ca-ES)</li> <ul> <li>`Arlet`</li> </ul> <li>Chinese - Cantonese (yue-CN)</li> <ul> <li>`Hiujin`</li> </ul> <li>Chinese - Mandarin (cmn-CN)</li> <ul> <li>`Zhiyu`</li> </ul> <li>Danish (da-DK)</li> <ul> <li>`Sofie`</li> </ul> <li>Dutch (nl-NL)</li> <ul> <li>`Laura`</li> </ul> <li>English - Australian (en-AU)</li> <ul> <li>`Olivia`</li> </ul> <li>English - British (en-GB)</li> <ul> <li>`Amy`</li> <li>`Emma`</li> <li>`Brian`</li> <li>`Arthur`</li> </ul> <li>English - Indian (en-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>English - Ireland (en-IE)</li> <ul> <li>`Niamh`</li> </ul> <li>English - New Zealand (en-NZ)</li> <ul> <li>`Aria`</li> </ul> <li>English - South African (en-ZA)</li> <ul> <li>`Ayanda`</li> </ul> <li>English - US (en-US)</li> <ul> <li>`Ivy`</li> <li>`Joanna`</li> <li>`Kendra`</li> <li>`Kimberly`</li> <li>`Salli`</li> <li>`Joey`</li> <li>`Justin`</li> <li>`Kevin`</li> <li>`Matthew`</li> <li>`Ruth`</li> <li>`Stephen`</li> </ul> <li>Finnish (fi-FI)</li> <ul> <li>`Suvi`</li> </ul> <li>French (fr-FR)</li> <ul> <li>`Léa`</li> <li>`Rémi`</li> </ul> <li>French - Canadian (fr-CA)</li> <ul> <li>`Gabrielle`</li> <li>`Liam`</li> </ul> <li>German (de-DE)</li> <ul> <li>`Vicki`</li> <li>`Daniel`</li> </ul> <li>German - Austrian (de-AT)</li> <ul> <li>`Hannah`</li> </ul> <li>Hindi (hi-IN)</li> <ul> <li>`Kajal`</li> </ul> <li>Italian (it-IT)</li> <ul> <li>`Bianca`</li> <li>`Adriano`</li> </ul> <li>Japanese (ja-JP)</li> <ul> <li>`Takumi`</li> <li>`Kazuha`</li> <li>`Tomoko`</li> </ul> <li>Korean (ko-KR)</li> <ul> <li>`Seoyeon`</li> </ul> <li>Norwegian (nb-NO)</li> <ul> <li>`Ida`</li> </ul> <li>Polish (pl-PL)</li> <ul> <li>`Ola`</li> </ul> <li>Portuguese - Brazilian (pt-BR)</li> <ul> <li>`Camila`</li> <li>`Vitória` or `Vitoria`</li> <li>`Thiago`</li> </ul> <li>Portuguese - European (pt-PT)</li> <ul> <li>`Inês` or `Ines`</li> </ul> <li>Spanish (es-ES)</li> <ul> <li>`Lucia`</li> <li>`Sergio`</li> </ul> <li>Spanish - Mexican (es-MX)</li> <ul> <li>`Mia`</li> <li>`Andrés`</li> </ul> <li>Spanish - US (es-US)</li> <ul> <li>`Lupe`</li> <li>`Pedro`</li> </ul> <li>Swedish (sv-SE)</li> <ul> <li>`Elin`</li> </ul> </ul>
* @member {module:model/ShotstackTextToSpeechOptions.VoiceEnum} voice
*/
ShotstackTextToSpeechOptions.prototype['voice'] = undefined;
/**
* The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages: <ul> <li>`cmn-CN`</li> <li>`da-DK`</li> <li>`de-DE`</li> <li>`en-AU`</li> <li>`en-GB`</li> <li>`en-IN`</li> <li>`en-US`</li> <li>`es-ES`</li> <li>`es-MX`</li> <li>`es-US`</li> <li>`fr-CA`</li> <li>`fr-FR`</li> <li>`it-IT`</li> <li>`ja-JP`</li> <li>`hi-IN`</li> <li>`ko-KR`</li> <li>`nb-NO`</li> <li>`nl-NL`</li> <li>`pl-PL`</li> <li>`pt-BR`</li> <li>`pt-PT`</li> <li>`sv-SE`</li> <li>`en-NZ`</li> <li>`en-ZA`</li> <li>`ca-ES`</li> <li>`de-AT`</li> <li>`yue-CN`</li> <li>`ar-AE`</li> <li>`fi-FI`</li> </ul>
* @member {module:model/ShotstackTextToSpeechOptions.LanguageEnum} language
* @default 'en-US'
*/
ShotstackTextToSpeechOptions.prototype['language'] = 'en-US';
/**
* Set the voice to newscaster mode.<br /><br /> *Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice.
* @member {Boolean} newscaster
* @default false
*/
ShotstackTextToSpeechOptions.prototype['newscaster'] = false;
/**
* Allowed values for the <code>type</code> property.
* @enum {String}
* @readonly
*/
ShotstackTextToSpeechOptions['TypeEnum'] = {
/**
* value: "text-to-speech"
* @const
*/
"text-to-speech": "text-to-speech"
};
/**
* Allowed values for the <code>voice</code> property.
* @enum {String}
* @readonly
*/
ShotstackTextToSpeechOptions['VoiceEnum'] = {
/**
* value: "Hala"
* @const
*/
"Hala": "Hala",
/**
* value: "Lisa"
* @const
*/
"Lisa": "Lisa",
/**
* value: "Arlet"
* @const
*/
"Arlet": "Arlet",
/**
* value: "Hiujin"
* @const
*/
"Hiujin": "Hiujin",
/**
* value: "Zhiyu"
* @const
*/
"Zhiyu": "Zhiyu",
/**
* value: "Sofie"
* @const
*/
"Sofie": "Sofie",
/**
* value: "Laura"
* @const
*/
"Laura": "Laura",
/**
* value: "Olivia"
* @const
*/
"Olivia": "Olivia",
/**
* value: "Amy"
* @const
*/
"Amy": "Amy",
/**
* value: "Emma"
* @const
*/
"Emma": "Emma",
/**
* value: "Brian"
* @const
*/
"Brian": "Brian",
/**
* value: "Arthur"
* @const
*/
"Arthur": "Arthur",
/**
* value: "Kajal"
* @const
*/
"Kajal": "Kajal",
/**
* value: "Niamh"
* @const
*/
"Niamh": "Niamh",
/**
* value: "Aria"
* @const
*/
"Aria": "Aria",
/**
* value: "Ayanda"
* @const
*/
"Ayanda": "Ayanda",
/**
* value: "Ivy"
* @const
*/
"Ivy": "Ivy",
/**
* value: "Joanna"
* @const
*/
"Joanna": "Joanna",
/**
* value: "Kendra"
* @const
*/
"Kendra": "Kendra",
/**
* value: "Kimberly"
* @const
*/
"Kimberly": "Kimberly",
/**
* value: "Salli"
* @const
*/
"Salli": "Salli",
/**
* value: "Joey"
* @const
*/
"Joey": "Joey",
/**
* value: "Justin"
* @const
*/
"Justin": "Justin",
/**
* value: "Kevin"
* @const
*/
"Kevin": "Kevin",
/**
* value: "Matthew"
* @const
*/
"Matthew": "Matthew",
/**
* value: "Ruth"
* @const
*/
"Ruth": "Ruth",
/**
* value: "Stephen"
* @const
*/
"Stephen": "Stephen",
/**
* value: "Suvi"
* @const
*/
"Suvi": "Suvi",
/**
* value: "Léa"
* @const
*/
"Léa": "Léa",
/**
* value: "Rémi"
* @const
*/
"Rémi": "Rémi",
/**
* value: "Gabrielle"
* @const
*/
"Gabrielle": "Gabrielle",
/**
* value: "Liam"
* @const
*/
"Liam": "Liam",
/**
* value: "Vicki"
* @const
*/
"Vicki": "Vicki",
/**
* value: "Daniel"
* @const
*/
"Daniel": "Daniel",
/**
* value: "Hannah"
* @const
*/
"Hannah": "Hannah",
/**
* value: "Kajal"
* @const
*/
"Kajal2": "Kajal",
/**
* value: "Bianca"
* @const
*/
"Bianca": "Bianca",
/**
* value: "Adriano"
* @const
*/
"Adriano": "Adriano",
/**
* value: "Takumi"
* @const
*/
"Takumi": "Takumi",
/**
* value: "Kazuha"
* @const
*/
"Kazuha": "Kazuha",
/**
* value: "Tomoko"
* @const
*/
"Tomoko": "Tomoko",
/**
* value: "Seoyeon"
* @const
*/
"Seoyeon": "Seoyeon",
/**
* value: "Ida"
* @const
*/
"Ida": "Ida",
/**
* value: "Ola"
* @const
*/
"Ola": "Ola",
/**
* value: "Camila"
* @const
*/
"Camila": "Camila",
/**
* value: "Vitória"
* @const
*/
"Vitória": "Vitória",
/**
* value: "Vitoria"
* @const
*/
"Vitoria": "Vitoria",
/**
* value: "Thiago"
* @const
*/
"Thiago": "Thiago",
/**
* value: "Inês"
* @const
*/
"Inês": "Inês",
/**
* value: "Ines"
* @const
*/
"Ines": "Ines",
/**
* value: "Lucia"
* @const
*/
"Lucia": "Lucia",
/**
* value: "Sergio"
* @const
*/
"Sergio": "Sergio",
/**
* value: "Mia"
* @const
*/
"Mia": "Mia",
/**
* value: "Andrés"
* @const
*/
"Andrés": "Andrés",
/**
* value: "Lupe"
* @const
*/
"Lupe": "Lupe",
/**
* value: "Pedro"
* @const
*/
"Pedro": "Pedro",
/**
* value: "Elin"
* @const
*/
"Elin": "Elin"
};
/**
* Allowed values for the <code>language</code> property.
* @enum {String}
* @readonly
*/
ShotstackTextToSpeechOptions['LanguageEnum'] = {
/**
* value: "cmn-CN"
* @const
*/
"cmn-CN": "cmn-CN",
/**
* value: "da-DK"
* @const
*/
"da-DK": "da-DK",
/**
* value: "de-DE"
* @const
*/
"de-DE": "de-DE",
/**
* value: "en-AU"
* @const
*/
"en-AU": "en-AU",
/**
* value: "en-GB"
* @const
*/
"en-GB": "en-GB",
/**
* value: "en-IN"
* @const
*/
"en-IN": "en-IN",
/**
* value: "en-US"
* @const
*/
"en-US": "en-US",
/**
* value: "es-ES"
* @const
*/
"es-ES": "es-ES",
/**
* value: "es-MX"
* @const
*/
"es-MX": "es-MX",
/**
* value: "es-US"
* @const
*/
"es-US": "es-US",
/**
* value: "fr-CA"
* @const
*/
"fr-CA": "fr-CA",
/**
* value: "fr-FR"
* @const
*/
"fr-FR": "fr-FR",
/**
* value: "it-IT"
* @const
*/
"it-IT": "it-IT",
/**
* value: "ja-JP"
* @const
*/
"ja-JP": "ja-JP",
/**
* value: "hi-IN"
* @const
*/
"hi-IN": "hi-IN",
/**
* value: "ko-KR"
* @const
*/
"ko-KR": "ko-KR",
/**
* value: "nb-NO"
* @const
*/
"nb-NO": "nb-NO",
/**
* value: "nl-NL"
* @const
*/
"nl-NL": "nl-NL",
/**
* value: "pl-PL"
* @const
*/
"pl-PL": "pl-PL",
/**
* value: "pt-BR"
* @const
*/
"pt-BR": "pt-BR",
/**
* value: "pt-PT"
* @const
*/
"pt-PT": "pt-PT",
/**
* value: "sv-SE"
* @const
*/
"sv-SE": "sv-SE",
/**
* value: "en-NZ"
* @const
*/
"en-NZ": "en-NZ",
/**
* value: "en-ZA"
* @const
*/
"en-ZA": "en-ZA",
/**
* value: "ca-ES"
* @const
*/
"ca-ES": "ca-ES",
/**
* value: "de-AT"
* @const
*/
"de-AT": "de-AT",
/**
* value: "yue-CN"
* @const
*/
"yue-CN": "yue-CN",
/**
* value: "ar-AE"
* @const
*/
"ar-AE": "ar-AE",
/**
* value: "fi-FI"
* @const
*/
"fi-FI": "fi-FI"
};
var _default = exports["default"] = ShotstackTextToSpeechOptions;