Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / services / agi / scripts / google / asr / lib / api.js
index f784bc4..9b7ac3e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3eec=['key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','toString','POST','/v1/speech:recognize?key=','LINEAR16','8000','url','bluebird','https://speech.googleapis.com','exports','string','filepath\x20should\x20be\x20a\x20string','length'];(function(_0x9d47b,_0x364986){var _0x301442=function(_0x2f080f){while(--_0x2f080f){_0x9d47b['push'](_0x9d47b['shift']());}};_0x301442(++_0x364986);}(_0x3eec,0x1e9));var _0xc3ee=function(_0x121709,_0x20b139){_0x121709=_0x121709-0x0;var _0x492267=_0x3eec[_0x121709];return _0x492267;};'use strict';var url=require(_0xc3ee('0x0'));var BPromise=require(_0xc3ee('0x1'));var fs=require('fs');var host=_0xc3ee('0x2');module[_0xc3ee('0x3')]=function(_0x484ade,_0x223d08,_0x280209){return new BPromise(function(_0x12db6b,_0x35b2fb){var _0x25074b;if(typeof _0x484ade!==_0xc3ee('0x4')||_0x484ade['length']===0x0){return _0x35b2fb(_0xc3ee('0x5'));}if(typeof _0x223d08!==_0xc3ee('0x4')||_0x223d08[_0xc3ee('0x6')]===0x0){return _0x35b2fb(_0xc3ee('0x7'));}if(typeof _0x280209!==_0xc3ee('0x8')&&(typeof _0x280209!==_0xc3ee('0x4')||_0x280209[_0xc3ee('0x6')]===0x0)){return _0x35b2fb(_0xc3ee('0x9'));}try{_0x25074b=fs[_0xc3ee('0xa')](_0x484ade)[_0xc3ee('0xb')]('base64');}catch(_0x523511){return _0x35b2fb(_0x523511);}return _0x12db6b({'method':_0xc3ee('0xc'),'uri':host+_0xc3ee('0xd')+_0x223d08,'body':{'config':{'encoding':_0xc3ee('0xe'),'sampleRateHertz':_0xc3ee('0xf'),'languageCode':_0x280209},'audio':{'content':_0x25074b}},'json':!![]});});};
\ No newline at end of file
+var _0x91a7=['lang\x20should\x20be\x20a\x20string','readFileSync','toString','base64','POST','/v1/speech:recognize?key=','8000','bluebird','https://speech.googleapis.com','exports','string','length','key\x20should\x20be\x20a\x20string','undefined'];(function(_0x480bc8,_0x1fac40){var _0x28c245=function(_0x22a049){while(--_0x22a049){_0x480bc8['push'](_0x480bc8['shift']());}};_0x28c245(++_0x1fac40);}(_0x91a7,0xe7));var _0x791a=function(_0x1cd7cf,_0x49e869){_0x1cd7cf=_0x1cd7cf-0x0;var _0x3d6282=_0x91a7[_0x1cd7cf];return _0x3d6282;};'use strict';var url=require('url');var BPromise=require(_0x791a('0x0'));var fs=require('fs');var host=_0x791a('0x1');module[_0x791a('0x2')]=function(_0x5d2796,_0x415994,_0x5b6f78){return new BPromise(function(_0x2f6392,_0x535640){var _0x50ab29;if(typeof _0x5d2796!==_0x791a('0x3')||_0x5d2796[_0x791a('0x4')]===0x0){return _0x535640('filepath\x20should\x20be\x20a\x20string');}if(typeof _0x415994!==_0x791a('0x3')||_0x415994['length']===0x0){return _0x535640(_0x791a('0x5'));}if(typeof _0x5b6f78!==_0x791a('0x6')&&(typeof _0x5b6f78!=='string'||_0x5b6f78[_0x791a('0x4')]===0x0)){return _0x535640(_0x791a('0x7'));}try{_0x50ab29=fs[_0x791a('0x8')](_0x5d2796)[_0x791a('0x9')](_0x791a('0xa'));}catch(_0x5249d5){return _0x535640(_0x5249d5);}return _0x2f6392({'method':_0x791a('0xb'),'uri':host+_0x791a('0xc')+_0x415994,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0x791a('0xd'),'languageCode':_0x5b6f78},'audio':{'content':_0x50ab29}},'json':!![]});});};
\ No newline at end of file