Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / services / agi / scripts / google / asr / lib / api.js
index 470a276..29a0779 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc802=['readFileSync','base64','POST','/v1/speech:recognize?key=','LINEAR16','url','bluebird','https://speech.googleapis.com','string','filepath\x20should\x20be\x20a\x20string','length','key\x20should\x20be\x20a\x20string','lang\x20should\x20be\x20a\x20string'];(function(_0x422be2,_0x1c439e){var _0x1b820e=function(_0x513cc8){while(--_0x513cc8){_0x422be2['push'](_0x422be2['shift']());}};_0x1b820e(++_0x1c439e);}(_0xc802,0xc8));var _0x2c80=function(_0x51944d,_0x20dbf0){_0x51944d=_0x51944d-0x0;var _0x39024e=_0xc802[_0x51944d];return _0x39024e;};'use strict';var url=require(_0x2c80('0x0'));var BPromise=require(_0x2c80('0x1'));var fs=require('fs');var host=_0x2c80('0x2');module['exports']=function(_0x52eb66,_0x473bc1,_0x2e6308){return new BPromise(function(_0x49f745,_0x2a3bcb){var _0x255a8c;if(typeof _0x52eb66!==_0x2c80('0x3')||_0x52eb66['length']===0x0){return _0x2a3bcb(_0x2c80('0x4'));}if(typeof _0x473bc1!==_0x2c80('0x3')||_0x473bc1[_0x2c80('0x5')]===0x0){return _0x2a3bcb(_0x2c80('0x6'));}if(typeof _0x2e6308!=='undefined'&&(typeof _0x2e6308!==_0x2c80('0x3')||_0x2e6308['length']===0x0)){return _0x2a3bcb(_0x2c80('0x7'));}try{_0x255a8c=fs[_0x2c80('0x8')](_0x52eb66)['toString'](_0x2c80('0x9'));}catch(_0x15f899){return _0x2a3bcb(_0x15f899);}return _0x49f745({'method':_0x2c80('0xa'),'uri':host+_0x2c80('0xb')+_0x473bc1,'body':{'config':{'encoding':_0x2c80('0xc'),'sampleRateHertz':'8000','languageCode':_0x2e6308},'audio':{'content':_0x255a8c}},'json':!![]});});};
\ No newline at end of file
+var _0x0695=['string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','toString','base64','POST','LINEAR16','8000','url','bluebird','https://speech.googleapis.com','exports','length','filepath\x20should\x20be\x20a\x20string'];(function(_0x299f82,_0x4ead27){var _0x2e8ec3=function(_0x58c7c7){while(--_0x58c7c7){_0x299f82['push'](_0x299f82['shift']());}};_0x2e8ec3(++_0x4ead27);}(_0x0695,0xea));var _0x5069=function(_0x6acfa,_0x39f3b5){_0x6acfa=_0x6acfa-0x0;var _0x9a122=_0x0695[_0x6acfa];return _0x9a122;};'use strict';var url=require(_0x5069('0x0'));var BPromise=require(_0x5069('0x1'));var fs=require('fs');var host=_0x5069('0x2');module[_0x5069('0x3')]=function(_0x42b441,_0x321508,_0x510ab9){return new BPromise(function(_0x5bb89c,_0x21a78a){var _0x3fee5d;if(typeof _0x42b441!=='string'||_0x42b441[_0x5069('0x4')]===0x0){return _0x21a78a(_0x5069('0x5'));}if(typeof _0x321508!==_0x5069('0x6')||_0x321508[_0x5069('0x4')]===0x0){return _0x21a78a(_0x5069('0x7'));}if(typeof _0x510ab9!==_0x5069('0x8')&&(typeof _0x510ab9!==_0x5069('0x6')||_0x510ab9[_0x5069('0x4')]===0x0)){return _0x21a78a(_0x5069('0x9'));}try{_0x3fee5d=fs[_0x5069('0xa')](_0x42b441)[_0x5069('0xb')](_0x5069('0xc'));}catch(_0x4ca036){return _0x21a78a(_0x4ca036);}return _0x5bb89c({'method':_0x5069('0xd'),'uri':host+'/v1/speech:recognize?key='+_0x321508,'body':{'config':{'encoding':_0x5069('0xe'),'sampleRateHertz':_0x5069('0xf'),'languageCode':_0x510ab9},'audio':{'content':_0x3fee5d}},'json':!![]});});};
\ No newline at end of file