Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / services / agi / scripts / google / asr / lib / api.js
index 6e7cc5e..0a5c988 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x750a=['/v1/speech:recognize?key=','bluebird','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','toString','base64','POST'];(function(_0x265878,_0xf640cf){var _0x26129c=function(_0x46285f){while(--_0x46285f){_0x265878['push'](_0x265878['shift']());}};_0x26129c(++_0xf640cf);}(_0x750a,0x140));var _0xa750=function(_0x59e703,_0x62b160){_0x59e703=_0x59e703-0x0;var _0x5e46c3=_0x750a[_0x59e703];return _0x5e46c3;};'use strict';var url=require('url');var BPromise=require(_0xa750('0x0'));var fs=require('fs');var host='https://speech.googleapis.com';module['exports']=function(_0x139fa5,_0xeb020d,_0x1b459c){return new BPromise(function(_0x19bd5f,_0x457cae){var _0x43d704;if(typeof _0x139fa5!==_0xa750('0x1')||_0x139fa5[_0xa750('0x2')]===0x0){return _0x457cae(_0xa750('0x3'));}if(typeof _0xeb020d!==_0xa750('0x1')||_0xeb020d[_0xa750('0x2')]===0x0){return _0x457cae(_0xa750('0x4'));}if(typeof _0x1b459c!==_0xa750('0x5')&&(typeof _0x1b459c!=='string'||_0x1b459c['length']===0x0)){return _0x457cae(_0xa750('0x6'));}try{_0x43d704=fs['readFileSync'](_0x139fa5)[_0xa750('0x7')](_0xa750('0x8'));}catch(_0x51f594){return _0x457cae(_0x51f594);}return _0x19bd5f({'method':_0xa750('0x9'),'uri':host+_0xa750('0xa')+_0xeb020d,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':'8000','languageCode':_0x1b459c},'audio':{'content':_0x43d704}},'json':!![]});});};
\ No newline at end of file
+var _0x2821=['url','bluebird','https://speech.googleapis.com','exports','string','filepath\x20should\x20be\x20a\x20string','length','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','toString','base64','POST','/v1/speech:recognize?key=','8000'];(function(_0x13debf,_0x247a58){var _0x43483e=function(_0x12718f){while(--_0x12718f){_0x13debf['push'](_0x13debf['shift']());}};_0x43483e(++_0x247a58);}(_0x2821,0x87));var _0x1282=function(_0x54657a,_0x51aa2f){_0x54657a=_0x54657a-0x0;var _0xc9daa8=_0x2821[_0x54657a];return _0xc9daa8;};'use strict';var url=require(_0x1282('0x0'));var BPromise=require(_0x1282('0x1'));var fs=require('fs');var host=_0x1282('0x2');module[_0x1282('0x3')]=function(_0x27c0ae,_0x1bebaa,_0x279fa6){return new BPromise(function(_0x1e303b,_0x3f5e68){var _0x7c8e0f;if(typeof _0x27c0ae!==_0x1282('0x4')||_0x27c0ae['length']===0x0){return _0x3f5e68(_0x1282('0x5'));}if(typeof _0x1bebaa!==_0x1282('0x4')||_0x1bebaa[_0x1282('0x6')]===0x0){return _0x3f5e68(_0x1282('0x7'));}if(typeof _0x279fa6!==_0x1282('0x8')&&(typeof _0x279fa6!==_0x1282('0x4')||_0x279fa6[_0x1282('0x6')]===0x0)){return _0x3f5e68(_0x1282('0x9'));}try{_0x7c8e0f=fs['readFileSync'](_0x27c0ae)[_0x1282('0xa')](_0x1282('0xb'));}catch(_0x3bda99){return _0x3f5e68(_0x3bda99);}return _0x1e303b({'method':_0x1282('0xc'),'uri':host+_0x1282('0xd')+_0x1bebaa,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0x1282('0xe'),'languageCode':_0x279fa6},'audio':{'content':_0x7c8e0f}},'json':!![]});});};
\ No newline at end of file