Built motion from commit ded33658aad58fc8de845a8299a9db59a88cc353. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / aws / polly / lib / api.js
index 8130ea9..53339f8 100644 (file)
@@ -1 +1 @@
-const a1036_0x5e02=['Invalid\x20data\x20response\x20from\x20aws\x20Polly!','writeFile','exports','AudioStream','Polly','No\x20data\x20response\x20from\x20aws\x20Polly!','aws-sdk','text','synthesizeSpeech'];(function(_0x5d3e9f,_0x5e027b){const _0x466ebf=function(_0x133652){while(--_0x133652){_0x5d3e9f['push'](_0x5d3e9f['shift']());}};_0x466ebf(++_0x5e027b);}(a1036_0x5e02,0xfa));const a1036_0x466e=function(_0x5d3e9f,_0x5e027b){_0x5d3e9f=_0x5d3e9f-0x0;let _0x466ebf=a1036_0x5e02[_0x5d3e9f];return _0x466ebf;};const _0x673b5d=a1036_0x466e;'use strict';const fs=require('fs'),AWS=require(_0x673b5d('0x8'));function pollyResult(_0x133652,_0x11f567,_0xab7c66){return new Promise(function(_0x190fd6,_0x2d4799){const _0x191497=a1036_0x466e;_0x133652[_0x191497('0x1')](_0x11f567,function(_0x493d03,_0x1ffb4d){const _0x299f5d=_0x191497;if(_0x493d03)_0x2d4799(_0x493d03);else _0x1ffb4d?_0x1ffb4d[_0x299f5d('0x5')]instanceof Buffer?fs[_0x299f5d('0x3')](_0xab7c66,_0x1ffb4d[_0x299f5d('0x5')],function(_0x171795){_0x171795?_0x2d4799(_0x171795):_0x190fd6();}):_0x2d4799(new Error(_0x299f5d('0x2'))):_0x2d4799(new Error(_0x299f5d('0x7')));});});}module[_0x673b5d('0x4')]=function(_0x355773,_0xbc12d0,_0x540292,_0x32d515,_0x3fb98d,_0x400a99,_0x23e12f){const _0x4cd7b5=_0x673b5d,_0x350082=new AWS[(_0x4cd7b5('0x6'))]({'accessKeyId':_0x355773,'secretAccessKey':_0xbc12d0,'region':_0x540292}),_0x282ffc={'Text':_0x3fb98d,'TextType':_0x400a99||_0x4cd7b5('0x0'),'OutputFormat':'mp3','VoiceId':_0x32d515};return pollyResult(_0x350082,_0x282ffc,_0x23e12f);};
\ No newline at end of file
+const a1036_0x567d=['exports','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','text','AudioStream','synthesizeSpeech','aws-sdk'];(function(_0x328e56,_0x567d9b){const _0x18dd1c=function(_0xeeff7){while(--_0xeeff7){_0x328e56['push'](_0x328e56['shift']());}};_0x18dd1c(++_0x567d9b);}(a1036_0x567d,0x12b));const a1036_0x18dd=function(_0x328e56,_0x567d9b){_0x328e56=_0x328e56-0x0;let _0x18dd1c=a1036_0x567d[_0x328e56];return _0x18dd1c;};const _0x3962e7=a1036_0x18dd;'use strict';const fs=require('fs'),AWS=require(_0x3962e7('0x0'));function pollyResult(_0xeeff7,_0x378db9,_0x1faa60){return new Promise(function(_0x524aa3,_0x57ccf3){const _0xfe33c9=a1036_0x18dd;_0xeeff7[_0xfe33c9('0x5')](_0x378db9,function(_0x2b042e,_0x1d01ec){const _0x4cefa0=_0xfe33c9;if(_0x2b042e)_0x57ccf3(_0x2b042e);else _0x1d01ec?_0x1d01ec[_0x4cefa0('0x4')]instanceof Buffer?fs['writeFile'](_0x1faa60,_0x1d01ec['AudioStream'],function(_0x3c1a83){_0x3c1a83?_0x57ccf3(_0x3c1a83):_0x524aa3();}):_0x57ccf3(new Error(_0x4cefa0('0x2'))):_0x57ccf3(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));});});}module[_0x3962e7('0x1')]=function(_0x46cf43,_0x3f70ad,_0x503b66,_0x5eae56,_0x5ab040,_0x46b934,_0x5118d6){const _0xaccd61=_0x3962e7,_0x45b0de=new AWS['Polly']({'accessKeyId':_0x46cf43,'secretAccessKey':_0x3f70ad,'region':_0x503b66}),_0x3127e7={'Text':_0x5ab040,'TextType':_0x46b934||_0xaccd61('0x3'),'OutputFormat':'mp3','VoiceId':_0x5eae56};return pollyResult(_0x45b0de,_0x3127e7,_0x5118d6);};
\ No newline at end of file