Built motion from commit f25620e4.|2.6.30
[motion2.git] / server / services / agi / scripts / aws / polly / lib / api.js
index a96d7e6..9e5bed5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7832=['synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text','mp3','path','bluebird'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0x7832,0x6c));var _0x2783=function(_0x2eb4a4,_0x4b70cb){_0x2eb4a4=_0x2eb4a4-0x0;var _0x94cbe6=_0x7832[_0x2eb4a4];return _0x94cbe6;};'use strict';var fs=require('fs');var path=require(_0x2783('0x0'));var BPromise=require(_0x2783('0x1'));var rs=require('randomstring');var AWS=require('aws-sdk');function pollyResult(_0x1fe242,_0x33ac68,_0x16c169){return new BPromise(function(_0x10f54f,_0x17e15a){_0x1fe242[_0x2783('0x2')](_0x33ac68,function(_0x4d26cc,_0xdd70f6){if(_0x4d26cc){_0x17e15a(_0x4d26cc);}else if(_0xdd70f6){if(_0xdd70f6[_0x2783('0x3')]instanceof Buffer){fs[_0x2783('0x4')](_0x16c169,_0xdd70f6[_0x2783('0x3')],function(_0x256eb8){if(_0x256eb8){_0x17e15a(_0x256eb8);}else{_0x10f54f();}});}else{_0x17e15a(new Error(_0x2783('0x5')));}}else{_0x17e15a(new Error(_0x2783('0x6')));}});});}module[_0x2783('0x7')]=function(_0x356a85,_0x5adda0,_0x2a7c62,_0x4eb823,_0x5ed957,_0x246759,_0x597c28){var _0x48a4d9=new AWS[(_0x2783('0x8'))]({'accessKeyId':_0x356a85,'secretAccessKey':_0x5adda0,'region':_0x2a7c62});var _0x28a038={'Text':_0x5ed957,'TextType':_0x246759||_0x2783('0x9'),'OutputFormat':_0x2783('0xa'),'VoiceId':_0x4eb823};return pollyResult(_0x48a4d9,_0x28a038,_0x597c28);};
\ No newline at end of file
+var _0x3027=['No\x20data\x20response\x20from\x20aws\x20Polly!','Polly','text','mp3','path','bluebird','randomstring','aws-sdk','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x3027,0x101));var _0x7302=function(_0x1effd3,_0x52c997){_0x1effd3=_0x1effd3-0x0;var _0x47efad=_0x3027[_0x1effd3];return _0x47efad;};'use strict';var fs=require('fs');var path=require(_0x7302('0x0'));var BPromise=require(_0x7302('0x1'));var rs=require(_0x7302('0x2'));var AWS=require(_0x7302('0x3'));function pollyResult(_0x51e7e2,_0x11f097,_0x3d2c55){return new BPromise(function(_0x41178f,_0x481de9){_0x51e7e2['synthesizeSpeech'](_0x11f097,function(_0x18ec74,_0x402ec1){if(_0x18ec74){_0x481de9(_0x18ec74);}else if(_0x402ec1){if(_0x402ec1[_0x7302('0x4')]instanceof Buffer){fs[_0x7302('0x5')](_0x3d2c55,_0x402ec1[_0x7302('0x4')],function(_0x7e3dce){if(_0x7e3dce){_0x481de9(_0x7e3dce);}else{_0x41178f();}});}else{_0x481de9(new Error(_0x7302('0x6')));}}else{_0x481de9(new Error(_0x7302('0x7')));}});});}module['exports']=function(_0x161e9d,_0x3257c4,_0x44e0a0,_0x528170,_0x77d33c,_0x4c2cd9,_0x1d4afa){var _0x282bf6=new AWS[(_0x7302('0x8'))]({'accessKeyId':_0x161e9d,'secretAccessKey':_0x3257c4,'region':_0x44e0a0});var _0x117955={'Text':_0x77d33c,'TextType':_0x4c2cd9||_0x7302('0x9'),'OutputFormat':_0x7302('0xa'),'VoiceId':_0x528170};return pollyResult(_0x282bf6,_0x117955,_0x1d4afa);};
\ No newline at end of file