Built motion from commit 06eb8eb0.|2.6.31
[motion2.git] / server / services / agi / scripts / aws / polly / lib / api.js
index fe10194..93427c0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb1a1=['No\x20data\x20response\x20from\x20aws\x20Polly!','Polly','mp3','path','bluebird','randomstring','synthesizeSpeech','AudioStream','writeFile'];(function(_0x35e24b,_0x6eb583){var _0x193ca0=function(_0x32cb90){while(--_0x32cb90){_0x35e24b['push'](_0x35e24b['shift']());}};_0x193ca0(++_0x6eb583);}(_0xb1a1,0x1b3));var _0x1b1a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb1a1[_0x3dd15e];return _0x231fd0;};'use strict';var fs=require('fs');var path=require(_0x1b1a('0x0'));var BPromise=require(_0x1b1a('0x1'));var rs=require(_0x1b1a('0x2'));var AWS=require('aws-sdk');function pollyResult(_0x518bea,_0x11b6cb,_0x5af895){return new BPromise(function(_0x4d8a6c,_0x335181){_0x518bea[_0x1b1a('0x3')](_0x11b6cb,function(_0xf7d030,_0x4a39f6){if(_0xf7d030){_0x335181(_0xf7d030);}else if(_0x4a39f6){if(_0x4a39f6[_0x1b1a('0x4')]instanceof Buffer){fs[_0x1b1a('0x5')](_0x5af895,_0x4a39f6[_0x1b1a('0x4')],function(_0x5e16b9){if(_0x5e16b9){_0x335181(_0x5e16b9);}else{_0x4d8a6c();}});}else{_0x335181(new Error('Invalid\x20data\x20response\x20from\x20aws\x20Polly!'));}}else{_0x335181(new Error(_0x1b1a('0x6')));}});});}module['exports']=function(_0x5678ea,_0x4da0fa,_0x1d40c7,_0xe0c26,_0x2933f8,_0x37481b,_0x1ccc9c){var _0x3cc424=new AWS[(_0x1b1a('0x7'))]({'accessKeyId':_0x5678ea,'secretAccessKey':_0x4da0fa,'region':_0x1d40c7});var _0xb0dd24={'Text':_0x2933f8,'TextType':_0x37481b||'text','OutputFormat':_0x1b1a('0x8'),'VoiceId':_0xe0c26};return pollyResult(_0x3cc424,_0xb0dd24,_0x1ccc9c);};
\ No newline at end of file
+var _0x82fb=['AudioStream','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','Polly','text','mp3','bluebird','randomstring','aws-sdk','synthesizeSpeech','writeFile'];(function(_0x130c64,_0x24ce68){var _0x59d57e=function(_0x2af67f){while(--_0x2af67f){_0x130c64['push'](_0x130c64['shift']());}};_0x59d57e(++_0x24ce68);}(_0x82fb,0xab));var _0xb82f=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0x82fb[_0x413feb];return _0x40ee88;};'use strict';var fs=require('fs');var path=require('path');var BPromise=require(_0xb82f('0x0'));var rs=require(_0xb82f('0x1'));var AWS=require(_0xb82f('0x2'));function pollyResult(_0x190284,_0x137097,_0x883930){return new BPromise(function(_0x404afc,_0x18e637){_0x190284[_0xb82f('0x3')](_0x137097,function(_0x4a50a3,_0x3944de){if(_0x4a50a3){_0x18e637(_0x4a50a3);}else if(_0x3944de){if(_0x3944de['AudioStream']instanceof Buffer){fs[_0xb82f('0x4')](_0x883930,_0x3944de[_0xb82f('0x5')],function(_0x35828a){if(_0x35828a){_0x18e637(_0x35828a);}else{_0x404afc();}});}else{_0x18e637(new Error(_0xb82f('0x6')));}}else{_0x18e637(new Error(_0xb82f('0x7')));}});});}module['exports']=function(_0x1144b7,_0x33ea9d,_0x499618,_0x49c4ac,_0x469dea,_0x1e8d16,_0x11b384){var _0x1d66c6=new AWS[(_0xb82f('0x8'))]({'accessKeyId':_0x1144b7,'secretAccessKey':_0x33ea9d,'region':_0x499618});var _0x1c6fb9={'Text':_0x469dea,'TextType':_0x1e8d16||_0xb82f('0x9'),'OutputFormat':_0xb82f('0xa'),'VoiceId':_0x49c4ac};return pollyResult(_0x1d66c6,_0x1c6fb9,_0x11b384);};
\ No newline at end of file