Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / services / agi / scripts / aws / polly / lib / api.js
index 1fe1837..20c45c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa6a=['writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text','path','randomstring','aws-sdk','synthesizeSpeech'];(function(_0x44e2ec,_0x328d2c){var _0x2e6384=function(_0x1d02ce){while(--_0x1d02ce){_0x44e2ec['push'](_0x44e2ec['shift']());}};_0x2e6384(++_0x328d2c);}(_0xaa6a,0x1dc));var _0xaaa6=function(_0x1a25d6,_0x8bae1c){_0x1a25d6=_0x1a25d6-0x0;var _0x4528b2=_0xaa6a[_0x1a25d6];return _0x4528b2;};'use strict';var fs=require('fs');var path=require(_0xaaa6('0x0'));var BPromise=require('bluebird');var rs=require(_0xaaa6('0x1'));var AWS=require(_0xaaa6('0x2'));function pollyResult(_0x244675,_0x814881,_0x566fc6){return new BPromise(function(_0x2ff8b9,_0x30a857){_0x244675[_0xaaa6('0x3')](_0x814881,function(_0x451ebd,_0x3dbdac){if(_0x451ebd){_0x30a857(_0x451ebd);}else if(_0x3dbdac){if(_0x3dbdac['AudioStream']instanceof Buffer){fs[_0xaaa6('0x4')](_0x566fc6,_0x3dbdac['AudioStream'],function(_0x1a686c){if(_0x1a686c){_0x30a857(_0x1a686c);}else{_0x2ff8b9();}});}else{_0x30a857(new Error(_0xaaa6('0x5')));}}else{_0x30a857(new Error(_0xaaa6('0x6')));}});});}module[_0xaaa6('0x7')]=function(_0x19f1ce,_0x281773,_0x21799f,_0x23fe3a,_0x16a132,_0x2a4089,_0x493f66){var _0x21215b=new AWS[(_0xaaa6('0x8'))]({'accessKeyId':_0x19f1ce,'secretAccessKey':_0x281773,'region':_0x21799f});var _0x59e935={'Text':_0x16a132,'TextType':_0x2a4089||_0xaaa6('0x9'),'OutputFormat':'mp3','VoiceId':_0x23fe3a};return pollyResult(_0x21215b,_0x59e935,_0x493f66);};
\ No newline at end of file
+var _0x655b=['writeFile','exports','text','path','bluebird','randomstring','aws-sdk','AudioStream'];(function(_0x1a1128,_0x1784d8){var _0x1f5bd2=function(_0x8e0c15){while(--_0x8e0c15){_0x1a1128['push'](_0x1a1128['shift']());}};_0x1f5bd2(++_0x1784d8);}(_0x655b,0x1cb));var _0xb655=function(_0x334841,_0x2bbc4c){_0x334841=_0x334841-0x0;var _0x5beb4b=_0x655b[_0x334841];return _0x5beb4b;};'use strict';var fs=require('fs');var path=require(_0xb655('0x0'));var BPromise=require(_0xb655('0x1'));var rs=require(_0xb655('0x2'));var AWS=require(_0xb655('0x3'));function pollyResult(_0x212caa,_0x4b6631,_0x5e5e39){return new BPromise(function(_0x2ca2da,_0x237a89){_0x212caa['synthesizeSpeech'](_0x4b6631,function(_0x427638,_0xf6e0ff){if(_0x427638){_0x237a89(_0x427638);}else if(_0xf6e0ff){if(_0xf6e0ff[_0xb655('0x4')]instanceof Buffer){fs[_0xb655('0x5')](_0x5e5e39,_0xf6e0ff[_0xb655('0x4')],function(_0x10fce8){if(_0x10fce8){_0x237a89(_0x10fce8);}else{_0x2ca2da();}});}else{_0x237a89(new Error('Invalid\x20data\x20response\x20from\x20aws\x20Polly!'));}}else{_0x237a89(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module[_0xb655('0x6')]=function(_0x52a105,_0x8d9cc4,_0x22c16f,_0x5752f0,_0x18fd45,_0x5c848e,_0xaf5079){var _0x28e38c=new AWS['Polly']({'accessKeyId':_0x52a105,'secretAccessKey':_0x8d9cc4,'region':_0x22c16f});var _0x27ff2b={'Text':_0x18fd45,'TextType':_0x5c848e||_0xb655('0x7'),'OutputFormat':'mp3','VoiceId':_0x5752f0};return pollyResult(_0x28e38c,_0x27ff2b,_0xaf5079);};
\ No newline at end of file