Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / services / agi / scripts / google / asr / lib / api.js
index 3c61dec..1901c9c 100644 (file)
@@ -1 +1 @@
-const a1038_0x1de9=['toString','base64','length','string','/v1/speech:recognize?key=','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','https://speech.googleapis.com','POST','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','8000'];(function(_0x21d81b,_0x1de9c7){const _0x371dbd=function(_0x37b300){while(--_0x37b300){_0x21d81b['push'](_0x21d81b['shift']());}};_0x371dbd(++_0x1de9c7);}(a1038_0x1de9,0x1d2));const a1038_0x371d=function(_0x21d81b,_0x1de9c7){_0x21d81b=_0x21d81b-0x0;let _0x371dbd=a1038_0x1de9[_0x21d81b];return _0x371dbd;};const _0x543800=a1038_0x371d;'use strict';const fs=require('fs'),host=_0x543800('0xa');module['exports']=function(_0x37b300,_0x1a5947,_0x4071f6){return new Promise(function(_0x3e6608,_0x54ad4c){const _0x1d9851=a1038_0x371d;let _0x4bd37a;if(typeof _0x37b300!=='string'||_0x37b300[_0x1d9851('0x4')]===0x0)return _0x54ad4c(_0x1d9851('0xc'));if(typeof _0x1a5947!==_0x1d9851('0x5')||_0x1a5947[_0x1d9851('0x4')]===0x0)return _0x54ad4c(_0x1d9851('0x0'));if(typeof _0x4071f6!==_0x1d9851('0x7')&&(typeof _0x4071f6!==_0x1d9851('0x5')||_0x4071f6['length']===0x0))return _0x54ad4c(_0x1d9851('0x8'));try{_0x4bd37a=fs[_0x1d9851('0x9')](_0x37b300)[_0x1d9851('0x2')](_0x1d9851('0x3'));}catch(_0x4255e1){return _0x54ad4c(_0x4255e1);}return _0x3e6608({'method':_0x1d9851('0xb'),'uri':host+_0x1d9851('0x6')+_0x1a5947,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0x1d9851('0x1'),'languageCode':_0x4071f6},'audio':{'content':_0x4bd37a}},'json':!![]});});};
\ No newline at end of file
+const a1038_0x250d=['base64','LINEAR16','length','key\x20should\x20be\x20a\x20string','https://speech.googleapis.com','exports','undefined','string','lang\x20should\x20be\x20a\x20string','/v1/speech:recognize?key=','readFileSync','POST','toString'];(function(_0x90421,_0x250dbe){const _0x20166c=function(_0x3a2557){while(--_0x3a2557){_0x90421['push'](_0x90421['shift']());}};_0x20166c(++_0x250dbe);}(a1038_0x250d,0x8c));const a1038_0x2016=function(_0x90421,_0x250dbe){_0x90421=_0x90421-0x0;let _0x20166c=a1038_0x250d[_0x90421];return _0x20166c;};const _0xd0957e=a1038_0x2016;'use strict';const fs=require('fs'),host=_0xd0957e('0x7');module[_0xd0957e('0x8')]=function(_0x3a2557,_0x36a52d,_0x317e42){return new Promise(function(_0x456fb5,_0xf6c676){const _0xa275ab=a1038_0x2016;let _0x161d2d;if(typeof _0x3a2557!=='string'||_0x3a2557[_0xa275ab('0x5')]===0x0)return _0xf6c676('filepath\x20should\x20be\x20a\x20string');if(typeof _0x36a52d!==_0xa275ab('0xa')||_0x36a52d[_0xa275ab('0x5')]===0x0)return _0xf6c676(_0xa275ab('0x6'));if(typeof _0x317e42!==_0xa275ab('0x9')&&(typeof _0x317e42!==_0xa275ab('0xa')||_0x317e42[_0xa275ab('0x5')]===0x0))return _0xf6c676(_0xa275ab('0xb'));try{_0x161d2d=fs[_0xa275ab('0x0')](_0x3a2557)[_0xa275ab('0x2')](_0xa275ab('0x3'));}catch(_0x5892c3){return _0xf6c676(_0x5892c3);}return _0x456fb5({'method':_0xa275ab('0x1'),'uri':host+_0xa275ab('0xc')+_0x36a52d,'body':{'config':{'encoding':_0xa275ab('0x4'),'sampleRateHertz':'8000','languageCode':_0x317e42},'audio':{'content':_0x161d2d}},'json':!![]});});};
\ No newline at end of file