Built motion from commit ecdc8e66766c75b1b08288b0ea13eb12d42606b4. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / aws / polly / lib / api.js
index d3d67f4..5463c83 100644 (file)
@@ -1 +1 @@
-const a1036_0x10cc=['No\x20data\x20response\x20from\x20aws\x20Polly!','AudioStream','exports','Polly','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','mp3'];(function(_0x595670,_0x10ccd6){const _0x206c89=function(_0x5be6d7){while(--_0x5be6d7){_0x595670['push'](_0x595670['shift']());}};_0x206c89(++_0x10ccd6);}(a1036_0x10cc,0xe9));const a1036_0x206c=function(_0x595670,_0x10ccd6){_0x595670=_0x595670-0x0;let _0x206c89=a1036_0x10cc[_0x595670];return _0x206c89;};const _0x3f2ee7=a1036_0x206c;'use strict';const fs=require('fs'),AWS=require('aws-sdk');function pollyResult(_0x5be6d7,_0x3b03a5,_0x1d7120){return new Promise(function(_0x2955a7,_0x1b583c){_0x5be6d7['synthesizeSpeech'](_0x3b03a5,function(_0x50981c,_0x2c6f95){const _0x71e72f=a1036_0x206c;if(_0x50981c)_0x1b583c(_0x50981c);else _0x2c6f95?_0x2c6f95[_0x71e72f('0x2')]instanceof Buffer?fs['writeFile'](_0x1d7120,_0x2c6f95[_0x71e72f('0x2')],function(_0x2963b4){_0x2963b4?_0x1b583c(_0x2963b4):_0x2955a7();}):_0x1b583c(new Error(_0x71e72f('0x5'))):_0x1b583c(new Error(_0x71e72f('0x1')));});});}module[_0x3f2ee7('0x3')]=function(_0x357acb,_0x1e5715,_0x12a8cc,_0x2bea32,_0x58f189,_0x2a8266,_0x5bb4ba){const _0x4dc21c=_0x3f2ee7,_0x53f5f4=new AWS[(_0x4dc21c('0x4'))]({'accessKeyId':_0x357acb,'secretAccessKey':_0x1e5715,'region':_0x12a8cc}),_0x16bedf={'Text':_0x58f189,'TextType':_0x2a8266||'text','OutputFormat':_0x4dc21c('0x0'),'VoiceId':_0x2bea32};return pollyResult(_0x53f5f4,_0x16bedf,_0x5bb4ba);};
\ No newline at end of file
+const a1036_0x53bf=['No\x20data\x20response\x20from\x20aws\x20Polly!','writeFile','mp3','Polly','AudioStream','exports'];(function(_0x33f4af,_0x53bf93){const _0x10d5c6=function(_0x22a874){while(--_0x22a874){_0x33f4af['push'](_0x33f4af['shift']());}};_0x10d5c6(++_0x53bf93);}(a1036_0x53bf,0x8a));const a1036_0x10d5=function(_0x33f4af,_0x53bf93){_0x33f4af=_0x33f4af-0x0;let _0x10d5c6=a1036_0x53bf[_0x33f4af];return _0x10d5c6;};const _0x400552=a1036_0x10d5;'use strict';const fs=require('fs'),AWS=require('aws-sdk');function pollyResult(_0x22a874,_0x57f629,_0x36a97f){return new Promise(function(_0x243d38,_0x27b253){_0x22a874['synthesizeSpeech'](_0x57f629,function(_0x5c3511,_0x28f2cf){const _0x31bc72=a1036_0x10d5;if(_0x5c3511)_0x27b253(_0x5c3511);else _0x28f2cf?_0x28f2cf['AudioStream']instanceof Buffer?fs[_0x31bc72('0x1')](_0x36a97f,_0x28f2cf[_0x31bc72('0x4')],function(_0x6292e0){_0x6292e0?_0x27b253(_0x6292e0):_0x243d38();}):_0x27b253(new Error('Invalid\x20data\x20response\x20from\x20aws\x20Polly!')):_0x27b253(new Error(_0x31bc72('0x0')));});});}module[_0x400552('0x5')]=function(_0x1abab5,_0x4da975,_0x1d5b59,_0x323b54,_0x1e3a22,_0x10f86f,_0x2c1bb5){const _0x3cada0=_0x400552,_0x36d10e=new AWS[(_0x3cada0('0x3'))]({'accessKeyId':_0x1abab5,'secretAccessKey':_0x4da975,'region':_0x1d5b59}),_0xc6ea32={'Text':_0x1e3a22,'TextType':_0x10f86f||'text','OutputFormat':_0x3cada0('0x2'),'VoiceId':_0x323b54};return pollyResult(_0x36d10e,_0xc6ea32,_0x2c1bb5);};
\ No newline at end of file