Built motion from commit 25580385.|2.6.2
[motion2.git] / server / services / agi / scripts / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xff55=['google-tts-api','url','parse','./google','./tilde','../../../config/logger','agi','https://api.ispeech.org/api/rest','https:','host','get','statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','finish','info','finish\x20download\x20file','close','download\x20error','end','protocol','data','wav','error\x20convert','finish\x20to\x20convert','start','resolve','generate','.wav','writeFileSync','base64','then','unlink','777','split','readFileSync','googleCloudTTS','https://texttospeech.googleapis.com/v1/','?key=','ssml','input','voice','MP3','text:synthesize','POST','tmp','.mp3','from','writeFile','chmodSync','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','application/x-www-form-urlencoded','f.req=','stringify','jQ1olc','null','generic','slice','parse\x20response\x20failed:\x0a','length','text\x20length\x20limit\x20reached','\x22\x20might\x20not\x20exist','googleASR','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','[%s]\x20%s:%s','name','message','googleDialogflow','textRequest','source','result','resolvedQuery','action','actionIncomplete','fulfillment','speech','score','status','metadata','endConversation','isFallbackIntent','SessionsClient','detectIntent','allRequiredParamsPresent','queryResult','diagnosticInfo','fields','end_conversation','boolValue','fulfillmentText','intent','displayName','isFallback','languageCode','queryText','responseId','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','polly','awsLex','lex','ispeechTTS','format','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','freeform=3','sestekNDA','text','channelData','CustomAction','CustomActionData','AudioFromTts','Data','apiai-promise','bluebird','dialogflow','http','https','md5','path','request-promise','randomstring','sox'];(function(_0xd83f3e,_0x3c909e){var _0x3afffc=function(_0x105730){while(--_0x105730){_0xd83f3e['push'](_0xd83f3e['shift']());}};_0x3afffc(++_0x3c909e);}(_0xff55,0x80));var _0x5ff5=function(_0x946f5,_0x8071bf){_0x946f5=_0x946f5-0x0;var _0x553d87=_0xff55[_0x946f5];return _0x553d87;};'use strict';var apiai=require(_0x5ff5('0x0'));var BPromise=require(_0x5ff5('0x1'));var dialogflow=require(_0x5ff5('0x2'));var fs=require('fs');var http=require(_0x5ff5('0x3'));var https=require(_0x5ff5('0x4'));var md5=require(_0x5ff5('0x5'));var path=require(_0x5ff5('0x6'));var querystring=require('querystring');var rp=require(_0x5ff5('0x7'));var rs=require(_0x5ff5('0x8'));var sox=require(_0x5ff5('0x9'));var tts=require(_0x5ff5('0xa'));var urlParse=require(_0x5ff5('0xb'))[_0x5ff5('0xc')];var util=require('util');var aws=require('./aws');var google=require(_0x5ff5('0xd'));var sestek=require('./sestek');var tilde=require(_0x5ff5('0xe'));var logger=require(_0x5ff5('0xf'))(_0x5ff5('0x10'));var ISPEECH_API=_0x5ff5('0x11');function downloadFile(_0x156096,_0x5da32b){return new BPromise(function(_0x4e3779,_0x1cf4be){var _0x33ed8d=urlParse(_0x156096);var _0x5e6200=_0x33ed8d['protocol']===_0x5ff5('0x12')?https:http;var _0x341c0c={'host':_0x33ed8d[_0x5ff5('0x13')],'path':_0x33ed8d[_0x5ff5('0x6')],'headers':{'user-agent':'WHAT_EVER'}};_0x5e6200[_0x5ff5('0x14')](_0x341c0c,function(_0x5a40c6){if(_0x5a40c6[_0x5ff5('0x15')]!==0xc8){logger[_0x5ff5('0x16')](_0x5ff5('0x17')+_0x156096+_0x5ff5('0x18')+_0x5a40c6['statusCode']+'\x20('+_0x5a40c6[_0x5ff5('0x19')]+')');_0x1cf4be(new Error(_0x5ff5('0x17')+_0x156096+_0x5ff5('0x18')+_0x5a40c6[_0x5ff5('0x15')]+'\x20('+_0x5a40c6[_0x5ff5('0x19')]+')'));return;}var _0x3df795=fs[_0x5ff5('0x1a')](_0x5da32b);_0x3df795['on'](_0x5ff5('0x1b'),function(){logger[_0x5ff5('0x1c')](_0x5ff5('0x1d'));_0x3df795[_0x5ff5('0x1e')](_0x4e3779);});_0x3df795['on'](_0x5ff5('0x16'),function(_0x38d0b9){fs['unlink'](_0x5da32b);logger['error'](_0x5ff5('0x1f'),_0x38d0b9);_0x1cf4be(_0x38d0b9);});_0x5a40c6['pipe'](_0x3df795);})['on']('error',function(_0x3e91c4){logger[_0x5ff5('0x16')](_0x3e91c4);_0x1cf4be(_0x3e91c4);})[_0x5ff5('0x20')]();});}function uploadFile(_0x2828b7){return new BPromise(function(_0x591265,_0x1ff04c){var _0x476cdd=urlParse(_0x2828b7);var _0x2934e1=_0x476cdd[_0x5ff5('0x21')]==='https:'?https:http;var _0x2d2f82={'host':_0x476cdd[_0x5ff5('0x13')],'path':_0x476cdd[_0x5ff5('0x6')],'headers':{'user-agent':'WHAT_EVER'}};_0x2934e1[_0x5ff5('0x14')](_0x2d2f82,function(_0x1ad9d9){if(_0x1ad9d9[_0x5ff5('0x15')]!==0xc8){_0x1ff04c(new Error(_0x5ff5('0x17')+_0x2828b7+_0x5ff5('0x18')+_0x1ad9d9[_0x5ff5('0x15')]+'\x20('+_0x1ad9d9[_0x5ff5('0x19')]+')'));return;}var _0x1ac843='';_0x1ad9d9['on'](_0x5ff5('0x22'),function(_0x391747){_0x1ac843+=_0x391747;});_0x1ad9d9['on'](_0x5ff5('0x20'),function(){_0x591265(_0x1ac843);});})['on'](_0x5ff5('0x16'),function(_0x3f3198){_0x1ff04c(_0x3f3198);})[_0x5ff5('0x20')]();});}function convertFile(_0x3256f5,_0x2757bb){return new BPromise(function(_0xceed6b,_0x5b1c25){var _0x3d5140=sox['transcode'](_0x3256f5,_0x2757bb,{'sampleRate':0x1f40,'format':_0x5ff5('0x23'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x3d5140['on'](_0x5ff5('0x16'),function(_0x16f910){logger['error'](_0x5ff5('0x24'),_0x16f910);_0x5b1c25(_0x16f910);});_0x3d5140['on']('end',function(){logger[_0x5ff5('0x1c')](_0x5ff5('0x25'));_0xceed6b();});_0x3d5140[_0x5ff5('0x26')]();});}function base64Decode(_0x3571f6,_0x418a70){var _0x40dbfa=path[_0x5ff5('0x27')](__dirname,'tmp',rs[_0x5ff5('0x28')](0x4)+_0x5ff5('0x29'));fs[_0x5ff5('0x2a')](_0x40dbfa,_0x3571f6,_0x5ff5('0x2b'));return convertFile(_0x40dbfa,_0x418a70)[_0x5ff5('0x2c')](function(){try{fs[_0x5ff5('0x2d')](_0x40dbfa);fs['chmodSync'](_0x418a70,_0x5ff5('0x2e'));}catch(_0x11a6ec){logger[_0x5ff5('0x16')](_0x11a6ec);}return _0x418a70[_0x5ff5('0x2f')]('.')[0x0];});}function base64Encode(_0x37e2b4){var _0x5084bc=fs[_0x5ff5('0x30')](_0x37e2b4);return new Buffer(_0x5084bc)['toString'](_0x5ff5('0x2b'));}exports[_0x5ff5('0x31')]=function(_0x512755,_0x347a09,_0x30eae9,_0x1d436d,_0x541987,_0x1e0ca2){var _0x3ea4da,_0x21df2b;var _0x3015db=_0x5ff5('0x32');var _0x28a613=_0x5ff5('0x33')+_0x512755;var _0x5edde6={};if(_0x347a09===_0x5ff5('0x34')){_0x5edde6[_0x5ff5('0x35')]={'ssml':_0x30eae9};}else{_0x5edde6[_0x5ff5('0x35')]={'text':_0x30eae9};};_0x5edde6[_0x5ff5('0x36')]={'languageCode':_0x1d436d,'ssmlGender':_0x541987};_0x5edde6['audioConfig']={'audioEncoding':_0x5ff5('0x37'),'sampleRateHertz':0x1f40};var _0x2b34f4={'url':_0x3015db+_0x5ff5('0x38')+_0x28a613,'method':_0x5ff5('0x39'),'json':!![],'body':_0x5edde6};return rp(_0x2b34f4)[_0x5ff5('0x2c')](function(_0x2e47e3){return new BPromise(function(_0x1393ec,_0x27b2fa){_0x3ea4da=path['resolve'](__dirname,_0x5ff5('0x3a'),rs[_0x5ff5('0x28')](0x4)+_0x5ff5('0x3b'));var _0x243f1f=Buffer[_0x5ff5('0x3c')](_0x2e47e3['audioContent'],_0x5ff5('0x2b'));return fs[_0x5ff5('0x3d')](_0x3ea4da,_0x243f1f,function(_0x5739d1){_0x27b2fa(_0x5739d1);},function(_0x4dc1f8){fs[_0x5ff5('0x3e')](_0x3ea4da,_0x5ff5('0x2e'));_0x1393ec(_0x4dc1f8);});});})[_0x5ff5('0x2c')](function(_0x322188){_0x21df2b=path[_0x5ff5('0x27')](__dirname,_0x5ff5('0x3a'),rs[_0x5ff5('0x28')](0x4)+_0x5ff5('0x29'));return convertFile(_0x3ea4da,_0x21df2b);})[_0x5ff5('0x2c')](function(){try{fs[_0x5ff5('0x2d')](_0x3ea4da);fs[_0x5ff5('0x3e')](_0x21df2b,_0x5ff5('0x2e'));}catch(_0x125e3d){logger[_0x5ff5('0x16')](_0x125e3d);}logger['info'](_0x5ff5('0x3f'),_0x21df2b['split']('.')[0x0]);return _0x21df2b[_0x5ff5('0x2f')]('.')[0x0];});};exports[_0x5ff5('0x40')]=function(_0x31353e,_0x39a024){var _0x4b672c=_0x5ff5('0x41');var _0xb83ced,_0x41778a;var _0x2a25f3;var _0x22f593={'encoding':'utf8','method':_0x5ff5('0x39'),'timeout':0x2710,'url':_0x4b672c,'headers':{'Content-Type':_0x5ff5('0x42')},'body':_0x5ff5('0x43')+encodeURIComponent(JSON[_0x5ff5('0x44')]([[[_0x5ff5('0x45'),JSON[_0x5ff5('0x44')]([_0x31353e,_0x39a024||'en',![],_0x5ff5('0x46')]),null,_0x5ff5('0x47')]]]))};return rp(_0x22f593)['then'](function(_0x1149cb){try{_0x2a25f3=eval(_0x1149cb[_0x5ff5('0x48')](0x5))[0x0][0x2];}catch(_0xb145c8){throw new Error(_0x5ff5('0x49')+_0x1149cb[_0x5ff5('0x22')]);}if(!_0x2a25f3){if(_0x31353e[_0x5ff5('0x4a')]>0xc8){throw new Error(_0x5ff5('0x4b'));}else{throw new Error('lang\x20\x22'+_0x39a024+_0x5ff5('0x4c'));}}try{_0x2a25f3=eval(_0x2a25f3)[0x0];}catch(_0x2ecbe4){throw new Error('parse\x20response\x20failed:\x0a'+res[_0x5ff5('0x22')]);}const _0xb260b8=_0x2a25f3;_0xb83ced=path['resolve'](__dirname,_0x5ff5('0x3a'),rs[_0x5ff5('0x28')](0x4)+_0x5ff5('0x3b'));fs[_0x5ff5('0x2a')](_0xb83ced,_0x2a25f3,{'encoding':'base64'});_0x41778a=path[_0x5ff5('0x27')](__dirname,'tmp',rs['generate'](0x4)+_0x5ff5('0x29'));return convertFile(_0xb83ced,_0x41778a);})[_0x5ff5('0x2c')](function(){try{fs[_0x5ff5('0x2d')](_0xb83ced);fs[_0x5ff5('0x3e')](_0x41778a,'777');}catch(_0x5582dd){logger[_0x5ff5('0x16')](_0x5582dd);}logger['info']('goggleTTS\x20path',_0x41778a['split']('.')[0x0]);return _0x41778a[_0x5ff5('0x2f')]('.')[0x0];});};exports[_0x5ff5('0x4d')]=function(_0x45a4c4,_0x145448,_0x16ac48){return google[_0x5ff5('0x4e')](_0x45a4c4,_0x145448,_0x16ac48)['then'](function(_0x5c0a34){logger['info'](_0x5c0a34[_0x5ff5('0x4f')]);return rp(_0x5c0a34);})[_0x5ff5('0x2c')](function(_0x5df724){var _0xaf4a96='';var _0x2fa355=0x0;try{fs['unlink'](_0x45a4c4);}catch(_0x80d9f7){logger[_0x5ff5('0x16')](_0x80d9f7);}if(_0x5df724&&_0x5df724['results']){_0xaf4a96=_0x5df724[_0x5ff5('0x50')][_0x5ff5('0x51')](function(_0x44522){return _0x44522&&_0x44522[_0x5ff5('0x52')][0x0]&&_0x44522['alternatives'][0x0][_0x5ff5('0x53')]?_0x44522[_0x5ff5('0x52')][0x0]['transcript']:'';})[_0x5ff5('0x54')]('\x0a');_0x2fa355=_0x5df724[_0x5ff5('0x50')][_0x5ff5('0x51')](function(_0x32319a){return _0x32319a&&_0x32319a[_0x5ff5('0x52')][0x0]&&_0x32319a[_0x5ff5('0x52')][0x0]['confidence']?_0x32319a[_0x5ff5('0x52')][0x0][_0x5ff5('0x55')]:0x0;})[_0x5ff5('0x54')]('\x0a');}logger[_0x5ff5('0x1c')](_0x5ff5('0x56'),_0xaf4a96);logger[_0x5ff5('0x1c')](_0x5ff5('0x57'),_0x2fa355);return{'transcript':_0xaf4a96,'confidence':_0x2fa355};})['catch'](function(_0x322bf6){logger[_0x5ff5('0x16')](_0x5ff5('0x58'),_0x322bf6['statusCode'],_0x322bf6[_0x5ff5('0x59')],_0x322bf6[_0x5ff5('0x5a')]);});};exports[_0x5ff5('0x5b')]=function(_0x68b4d7,_0x5160a5,_0x232056,_0x251f49){var _0x1156e4=apiai(_0x5160a5,{'language':_0x251f49||'en'});return _0x1156e4[_0x5ff5('0x5c')](_0x232056,{'sessionId':md5(_0x68b4d7)})['then'](function(_0x5983cb){logger[_0x5ff5('0x1c')](JSON[_0x5ff5('0x44')](_0x5983cb));return{'source':_0x5983cb['result'][_0x5ff5('0x5d')],'resolvedQuery':_0x5983cb[_0x5ff5('0x5e')][_0x5ff5('0x5f')],'action':_0x5983cb['result'][_0x5ff5('0x60')],'actionIncomplete':_0x5983cb[_0x5ff5('0x5e')][_0x5ff5('0x61')],'speech':_0x5983cb['result'][_0x5ff5('0x62')][_0x5ff5('0x63')],'score':_0x5983cb['result'][_0x5ff5('0x64')],'statusCode':_0x5983cb[_0x5ff5('0x65')]['code'],'endConversation':_0x5983cb['result'][_0x5ff5('0x66')][_0x5ff5('0x67')]||![],'isFallbackIntent':_0x5983cb['result'][_0x5ff5('0x66')][_0x5ff5('0x68')]};});};exports['googleDialogflowV2']=function(_0x2ab2dd,_0x7d6f69,_0x546cf6,_0x47e547,_0x43a270,_0x5661d6){var _0x2a761b=_0x47e547['replace'](/\\n/g,'\x0a');var _0x28d6a3={'credentials':{'private_key':_0x2a761b,'client_email':_0x546cf6}};var _0x422dc4=new dialogflow[(_0x5ff5('0x69'))](_0x28d6a3);var _0x2b4c4e=_0x422dc4['sessionPath'](_0x7d6f69,md5(_0x2ab2dd));var _0xfd5daa={'session':_0x2b4c4e,'queryInput':{'text':{'text':_0x43a270,'languageCode':_0x5661d6}}};return _0x422dc4[_0x5ff5('0x6a')](_0xfd5daa)[_0x5ff5('0x2c')](function(_0x503a27){if(_0x503a27&&_0x503a27[_0x5ff5('0x4a')]){logger[_0x5ff5('0x1c')]('Dialogflow\x20V2\x20response:',JSON[_0x5ff5('0x44')](_0x503a27));var _0x1523c6=_0x503a27[0x0];if(_0x1523c6){var _0x6dd057={'action':_0x1523c6['queryResult']['action'],'allRequiredParamsPresent':_0x1523c6['queryResult'][_0x5ff5('0x6b')],'endConversation':_0x1523c6[_0x5ff5('0x6c')]['diagnosticInfo']&&_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x6d')][_0x5ff5('0x6e')]?_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x6d')][_0x5ff5('0x6e')][_0x5ff5('0x6f')][_0x5ff5('0x70')]:![],'fulfillmentText':_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x71')],'intentName':_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x72')]['name'],'intentDisplayName':_0x1523c6['queryResult'][_0x5ff5('0x72')][_0x5ff5('0x73')],'isFallbackIntent':_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x72')][_0x5ff5('0x74')],'languageCode':_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x75')],'queryText':_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x76')],'responseId':_0x1523c6[_0x5ff5('0x77')],'score':_0x1523c6[_0x5ff5('0x6c')]['intentDetectionConfidence'],'speech':_0x1523c6[_0x5ff5('0x6c')][_0x5ff5('0x71')],'providerResponse':JSON[_0x5ff5('0x44')](_0x503a27)};return _0x6dd057;}}});};exports['tildeASR']=function(_0x4500e3,_0x69cfc2,_0x392500,_0x44f03a){return tilde['asr'](_0x4500e3,_0x69cfc2,_0x392500,_0x44f03a)[_0x5ff5('0x2c')](function(_0x14384d){try{fs[_0x5ff5('0x2d')](_0x4500e3);}catch(_0x5b9526){logger[_0x5ff5('0x16')](_0x5b9526);}logger['info'](_0x5ff5('0x78'),_0x14384d[_0x5ff5('0x53')]);logger['info'](_0x5ff5('0x79'),_0x14384d[_0x5ff5('0x55')]);return _0x14384d;});};exports['awsPolly']=function(_0x5e0329,_0x13b740,_0x1664cf,_0x4b401a,_0x42f019,_0x2393e9){var _0xd568f8=path['resolve'](__dirname,_0x5ff5('0x3a'),rs['generate'](0x4)+'.mp3');var _0x259676;return aws[_0x5ff5('0x7a')](_0x5e0329,_0x13b740,_0x1664cf,_0x4b401a,_0x42f019,_0x2393e9,_0xd568f8)[_0x5ff5('0x2c')](function(){_0x259676=path[_0x5ff5('0x27')](__dirname,_0x5ff5('0x3a'),rs['generate'](0x4)+_0x5ff5('0x29'));return convertFile(_0xd568f8,_0x259676);})[_0x5ff5('0x2c')](function(){try{fs[_0x5ff5('0x2d')](_0xd568f8);fs[_0x5ff5('0x3e')](_0x259676,_0x5ff5('0x2e'));}catch(_0x1b7f94){logger[_0x5ff5('0x16')](_0x1b7f94);}return _0x259676[_0x5ff5('0x2f')]('.')[0x0];});};exports[_0x5ff5('0x7b')]=function(_0x2fcaa2,_0x5dd0f3,_0x3099ae,_0x41ab52,_0x22ff40,_0x364d94){return aws[_0x5ff5('0x7c')](_0x2fcaa2,_0x5dd0f3,_0x3099ae,_0x41ab52,_0x22ff40,_0x364d94)[_0x5ff5('0x2c')](function(_0x1c18c2){logger[_0x5ff5('0x1c')](JSON['stringify'](_0x1c18c2));return _0x1c18c2;});};exports[_0x5ff5('0x7d')]=function(_0x31d184,_0x1f65e2,_0x476357,_0xaa23dc){var _0xe70712=util[_0x5ff5('0x7e')](_0x5ff5('0x7f'),ISPEECH_API,_0x31d184,encodeURIComponent(_0x1f65e2),_0x476357,_0xaa23dc);var _0x5a2030=path[_0x5ff5('0x27')](__dirname,'tmp',rs[_0x5ff5('0x28')](0x4)+_0x5ff5('0x3b'));var _0x421ab6;return downloadFile(_0xe70712,_0x5a2030)[_0x5ff5('0x2c')](function(){_0x421ab6=path[_0x5ff5('0x27')](__dirname,_0x5ff5('0x3a'),rs[_0x5ff5('0x28')](0x4)+_0x5ff5('0x29'));return convertFile(_0x5a2030,_0x421ab6);})[_0x5ff5('0x2c')](function(){try{fs[_0x5ff5('0x2d')](_0x5a2030);fs['chmodSync'](_0x421ab6,_0x5ff5('0x2e'));}catch(_0x193baa){logger[_0x5ff5('0x16')](_0x193baa);}return _0x421ab6['split']('.')[0x0];});};exports[_0x5ff5('0x80')]=function(_0x39e9e9,_0x22d71e,_0x4934dd,_0x9acc81){var _0x2e87ee=util[_0x5ff5('0x7e')](_0x5ff5('0x81'),ISPEECH_API,_0x22d71e,_0x4934dd,base64Encode(_0x39e9e9),_0x9acc81?util['format']('model=%s',encodeURIComponent(_0x9acc81)):_0x5ff5('0x82'));return uploadFile(_0x2e87ee)[_0x5ff5('0x2c')](function(_0x4de03f){return querystring['parse'](_0x4de03f);});};exports[_0x5ff5('0x83')]=function(_0x1af0b3,_0x365077){return sestek['nda'](_0x1af0b3,_0x365077)[_0x5ff5('0x2c')](function(_0x4e5ca4){logger['info'](JSON['stringify'](_0x4e5ca4));var _0x162621={'speech':_0x4e5ca4[_0x5ff5('0x84')],'action':_0x4e5ca4[_0x5ff5('0x85')]?_0x4e5ca4['channelData'][_0x5ff5('0x86')]:undefined,'actiondata':_0x4e5ca4[_0x5ff5('0x85')]?_0x4e5ca4[_0x5ff5('0x85')][_0x5ff5('0x87')]:undefined};if(_0x4e5ca4[_0x5ff5('0x85')]&&_0x4e5ca4['channelData'][_0x5ff5('0x88')]){return base64Decode(_0x4e5ca4[_0x5ff5('0x85')][_0x5ff5('0x88')][_0x5ff5('0x89')],path[_0x5ff5('0x27')](__dirname,_0x5ff5('0x3a'),rs[_0x5ff5('0x28')](0x4)+'.wav'))[_0x5ff5('0x2c')](function(_0x5c2a9d){_0x162621['audiofile']=_0x5c2a9d;return _0x162621;});}return _0x162621;});};exports['dirName']=function(){return __dirname;};