Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / google / asr / lib / api.js
index e59d860..94b8f23 100644 (file)
@@ -1 +1 @@
-const a1203_0x5e05=['lang\x20should\x20be\x20a\x20string','readFileSync','filepath\x20should\x20be\x20a\x20string','string','base64','undefined','toString','https://speech.googleapis.com','exports','key\x20should\x20be\x20a\x20string','POST','8000','length'];(function(_0x467b59,_0x555931){const _0x5e057c=function(_0x2064ae){while(--_0x2064ae){_0x467b59['push'](_0x467b59['shift']());}};_0x5e057c(++_0x555931);}(a1203_0x5e05,0xda));const a1203_0x2064=function(_0x467b59,_0x555931){_0x467b59=_0x467b59-0x1a6;let _0x5e057c=a1203_0x5e05[_0x467b59];return _0x5e057c;};const a1203_0x5e2961=a1203_0x2064;'use strict';const fs=require('fs'),host=a1203_0x5e2961(0x1b0);module[a1203_0x5e2961(0x1b1)]=function(_0x39bbb5,_0x2dc431,_0x145984){return new Promise(function(_0x562b30,_0x217415){const _0xeefa3e=a1203_0x2064;let _0x1f0fa0;if(typeof _0x39bbb5!==_0xeefa3e(0x1ac)||_0x39bbb5[_0xeefa3e(0x1a8)]===0x0)return _0x217415(_0xeefa3e(0x1ab));if(typeof _0x2dc431!=='string'||_0x2dc431['length']===0x0)return _0x217415(_0xeefa3e(0x1b2));if(typeof _0x145984!==_0xeefa3e(0x1ae)&&(typeof _0x145984!==_0xeefa3e(0x1ac)||_0x145984[_0xeefa3e(0x1a8)]===0x0))return _0x217415(_0xeefa3e(0x1a9));try{_0x1f0fa0=fs[_0xeefa3e(0x1aa)](_0x39bbb5)[_0xeefa3e(0x1af)](_0xeefa3e(0x1ad));}catch(_0x2d9cfc){return _0x217415(_0x2d9cfc);}return _0x562b30({'method':_0xeefa3e(0x1a6),'uri':host+'/v1/speech:recognize?key='+_0x2dc431,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0xeefa3e(0x1a7),'languageCode':_0x145984},'audio':{'content':_0x1f0fa0}},'json':!![]});});};
\ No newline at end of file
+const a1207_0x5571=['exports','base64','string','length','filepath\x20should\x20be\x20a\x20string','toString','key\x20should\x20be\x20a\x20string','https://speech.googleapis.com','POST','8000','lang\x20should\x20be\x20a\x20string','LINEAR16'];(function(_0x14b314,_0x2ab509){const _0x55713c=function(_0x5759fb){while(--_0x5759fb){_0x14b314['push'](_0x14b314['shift']());}};_0x55713c(++_0x2ab509);}(a1207_0x5571,0xa8));const a1207_0x5759=function(_0x14b314,_0x2ab509){_0x14b314=_0x14b314-0x65;let _0x55713c=a1207_0x5571[_0x14b314];return _0x55713c;};const a1207_0x31b331=a1207_0x5759;'use strict';const fs=require('fs'),host=a1207_0x31b331(0x6c);module[a1207_0x31b331(0x65)]=function(_0xc6d7f1,_0x33ef21,_0x3c303a){return new Promise(function(_0x2a1653,_0x12a693){const _0x2115d6=a1207_0x5759;let _0x405e01;if(typeof _0xc6d7f1!==_0x2115d6(0x67)||_0xc6d7f1[_0x2115d6(0x68)]===0x0)return _0x12a693(_0x2115d6(0x69));if(typeof _0x33ef21!=='string'||_0x33ef21['length']===0x0)return _0x12a693(_0x2115d6(0x6b));if(typeof _0x3c303a!=='undefined'&&(typeof _0x3c303a!==_0x2115d6(0x67)||_0x3c303a[_0x2115d6(0x68)]===0x0))return _0x12a693(_0x2115d6(0x6f));try{_0x405e01=fs['readFileSync'](_0xc6d7f1)[_0x2115d6(0x6a)](_0x2115d6(0x66));}catch(_0x26b649){return _0x12a693(_0x26b649);}return _0x2a1653({'method':_0x2115d6(0x6d),'uri':host+'/v1/speech:recognize?key='+_0x33ef21,'body':{'config':{'encoding':_0x2115d6(0x70),'sampleRateHertz':_0x2115d6(0x6e),'languageCode':_0x3c303a},'audio':{'content':_0x405e01}},'json':!![]});});};
\ No newline at end of file