Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / google / asr / lib / api.js
index 64e737f..d32c8f2 100644 (file)
@@ -1 +1 @@
-const a1038_0x5f06=['readFileSync','toString','/v1/speech:recognize?key=','base64','LINEAR16','length','8000','key\x20should\x20be\x20a\x20string','https://speech.googleapis.com','string','filepath\x20should\x20be\x20a\x20string','exports','undefined'];(function(_0x3f4b51,_0x5f06a6){const _0x457840=function(_0x1866a6){while(--_0x1866a6){_0x3f4b51['push'](_0x3f4b51['shift']());}};_0x457840(++_0x5f06a6);}(a1038_0x5f06,0x87));const a1038_0x4578=function(_0x3f4b51,_0x5f06a6){_0x3f4b51=_0x3f4b51-0x0;let _0x457840=a1038_0x5f06[_0x3f4b51];return _0x457840;};const _0xec141c=a1038_0x4578;'use strict';const fs=require('fs'),host=_0xec141c('0x3');module[_0xec141c('0x6')]=function(_0x1866a6,_0x1af63f,_0x33f904){return new Promise(function(_0x7d1668,_0x122fab){const _0x876081=a1038_0x4578;let _0x1b57b5;if(typeof _0x1866a6!==_0x876081('0x4')||_0x1866a6[_0x876081('0x0')]===0x0)return _0x122fab(_0x876081('0x5'));if(typeof _0x1af63f!==_0x876081('0x4')||_0x1af63f['length']===0x0)return _0x122fab(_0x876081('0x2'));if(typeof _0x33f904!==_0x876081('0x7')&&(typeof _0x33f904!==_0x876081('0x4')||_0x33f904[_0x876081('0x0')]===0x0))return _0x122fab('lang\x20should\x20be\x20a\x20string');try{_0x1b57b5=fs[_0x876081('0x8')](_0x1866a6)[_0x876081('0x9')](_0x876081('0xb'));}catch(_0x59bca8){return _0x122fab(_0x59bca8);}return _0x7d1668({'method':'POST','uri':host+_0x876081('0xa')+_0x1af63f,'body':{'config':{'encoding':_0x876081('0xc'),'sampleRateHertz':_0x876081('0x1'),'languageCode':_0x33f904},'audio':{'content':_0x1b57b5}},'json':!![]});});};
\ No newline at end of file
+const a1038_0x1148=['string','/v1/speech:recognize?key=','undefined','exports','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','LINEAR16','base64','length','readFileSync'];(function(_0x25ee6d,_0x1148b5){const _0x4c1da9=function(_0x6af983){while(--_0x6af983){_0x25ee6d['push'](_0x25ee6d['shift']());}};_0x4c1da9(++_0x1148b5);}(a1038_0x1148,0xb5));const a1038_0x4c1d=function(_0x25ee6d,_0x1148b5){_0x25ee6d=_0x25ee6d-0x0;let _0x4c1da9=a1038_0x1148[_0x25ee6d];return _0x4c1da9;};const _0x41b9cd=a1038_0x4c1d;'use strict';const fs=require('fs'),host='https://speech.googleapis.com';module[_0x41b9cd('0x2')]=function(_0x6af983,_0x5f407e,_0x164669){return new Promise(function(_0x22a437,_0x394ab8){const _0x36efdc=a1038_0x4c1d;let _0x4ad986;if(typeof _0x6af983!=='string'||_0x6af983[_0x36efdc('0x7')]===0x0)return _0x394ab8(_0x36efdc('0x3'));if(typeof _0x5f407e!==_0x36efdc('0x9')||_0x5f407e[_0x36efdc('0x7')]===0x0)return _0x394ab8(_0x36efdc('0x4'));if(typeof _0x164669!==_0x36efdc('0x1')&&(typeof _0x164669!=='string'||_0x164669[_0x36efdc('0x7')]===0x0))return _0x394ab8('lang\x20should\x20be\x20a\x20string');try{_0x4ad986=fs[_0x36efdc('0x8')](_0x6af983)['toString'](_0x36efdc('0x6'));}catch(_0x2c7091){return _0x394ab8(_0x2c7091);}return _0x22a437({'method':'POST','uri':host+_0x36efdc('0x0')+_0x5f407e,'body':{'config':{'encoding':_0x36efdc('0x5'),'sampleRateHertz':'8000','languageCode':_0x164669},'audio':{'content':_0x4ad986}},'json':!![]});});};
\ No newline at end of file