Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / services / agi / scripts / aws / polly / lib / api.js
index d152559..63bbf32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1432=['AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','mp3','path','bluebird','randomstring','aws-sdk','synthesizeSpeech'];(function(_0x5b19b9,_0x4957d9){var _0x1d3ad9=function(_0x533415){while(--_0x533415){_0x5b19b9['push'](_0x5b19b9['shift']());}};_0x1d3ad9(++_0x4957d9);}(_0x1432,0x91));var _0x2143=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0x1432[_0x44946b];return _0x249bc4;};'use strict';var fs=require('fs');var path=require(_0x2143('0x0'));var BPromise=require(_0x2143('0x1'));var rs=require(_0x2143('0x2'));var AWS=require(_0x2143('0x3'));function pollyResult(_0xbcc56,_0x246149,_0x139828){return new BPromise(function(_0x713999,_0x7bd089){_0xbcc56[_0x2143('0x4')](_0x246149,function(_0x2ce511,_0x551ccd){if(_0x2ce511){_0x7bd089(_0x2ce511);}else if(_0x551ccd){if(_0x551ccd[_0x2143('0x5')]instanceof Buffer){fs[_0x2143('0x6')](_0x139828,_0x551ccd[_0x2143('0x5')],function(_0x398810){if(_0x398810){_0x7bd089(_0x398810);}else{_0x713999();}});}else{_0x7bd089(new Error(_0x2143('0x7')));}}else{_0x7bd089(new Error(_0x2143('0x8')));}});});}module['exports']=function(_0x776cb,_0x4cacff,_0x3a238e,_0x13485a,_0x118daa,_0x4a5b01,_0x3fdf07){var _0x33b1bf=new AWS['Polly']({'accessKeyId':_0x776cb,'secretAccessKey':_0x4cacff,'region':_0x3a238e});var _0x252e78={'Text':_0x118daa,'TextType':_0x4a5b01||'text','OutputFormat':_0x2143('0x9'),'VoiceId':_0x13485a};return pollyResult(_0x33b1bf,_0x252e78,_0x3fdf07);};
\ No newline at end of file
+var _0x6ca8=['bluebird','aws-sdk','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','Polly','text','mp3','path'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x6ca8,0x6d));var _0x86ca=function(_0x4068af,_0x3b5404){_0x4068af=_0x4068af-0x0;var _0x8bccb1=_0x6ca8[_0x4068af];return _0x8bccb1;};'use strict';var fs=require('fs');var path=require(_0x86ca('0x0'));var BPromise=require(_0x86ca('0x1'));var rs=require('randomstring');var AWS=require(_0x86ca('0x2'));function pollyResult(_0x315354,_0x376524,_0x5235f9){return new BPromise(function(_0x5524e3,_0x3d94e5){_0x315354[_0x86ca('0x3')](_0x376524,function(_0x21eee1,_0x3ecc3c){if(_0x21eee1){_0x3d94e5(_0x21eee1);}else if(_0x3ecc3c){if(_0x3ecc3c[_0x86ca('0x4')]instanceof Buffer){fs[_0x86ca('0x5')](_0x5235f9,_0x3ecc3c[_0x86ca('0x4')],function(_0x3246ff){if(_0x3246ff){_0x3d94e5(_0x3246ff);}else{_0x5524e3();}});}else{_0x3d94e5(new Error(_0x86ca('0x6')));}}else{_0x3d94e5(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module['exports']=function(_0x3579a4,_0x416f85,_0x256614,_0x551c3c,_0x4a1b95,_0x2e655e,_0x31fe14){var _0x4ce452=new AWS[(_0x86ca('0x7'))]({'accessKeyId':_0x3579a4,'secretAccessKey':_0x416f85,'region':_0x256614});var _0x46f7ed={'Text':_0x4a1b95,'TextType':_0x2e655e||_0x86ca('0x8'),'OutputFormat':_0x86ca('0x9'),'VoiceId':_0x551c3c};return pollyResult(_0x4ce452,_0x46f7ed,_0x31fe14);};
\ No newline at end of file