Built motion from commit ddca4d0d.|2.5.47
[motion2.git] / server / services / agi / scripts / aws / polly / lib / api.js
index ea7c8f6..91389fe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc447=['mp3','path','bluebird','randomstring','aws-sdk','AudioStream','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text'];(function(_0x1fd59f,_0x3bb440){var _0x55c36d=function(_0x23cc4f){while(--_0x23cc4f){_0x1fd59f['push'](_0x1fd59f['shift']());}};_0x55c36d(++_0x3bb440);}(_0xc447,0x135));var _0x7c44=function(_0x2726cc,_0x330659){_0x2726cc=_0x2726cc-0x0;var _0x17bcea=_0xc447[_0x2726cc];return _0x17bcea;};'use strict';var fs=require('fs');var path=require(_0x7c44('0x0'));var BPromise=require(_0x7c44('0x1'));var rs=require(_0x7c44('0x2'));var AWS=require(_0x7c44('0x3'));function pollyResult(_0x395ecc,_0x1821f6,_0x1da658){return new BPromise(function(_0x4299f6,_0x17df38){_0x395ecc['synthesizeSpeech'](_0x1821f6,function(_0x28e940,_0x3463f2){if(_0x28e940){_0x17df38(_0x28e940);}else if(_0x3463f2){if(_0x3463f2[_0x7c44('0x4')]instanceof Buffer){fs['writeFile'](_0x1da658,_0x3463f2[_0x7c44('0x4')],function(_0x2bd55d){if(_0x2bd55d){_0x17df38(_0x2bd55d);}else{_0x4299f6();}});}else{_0x17df38(new Error(_0x7c44('0x5')));}}else{_0x17df38(new Error(_0x7c44('0x6')));}});});}module[_0x7c44('0x7')]=function(_0x5bbd0e,_0x56d4f2,_0x3be8bc,_0xf1541d,_0x1603eb,_0x1fe08b,_0x3f3804){var _0x363eb0=new AWS[(_0x7c44('0x8'))]({'accessKeyId':_0x5bbd0e,'secretAccessKey':_0x56d4f2,'region':_0x3be8bc});var _0x52f04c={'Text':_0x1603eb,'TextType':_0x1fe08b||_0x7c44('0x9'),'OutputFormat':_0x7c44('0xa'),'VoiceId':_0xf1541d};return pollyResult(_0x363eb0,_0x52f04c,_0x3f3804);};
\ No newline at end of file
+var _0x58b4=['exports','text','mp3','path','bluebird','randomstring','aws-sdk','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!'];(function(_0x421d83,_0x12285){var _0x418237=function(_0x1c579b){while(--_0x1c579b){_0x421d83['push'](_0x421d83['shift']());}};_0x418237(++_0x12285);}(_0x58b4,0x184));var _0x458b=function(_0x3c41c8,_0x4a9475){_0x3c41c8=_0x3c41c8-0x0;var _0x5baf79=_0x58b4[_0x3c41c8];return _0x5baf79;};'use strict';var fs=require('fs');var path=require(_0x458b('0x0'));var BPromise=require(_0x458b('0x1'));var rs=require(_0x458b('0x2'));var AWS=require(_0x458b('0x3'));function pollyResult(_0x205e39,_0x12d109,_0x5d4400){return new BPromise(function(_0x3c0896,_0x5f375b){_0x205e39[_0x458b('0x4')](_0x12d109,function(_0x71c85a,_0x180bb7){if(_0x71c85a){_0x5f375b(_0x71c85a);}else if(_0x180bb7){if(_0x180bb7[_0x458b('0x5')]instanceof Buffer){fs[_0x458b('0x6')](_0x5d4400,_0x180bb7[_0x458b('0x5')],function(_0x310b27){if(_0x310b27){_0x5f375b(_0x310b27);}else{_0x3c0896();}});}else{_0x5f375b(new Error(_0x458b('0x7')));}}else{_0x5f375b(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module[_0x458b('0x8')]=function(_0x3d6524,_0x51f557,_0x3ec119,_0x511f1a,_0x1664e0,_0x15bff6,_0x321a27){var _0x3c01d6=new AWS['Polly']({'accessKeyId':_0x3d6524,'secretAccessKey':_0x51f557,'region':_0x3ec119});var _0x3bba4c={'Text':_0x1664e0,'TextType':_0x15bff6||_0x458b('0x9'),'OutputFormat':_0x458b('0xa'),'VoiceId':_0x511f1a};return pollyResult(_0x3c01d6,_0x3bba4c,_0x321a27);};
\ No newline at end of file