Built motion from commit da617fac.|2.6.6
[motion2.git] / server / services / agi / scripts / aws / polly / lib / api.js
index 580d2e4..92a1f4d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9847=['AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text','randomstring','aws-sdk','synthesizeSpeech'];(function(_0x516f52,_0x210b10){var _0x5d06db=function(_0x26ceab){while(--_0x26ceab){_0x516f52['push'](_0x516f52['shift']());}};_0x5d06db(++_0x210b10);}(_0x9847,0xb1));var _0x7984=function(_0x41f252,_0x36bc6e){_0x41f252=_0x41f252-0x0;var _0x2c08e4=_0x9847[_0x41f252];return _0x2c08e4;};'use strict';var fs=require('fs');var path=require('path');var BPromise=require('bluebird');var rs=require(_0x7984('0x0'));var AWS=require(_0x7984('0x1'));function pollyResult(_0x1e8761,_0x83ae23,_0xe6078f){return new BPromise(function(_0x4155e4,_0x3f17c5){_0x1e8761[_0x7984('0x2')](_0x83ae23,function(_0x5e24c9,_0x2184ea){if(_0x5e24c9){_0x3f17c5(_0x5e24c9);}else if(_0x2184ea){if(_0x2184ea[_0x7984('0x3')]instanceof Buffer){fs[_0x7984('0x4')](_0xe6078f,_0x2184ea['AudioStream'],function(_0xed02f3){if(_0xed02f3){_0x3f17c5(_0xed02f3);}else{_0x4155e4();}});}else{_0x3f17c5(new Error(_0x7984('0x5')));}}else{_0x3f17c5(new Error(_0x7984('0x6')));}});});}module[_0x7984('0x7')]=function(_0x4a3c9c,_0x568cb1,_0x458bc6,_0x545394,_0x6b18bc,_0x2da30c,_0x521e84){var _0x1bfc46=new AWS[(_0x7984('0x8'))]({'accessKeyId':_0x4a3c9c,'secretAccessKey':_0x568cb1,'region':_0x458bc6});var _0xea011={'Text':_0x6b18bc,'TextType':_0x2da30c||_0x7984('0x9'),'OutputFormat':'mp3','VoiceId':_0x545394};return pollyResult(_0x1bfc46,_0xea011,_0x521e84);};
\ No newline at end of file
+var _0xf2f7=['mp3','randomstring','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','Polly','text'];(function(_0x1115f5,_0x137af2){var _0x20029b=function(_0x45698f){while(--_0x45698f){_0x1115f5['push'](_0x1115f5['shift']());}};_0x20029b(++_0x137af2);}(_0xf2f7,0x13c));var _0x7f2f=function(_0x27a5dd,_0x35cde6){_0x27a5dd=_0x27a5dd-0x0;var _0x523a2d=_0xf2f7[_0x27a5dd];return _0x523a2d;};'use strict';var fs=require('fs');var path=require('path');var BPromise=require('bluebird');var rs=require(_0x7f2f('0x0'));var AWS=require('aws-sdk');function pollyResult(_0x266b55,_0x45cb0b,_0x8dd364){return new BPromise(function(_0x1d62db,_0x4bb232){_0x266b55[_0x7f2f('0x1')](_0x45cb0b,function(_0x140c29,_0x12469b){if(_0x140c29){_0x4bb232(_0x140c29);}else if(_0x12469b){if(_0x12469b[_0x7f2f('0x2')]instanceof Buffer){fs[_0x7f2f('0x3')](_0x8dd364,_0x12469b['AudioStream'],function(_0x52b580){if(_0x52b580){_0x4bb232(_0x52b580);}else{_0x1d62db();}});}else{_0x4bb232(new Error(_0x7f2f('0x4')));}}else{_0x4bb232(new Error(_0x7f2f('0x5')));}});});}module['exports']=function(_0x209441,_0x2926e7,_0x11d63f,_0x169cc9,_0x31a34f,_0x1c1ae2,_0x411efb){var _0x294fab=new AWS[(_0x7f2f('0x6'))]({'accessKeyId':_0x209441,'secretAccessKey':_0x2926e7,'region':_0x11d63f});var _0x18cdd2={'Text':_0x31a34f,'TextType':_0x1c1ae2||_0x7f2f('0x7'),'OutputFormat':_0x7f2f('0x8'),'VoiceId':_0x169cc9};return pollyResult(_0x294fab,_0x18cdd2,_0x411efb);};
\ No newline at end of file