Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / aws / polly / lib / api.js
index 64e1fe8..f2303d0 100644 (file)
@@ -1 +1 @@
-const a1037_0xfe86=['text','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','writeFile','Polly','AudioStream','mp3','exports','synthesizeSpeech','aws-sdk','No\x20data\x20response\x20from\x20aws\x20Polly!'];(function(_0x5b9983,_0xfe86){const _0x1db0c3=function(_0x55cb75){while(--_0x55cb75){_0x5b9983['push'](_0x5b9983['shift']());}};_0x1db0c3(++_0xfe86);}(a1037_0xfe86,0x8e));const a1037_0x1db0=function(_0x5b9983,_0xfe86){_0x5b9983=_0x5b9983-0x0;let _0x1db0c3=a1037_0xfe86[_0x5b9983];return _0x1db0c3;};const _0x1afc3b=a1037_0x1db0;'use strict';const fs=require('fs'),AWS=require(_0x1afc3b('0x6'));function pollyResult(_0x55cb75,_0x49d3c4,_0x3c1cf8){return new Promise(function(_0x7924ae,_0x247451){const _0x29638e=a1037_0x1db0;_0x55cb75[_0x29638e('0x5')](_0x49d3c4,function(_0x81849a,_0x12b348){const _0x6872bf=_0x29638e;if(_0x81849a)_0x247451(_0x81849a);else _0x12b348?_0x12b348['AudioStream']instanceof Buffer?fs[_0x6872bf('0x0')](_0x3c1cf8,_0x12b348[_0x6872bf('0x2')],function(_0x392a72){_0x392a72?_0x247451(_0x392a72):_0x7924ae();}):_0x247451(new Error(_0x6872bf('0x9'))):_0x247451(new Error(_0x6872bf('0x7')));});});}module[_0x1afc3b('0x4')]=function(_0x60a7a,_0x5b305b,_0x5e6175,_0x1d4533,_0x1efafc,_0x1bf372,_0x2f062e){const _0x381109=_0x1afc3b,_0x33256d=new AWS[(_0x381109('0x1'))]({'accessKeyId':_0x60a7a,'secretAccessKey':_0x5b305b,'region':_0x5e6175}),_0x4266d6={'Text':_0x1efafc,'TextType':_0x1bf372||_0x381109('0x8'),'OutputFormat':_0x381109('0x3'),'VoiceId':_0x1d4533};return pollyResult(_0x33256d,_0x4266d6,_0x2f062e);};
\ No newline at end of file
+const a1037_0x119c=['aws-sdk','No\x20data\x20response\x20from\x20aws\x20Polly!','AudioStream','text','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','mp3','exports'];(function(_0x4b8b8a,_0x119c60){const _0x28a05f=function(_0xb570b9){while(--_0xb570b9){_0x4b8b8a['push'](_0x4b8b8a['shift']());}};_0x28a05f(++_0x119c60);}(a1037_0x119c,0x18f));const a1037_0x28a0=function(_0x4b8b8a,_0x119c60){_0x4b8b8a=_0x4b8b8a-0x0;let _0x28a05f=a1037_0x119c[_0x4b8b8a];return _0x28a05f;};const _0x3847ff=a1037_0x28a0;'use strict';const fs=require('fs'),AWS=require(_0x3847ff('0x0'));function pollyResult(_0xb570b9,_0x4b5a9f,_0x1bab19){return new Promise(function(_0x24408b,_0x237522){_0xb570b9['synthesizeSpeech'](_0x4b5a9f,function(_0x1b2d6f,_0xe0363b){const _0x5d1fe2=a1037_0x28a0;if(_0x1b2d6f)_0x237522(_0x1b2d6f);else _0xe0363b?_0xe0363b[_0x5d1fe2('0x2')]instanceof Buffer?fs['writeFile'](_0x1bab19,_0xe0363b[_0x5d1fe2('0x2')],function(_0x3806a7){_0x3806a7?_0x237522(_0x3806a7):_0x24408b();}):_0x237522(new Error(_0x5d1fe2('0x4'))):_0x237522(new Error(_0x5d1fe2('0x1')));});});}module[_0x3847ff('0x6')]=function(_0x1b93ca,_0x4ed383,_0x332cce,_0x2e717d,_0x27e815,_0x5f1c81,_0x25e4d8){const _0x1d289a=_0x3847ff,_0x56160e=new AWS['Polly']({'accessKeyId':_0x1b93ca,'secretAccessKey':_0x4ed383,'region':_0x332cce}),_0x5e711a={'Text':_0x27e815,'TextType':_0x5f1c81||_0x1d289a('0x3'),'OutputFormat':_0x1d289a('0x5'),'VoiceId':_0x2e717d};return pollyResult(_0x56160e,_0x5e711a,_0x25e4d8);};
\ No newline at end of file