Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / config / schedule / transcribe.js
index 483ebcb..1ec8560 100644 (file)
@@ -1 +1 @@
-const a852_0x18ca=['[RECORDING:%d]\x20Get\x20transcript','TranscriptionJobStatus','data2','TranscriptionJob','update','util','findOne','transcribeName','inspect','data1','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','push','Comprehend','tempSentiment','VoiceRecording','sentimentAccountId','transcribe','bucket','Neutral','transcript','request-promise-native','../../mysqldb','then','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','transcribeRegion','FAILED','Transcribe\x20not\x20configured','Cloud\x20Provider\x20not\x20available','transcribeAccountId','aws-sdk','sentiment','getTranscriptionJob','Negative','Sentiment\x20Analysis\x20not\x20configured','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','../../config/logger','name','Mixed','detectSentiment','CloudProvider','results','SequelizeValidationError','Settings\x20not\x20available','findAll','resolve','all','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','start','substring','TranscriptFileUri','[RECORDING:%d]\x20Transcript\x20downloaded','IN_PROGRESS','sentimentRegion','Transcript','info','length','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','format','Transcript\x20not\x20available','COMPLETED','fileText','Positive','language','catch','Sentiment','Cloud\x20Provider\x20not\x20configured','transcripts','error','SentimentScore','Sentiment\x20Analysis\x20not\x20requested'];(function(_0x224339,_0x18cae2){const _0x176e72=function(_0x382b88){while(--_0x382b88){_0x224339['push'](_0x224339['shift']());}};_0x176e72(++_0x18cae2);}(a852_0x18ca,0x1dd));const a852_0x176e=function(_0x224339,_0x18cae2){_0x224339=_0x224339-0x0;let _0x176e72=a852_0x18ca[_0x224339];return _0x176e72;};const _0x43d0e4=a852_0x176e,AWS=require(_0x43d0e4('0x38')),rp=require(_0x43d0e4('0x2f')),util=require(_0x43d0e4('0x20')),db=require(_0x43d0e4('0x30'))['db'],{ValidationError}=require('sequelize'),logger=require(_0x43d0e4('0x3f'))(_0x43d0e4('0x2b'));function getTranscriptionJob(_0x382b88,_0x24be92,_0x558f54,_0x441155){return new Promise(function(_0x527f6a,_0x11de8f){const _0x5558fa=a852_0x176e,_0x1446f4=new AWS['TranscribeService']({'accessKeyId':_0x24be92,'secretAccessKey':_0x382b88,'region':_0x558f54});_0x1446f4[_0x5558fa('0x3a')]({'TranscriptionJobName':_0x441155},function(_0x491e96,_0x49d67f){return _0x491e96?_0x11de8f(_0x491e96):_0x527f6a(_0x49d67f);});});}function sentiment(_0x858484,_0x1733af,_0x3ae33e,_0x525c12,_0x4269b6){return new Promise(function(_0x13847d,_0x492f18){const _0x4b0194=a852_0x176e,_0x4a8bfd=new AWS[(_0x4b0194('0x27'))]({'accessKeyId':_0x1733af,'secretAccessKey':_0x858484,'region':_0x3ae33e});_0x4a8bfd[_0x4b0194('0x42')]({'Text':_0x525c12,'LanguageCode':_0x4269b6[_0x4b0194('0x5')](0x0,0x2)},function(_0x5c4356,_0x595a6d){return _0x5c4356?_0x492f18(_0x5c4356):_0x13847d(_0x595a6d);});});}function checkTranscribeJob(_0x1bccfe,_0x654d35,_0x2c20e6){let _0x4c7a04;return new Promise(function(_0x1815b1){const _0x3593e3=a852_0x176e;return logger[_0x3593e3('0xb')](util[_0x3593e3('0xe')](_0x3593e3('0x3d'),_0x1bccfe['id'],_0x1bccfe[_0x3593e3('0x22')])),getTranscriptionJob(_0x2c20e6['data1'],_0x2c20e6['data2'],_0x654d35[_0x3593e3('0x33')],_0x1bccfe['transcribeName'])['then'](function(_0x4db1df){const _0x5dfa15=_0x3593e3;logger[_0x5dfa15('0xb')](util[_0x5dfa15('0xe')](_0x5dfa15('0xd'),_0x1bccfe['id'],_0x1bccfe[_0x5dfa15('0x22')],_0x4db1df[_0x5dfa15('0x1e')][_0x5dfa15('0x1c')]));if(!_0x1bccfe[_0x5dfa15('0x11')])switch(_0x4db1df[_0x5dfa15('0x1e')]['TranscriptionJobStatus']){case _0x5dfa15('0x10'):{const _0x3a7a4c={'transcribeStatus':_0x4db1df['TranscriptionJob'][_0x5dfa15('0x1c')],'fileUri':_0x4db1df['TranscriptionJob'][_0x5dfa15('0xa')]['TranscriptFileUri']};return logger['info'](util[_0x5dfa15('0xe')](_0x5dfa15('0x1b'),_0x1bccfe['id'])),rp({'uri':_0x4db1df[_0x5dfa15('0x1e')][_0x5dfa15('0xa')][_0x5dfa15('0x6')],'json':!![]})[_0x5dfa15('0x31')](function(_0xdb796d){const _0x2b2d72=_0x5dfa15;logger['info'](util[_0x2b2d72('0xe')](_0x2b2d72('0x7'),_0x1bccfe['id']));if(_0xdb796d&&_0xdb796d['results']&&_0xdb796d[_0x2b2d72('0x44')][_0x2b2d72('0x17')]&&_0xdb796d[_0x2b2d72('0x44')][_0x2b2d72('0x17')]['length']){_0x3a7a4c[_0x2b2d72('0x11')]='';for(let _0x204a40=0x0;_0x204a40<_0xdb796d[_0x2b2d72('0x44')]['transcripts'][_0x2b2d72('0xc')];_0x204a40++){_0x3a7a4c[_0x2b2d72('0x11')]+=_0xdb796d[_0x2b2d72('0x44')][_0x2b2d72('0x17')][_0x204a40][_0x2b2d72('0x2e')]+'';}}return _0x1bccfe[_0x2b2d72('0x1f')](_0x3a7a4c);})[_0x5dfa15('0x31')](function(){const _0x3ec91b=_0x5dfa15;logger[_0x3ec91b('0xb')](util[_0x3ec91b('0xe')](_0x3ec91b('0x3'),_0x1bccfe['id']));if(!_0x1bccfe['tempSentiment'])throw new ValidationError(_0x3ec91b('0x1a'));if(!_0x654d35[_0x3ec91b('0x39')]||!_0x654d35[_0x3ec91b('0x2a')]||!_0x654d35[_0x3ec91b('0x9')]||!_0x654d35['language']||!_0x654d35[_0x3ec91b('0x2c')])throw new ValidationError(_0x3ec91b('0x3c'));if(!_0x3a7a4c[_0x3ec91b('0x11')])throw new Error(_0x3ec91b('0xf'));return _0x654d35[_0x3ec91b('0x2a')]===_0x2c20e6['id']?_0x2c20e6:db[_0x3ec91b('0x43')]['findOne']({'where':{'id':_0x654d35['sentimentAccountId']}});})[_0x5dfa15('0x31')](function(_0x655ab){const _0x3ddbad=_0x5dfa15;if(!_0x655ab)throw new ValidationError(_0x3ddbad('0x36'));if(!_0x655ab['data1']||!_0x655ab['data2'])throw new ValidationError(_0x3ddbad('0x16'));return _0x4c7a04=_0x655ab,logger[_0x3ddbad('0xb')](util[_0x3ddbad('0xe')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x1bccfe['id'])),sentiment(_0x4c7a04[_0x3ddbad('0x24')],_0x4c7a04[_0x3ddbad('0x1d')],_0x654d35['sentimentRegion'],_0x3a7a4c['fileText'],_0x654d35[_0x3ddbad('0x13')]);})[_0x5dfa15('0x31')](function(_0x446eee){const _0xd01f7e=_0x5dfa15;return logger[_0xd01f7e('0xb')](util[_0xd01f7e('0xe')](_0xd01f7e('0x3e'),_0x1bccfe['id'])),_0x1bccfe[_0xd01f7e('0x1f')]({'sentiment':_0x446eee[_0xd01f7e('0x15')],'sPositive':_0x446eee[_0xd01f7e('0x19')][_0xd01f7e('0x12')],'sNegative':_0x446eee['SentimentScore'][_0xd01f7e('0x3b')],'sMixed':_0x446eee[_0xd01f7e('0x19')][_0xd01f7e('0x41')],'sNeutral':_0x446eee[_0xd01f7e('0x19')][_0xd01f7e('0x2d')]});})[_0x5dfa15('0x31')](function(){const _0x369326=_0x5dfa15;logger[_0x369326('0xb')](util[_0x369326('0xe')](_0x369326('0x3'),_0x1bccfe['id'])),_0x1815b1();});}case'FAILED':return _0x1bccfe[_0x5dfa15('0x1f')]({'transcribeStatus':_0x5dfa15('0x34'),'failureReason':_0x4db1df[_0x5dfa15('0x1e')]['FailureReason']})[_0x5dfa15('0x31')](function(){const _0x599c8f=_0x5dfa15;logger['info'](util[_0x599c8f('0xe')](_0x599c8f('0x3'),_0x1bccfe['id'])),_0x1815b1();});default:logger[_0x5dfa15('0xb')](util['format'](_0x5dfa15('0x25'),_0x1bccfe['id']));break;}else return Promise[_0x5dfa15('0x0')]()[_0x5dfa15('0x31')](function(){const _0x45d370=_0x5dfa15;if(!_0x1bccfe[_0x45d370('0x28')])throw new ValidationError('Sentiment\x20Analysis\x20not\x20requested');if(!_0x654d35[_0x45d370('0x39')]||!_0x654d35['sentimentAccountId']||!_0x654d35['sentimentRegion']||!_0x654d35[_0x45d370('0x13')]||!_0x654d35[_0x45d370('0x2c')])throw new ValidationError('Sentiment\x20Analysis\x20not\x20configured');if(!_0x1bccfe[_0x45d370('0x11')])throw new Error('Transcript\x20not\x20available');return _0x654d35[_0x45d370('0x2a')]===_0x2c20e6['id']?_0x2c20e6:db[_0x45d370('0x43')]['findOne']({'where':{'id':_0x654d35['sentimentAccountId']}});})[_0x5dfa15('0x31')](function(_0x12c2bb){const _0x230902=_0x5dfa15;if(!_0x12c2bb)throw new ValidationError(_0x230902('0x36'));if(!_0x12c2bb[_0x230902('0x24')]||!_0x12c2bb[_0x230902('0x1d')])throw new ValidationError(_0x230902('0x16'));return _0x4c7a04=_0x12c2bb,logger['info'](util[_0x230902('0xe')](_0x230902('0x32'),_0x1bccfe['id'])),sentiment(_0x4c7a04[_0x230902('0x24')],_0x4c7a04[_0x230902('0x1d')],_0x654d35[_0x230902('0x9')],_0x1bccfe['fileText'],_0x654d35[_0x230902('0x13')]);})[_0x5dfa15('0x31')](function(_0x3309b7){const _0x33261c=_0x5dfa15;return logger[_0x33261c('0xb')](util[_0x33261c('0xe')]('[RECORDING:%d]\x20Sentiment\x20Analysis\x20available',_0x1bccfe['id'])),_0x1bccfe[_0x33261c('0x1f')]({'sentiment':_0x3309b7[_0x33261c('0x15')],'sPositive':_0x3309b7[_0x33261c('0x19')][_0x33261c('0x12')],'sNegative':_0x3309b7[_0x33261c('0x19')][_0x33261c('0x3b')],'sMixed':_0x3309b7[_0x33261c('0x19')][_0x33261c('0x41')],'sNeutral':_0x3309b7[_0x33261c('0x19')][_0x33261c('0x2d')],'transcribeStatus':_0x33261c('0x10')});})['then'](function(){const _0x48e920=_0x5dfa15;logger[_0x48e920('0xb')](util[_0x48e920('0xe')](_0x48e920('0x3'),_0x1bccfe['id'])),_0x1815b1();});})['catch'](function(_0x50cd55){const _0x20df51=_0x3593e3;_0x50cd55&&((!_0x50cd55[_0x20df51('0x40')]||_0x50cd55['name']!==_0x20df51('0x45'))&&logger[_0x20df51('0x18')](util[_0x20df51('0xe')](_0x20df51('0x2'),_0x1bccfe['id']),util['inspect'](_0x50cd55,{'showHidden':![],'depth':null}))),_0x1815b1();});});}function checkTranscribe(){const _0x1ff895=_0x43d0e4;let _0x415195,_0xac7987,_0x27605e;return db[_0x1ff895('0x29')][_0x1ff895('0x47')]({'where':{'transcribeStatus':_0x1ff895('0x8')}})[_0x1ff895('0x31')](function(_0x44a4f7){const _0x276f17=_0x1ff895;if(!_0x44a4f7||!_0x44a4f7[_0x276f17('0xc')])throw new ValidationError('No\x20transcribe\x20job\x20to\x20check');return _0x415195=_0x44a4f7,db['Setting'][_0x276f17('0x21')]({'where':{'id':0x1}});})[_0x1ff895('0x31')](function(_0x42027a){const _0x57957a=_0x1ff895;if(!_0x42027a)throw new ValidationError(_0x57957a('0x46'));_0xac7987=_0x42027a;if(!_0xac7987[_0x57957a('0x2b')]||!_0xac7987[_0x57957a('0x37')]||!_0xac7987[_0x57957a('0x33')]||!_0xac7987[_0x57957a('0x13')]||!_0xac7987[_0x57957a('0x2c')])throw new ValidationError(_0x57957a('0x35'));return db['CloudProvider'][_0x57957a('0x21')]({'where':{'id':_0xac7987[_0x57957a('0x37')]}});})[_0x1ff895('0x31')](function(_0x37cf6c){const _0x2087cc=_0x1ff895;if(!_0x37cf6c)throw new ValidationError(_0x2087cc('0x36'));if(!_0x37cf6c[_0x2087cc('0x24')]||!_0x37cf6c[_0x2087cc('0x1d')])throw new ValidationError(_0x2087cc('0x16'));_0x27605e=_0x37cf6c;const _0x2c67be=[];return _0x415195['forEach'](function(_0x2540d3){const _0x396900=_0x2087cc;_0x2c67be[_0x396900('0x26')](checkTranscribeJob(_0x2540d3,_0xac7987,_0x27605e));}),Promise[_0x2087cc('0x1')](_0x2c67be);})[_0x1ff895('0x14')](function(_0x194d7d){const _0x150263=_0x1ff895;_0x194d7d&&((!_0x194d7d[_0x150263('0x40')]||_0x194d7d['name']!=='SequelizeValidationError')&&logger[_0x150263('0x18')](util[_0x150263('0x23')](_0x194d7d,{'showHidden':![],'depth':null})));});}exports[_0x43d0e4('0x4')]=function(){return setInterval(function(){return checkTranscribe();},0x3c*0x3e8),checkTranscribe();};
\ No newline at end of file
+const a851_0x4ac7=['tempSentiment','language','[RECORDING:%d]\x20Transcript\x20downloaded','push','all','Setting','inspect','info','IN_PROGRESS','request-promise-native','length','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','No\x20transcribe\x20job\x20to\x20check','then','Mixed','transcribeRegion','transcribeAccountId','fileText','Negative','Sentiment','Transcript','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','sentimentRegion','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','findAll','transcripts','SentimentScore','catch','TranscriptionJob','format','Cloud\x20Provider\x20not\x20configured','substring','COMPLETED','CloudProvider','data2','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','TranscriptionJobStatus','sentiment','sequelize','TranscriptFileUri','transcript','resolve','Cloud\x20Provider\x20not\x20available','util','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','update','VoiceRecording','results','../../config/logger','start','SequelizeValidationError','transcribe','forEach','../../mysqldb','Transcript\x20not\x20available','getTranscriptionJob','Positive','findOne','FAILED','Neutral','sentimentAccountId','Sentiment\x20Analysis\x20not\x20configured','name','aws-sdk','FailureReason','bucket','[RECORDING:%d]\x20Get\x20transcript','Comprehend','data1','Sentiment\x20Analysis\x20not\x20requested','TranscribeService'];(function(_0x46f0b5,_0x4ac7c3){const _0x92f475=function(_0x2763a1){while(--_0x2763a1){_0x46f0b5['push'](_0x46f0b5['shift']());}};_0x92f475(++_0x4ac7c3);}(a851_0x4ac7,0x113));const a851_0x92f4=function(_0x46f0b5,_0x4ac7c3){_0x46f0b5=_0x46f0b5-0x0;let _0x92f475=a851_0x4ac7[_0x46f0b5];return _0x92f475;};const _0xc74842=a851_0x92f4,AWS=require(_0xc74842('0x5')),rp=require(_0xc74842('0x16')),util=require(_0xc74842('0x39')),db=require(_0xc74842('0x43'))['db'],{ValidationError}=require(_0xc74842('0x34')),logger=require(_0xc74842('0x3e'))(_0xc74842('0x41'));function getTranscriptionJob(_0x2763a1,_0x267950,_0xa94344,_0x41264c){return new Promise(function(_0x1c4c56,_0x4100c3){const _0x10240b=a851_0x92f4,_0x1a09b4=new AWS[(_0x10240b('0xc'))]({'accessKeyId':_0x267950,'secretAccessKey':_0x2763a1,'region':_0xa94344});_0x1a09b4[_0x10240b('0x45')]({'TranscriptionJobName':_0x41264c},function(_0x13e631,_0x377298){return _0x13e631?_0x4100c3(_0x13e631):_0x1c4c56(_0x377298);});});}function sentiment(_0x5b03e2,_0xeb81f1,_0x240f92,_0xbb1713,_0x475aa0){return new Promise(function(_0xbe12fc,_0x554b29){const _0x2f3cd9=a851_0x92f4,_0x24e2fa=new AWS[(_0x2f3cd9('0x9'))]({'accessKeyId':_0xeb81f1,'secretAccessKey':_0x5b03e2,'region':_0x240f92});_0x24e2fa['detectSentiment']({'Text':_0xbb1713,'LanguageCode':_0x475aa0[_0x2f3cd9('0x2d')](0x0,0x2)},function(_0x13660e,_0x5d4074){return _0x13660e?_0x554b29(_0x13660e):_0xbe12fc(_0x5d4074);});});}function checkTranscribeJob(_0x5e5877,_0x1eecf8,_0x9ebcbf){let _0x229ba3;return new Promise(function(_0x41b1d5){const _0x13ee87=a851_0x92f4;return logger[_0x13ee87('0x14')](util['format']('[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)',_0x5e5877['id'],_0x5e5877['transcribeName'])),getTranscriptionJob(_0x9ebcbf[_0x13ee87('0xa')],_0x9ebcbf['data2'],_0x1eecf8[_0x13ee87('0x1c')],_0x5e5877['transcribeName'])[_0x13ee87('0x1a')](function(_0x65f326){const _0x206fe5=_0x13ee87;logger[_0x206fe5('0x14')](util['format'](_0x206fe5('0x3a'),_0x5e5877['id'],_0x5e5877['transcribeName'],_0x65f326[_0x206fe5('0x2a')][_0x206fe5('0x32')]));if(!_0x5e5877[_0x206fe5('0x1e')])switch(_0x65f326['TranscriptionJob'][_0x206fe5('0x32')]){case'COMPLETED':{const _0x1b1b31={'transcribeStatus':_0x65f326[_0x206fe5('0x2a')][_0x206fe5('0x32')],'fileUri':_0x65f326[_0x206fe5('0x2a')][_0x206fe5('0x21')][_0x206fe5('0x35')]};return logger['info'](util[_0x206fe5('0x2b')](_0x206fe5('0x8'),_0x5e5877['id'])),rp({'uri':_0x65f326[_0x206fe5('0x2a')][_0x206fe5('0x21')][_0x206fe5('0x35')],'json':!![]})[_0x206fe5('0x1a')](function(_0x23ba03){const _0x468f1f=_0x206fe5;logger[_0x468f1f('0x14')](util[_0x468f1f('0x2b')](_0x468f1f('0xf'),_0x5e5877['id']));if(_0x23ba03&&_0x23ba03['results']&&_0x23ba03['results'][_0x468f1f('0x27')]&&_0x23ba03[_0x468f1f('0x3d')][_0x468f1f('0x27')][_0x468f1f('0x17')]){_0x1b1b31[_0x468f1f('0x1e')]='';for(let _0x386461=0x0;_0x386461<_0x23ba03['results'][_0x468f1f('0x27')][_0x468f1f('0x17')];_0x386461++){_0x1b1b31['fileText']+=_0x23ba03[_0x468f1f('0x3d')][_0x468f1f('0x27')][_0x386461][_0x468f1f('0x36')]+'';}}return _0x5e5877[_0x468f1f('0x3b')](_0x1b1b31);})[_0x206fe5('0x1a')](function(){const _0x108501=_0x206fe5;logger[_0x108501('0x14')](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x5e5877['id']));if(!_0x5e5877['tempSentiment'])throw new ValidationError(_0x108501('0xb'));if(!_0x1eecf8['sentiment']||!_0x1eecf8['sentimentAccountId']||!_0x1eecf8[_0x108501('0x24')]||!_0x1eecf8['language']||!_0x1eecf8['bucket'])throw new ValidationError(_0x108501('0x3'));if(!_0x1b1b31[_0x108501('0x1e')])throw new Error('Transcript\x20not\x20available');return _0x1eecf8[_0x108501('0x2')]===_0x9ebcbf['id']?_0x9ebcbf:db[_0x108501('0x2f')][_0x108501('0x47')]({'where':{'id':_0x1eecf8[_0x108501('0x2')]}});})[_0x206fe5('0x1a')](function(_0x36555d){const _0x7dafc5=_0x206fe5;if(!_0x36555d)throw new ValidationError(_0x7dafc5('0x38'));if(!_0x36555d[_0x7dafc5('0xa')]||!_0x36555d[_0x7dafc5('0x30')])throw new ValidationError(_0x7dafc5('0x2c'));return _0x229ba3=_0x36555d,logger['info'](util[_0x7dafc5('0x2b')](_0x7dafc5('0x18'),_0x5e5877['id'])),sentiment(_0x229ba3[_0x7dafc5('0xa')],_0x229ba3['data2'],_0x1eecf8[_0x7dafc5('0x24')],_0x1b1b31['fileText'],_0x1eecf8[_0x7dafc5('0xe')]);})[_0x206fe5('0x1a')](function(_0x357e2d){const _0x40cd49=_0x206fe5;return logger[_0x40cd49('0x14')](util['format'](_0x40cd49('0x31'),_0x5e5877['id'])),_0x5e5877[_0x40cd49('0x3b')]({'sentiment':_0x357e2d[_0x40cd49('0x20')],'sPositive':_0x357e2d[_0x40cd49('0x28')][_0x40cd49('0x46')],'sNegative':_0x357e2d[_0x40cd49('0x28')][_0x40cd49('0x1f')],'sMixed':_0x357e2d[_0x40cd49('0x28')][_0x40cd49('0x1b')],'sNeutral':_0x357e2d[_0x40cd49('0x28')][_0x40cd49('0x1')]});})['then'](function(){const _0x1d573e=_0x206fe5;logger[_0x1d573e('0x14')](util['format'](_0x1d573e('0x25'),_0x5e5877['id'])),_0x41b1d5();});}case _0x206fe5('0x0'):return _0x5e5877['update']({'transcribeStatus':_0x206fe5('0x0'),'failureReason':_0x65f326[_0x206fe5('0x2a')][_0x206fe5('0x6')]})[_0x206fe5('0x1a')](function(){logger['info'](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x5e5877['id'])),_0x41b1d5();});default:logger[_0x206fe5('0x14')](util[_0x206fe5('0x2b')]('[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed',_0x5e5877['id']));break;}else return Promise[_0x206fe5('0x37')]()[_0x206fe5('0x1a')](function(){const _0x31be2c=_0x206fe5;if(!_0x5e5877[_0x31be2c('0xd')])throw new ValidationError(_0x31be2c('0xb'));if(!_0x1eecf8[_0x31be2c('0x33')]||!_0x1eecf8['sentimentAccountId']||!_0x1eecf8[_0x31be2c('0x24')]||!_0x1eecf8[_0x31be2c('0xe')]||!_0x1eecf8[_0x31be2c('0x7')])throw new ValidationError(_0x31be2c('0x3'));if(!_0x5e5877[_0x31be2c('0x1e')])throw new Error(_0x31be2c('0x44'));return _0x1eecf8[_0x31be2c('0x2')]===_0x9ebcbf['id']?_0x9ebcbf:db[_0x31be2c('0x2f')][_0x31be2c('0x47')]({'where':{'id':_0x1eecf8[_0x31be2c('0x2')]}});})[_0x206fe5('0x1a')](function(_0x500412){const _0x5746b1=_0x206fe5;if(!_0x500412)throw new ValidationError(_0x5746b1('0x38'));if(!_0x500412[_0x5746b1('0xa')]||!_0x500412[_0x5746b1('0x30')])throw new ValidationError(_0x5746b1('0x2c'));return _0x229ba3=_0x500412,logger[_0x5746b1('0x14')](util[_0x5746b1('0x2b')](_0x5746b1('0x18'),_0x5e5877['id'])),sentiment(_0x229ba3[_0x5746b1('0xa')],_0x229ba3[_0x5746b1('0x30')],_0x1eecf8['sentimentRegion'],_0x5e5877['fileText'],_0x1eecf8[_0x5746b1('0xe')]);})[_0x206fe5('0x1a')](function(_0x3b2e11){const _0x4757c6=_0x206fe5;return logger[_0x4757c6('0x14')](util[_0x4757c6('0x2b')](_0x4757c6('0x31'),_0x5e5877['id'])),_0x5e5877['update']({'sentiment':_0x3b2e11[_0x4757c6('0x20')],'sPositive':_0x3b2e11[_0x4757c6('0x28')]['Positive'],'sNegative':_0x3b2e11[_0x4757c6('0x28')]['Negative'],'sMixed':_0x3b2e11['SentimentScore'][_0x4757c6('0x1b')],'sNeutral':_0x3b2e11['SentimentScore']['Neutral'],'transcribeStatus':_0x4757c6('0x2e')});})['then'](function(){const _0x469b17=_0x206fe5;logger[_0x469b17('0x14')](util[_0x469b17('0x2b')](_0x469b17('0x25'),_0x5e5877['id'])),_0x41b1d5();});})[_0x13ee87('0x29')](function(_0x45e817){const _0x280bf6=_0x13ee87;_0x45e817&&((!_0x45e817[_0x280bf6('0x4')]||_0x45e817[_0x280bf6('0x4')]!==_0x280bf6('0x40'))&&logger[_0x280bf6('0x22')](util[_0x280bf6('0x2b')](_0x280bf6('0x23'),_0x5e5877['id']),util['inspect'](_0x45e817,{'showHidden':![],'depth':null}))),_0x41b1d5();});});}function checkTranscribe(){const _0x5acfda=_0xc74842;let _0x3b95dc,_0xe58e74,_0x580703;return db[_0x5acfda('0x3c')][_0x5acfda('0x26')]({'where':{'transcribeStatus':_0x5acfda('0x15')}})[_0x5acfda('0x1a')](function(_0x73db6b){const _0x404633=_0x5acfda;if(!_0x73db6b||!_0x73db6b[_0x404633('0x17')])throw new ValidationError(_0x404633('0x19'));return _0x3b95dc=_0x73db6b,db[_0x404633('0x12')][_0x404633('0x47')]({'where':{'id':0x1}});})[_0x5acfda('0x1a')](function(_0x1df2ec){const _0x2b5603=_0x5acfda;if(!_0x1df2ec)throw new ValidationError('Settings\x20not\x20available');_0xe58e74=_0x1df2ec;if(!_0xe58e74[_0x2b5603('0x41')]||!_0xe58e74[_0x2b5603('0x1d')]||!_0xe58e74[_0x2b5603('0x1c')]||!_0xe58e74[_0x2b5603('0xe')]||!_0xe58e74[_0x2b5603('0x7')])throw new ValidationError('Transcribe\x20not\x20configured');return db[_0x2b5603('0x2f')][_0x2b5603('0x47')]({'where':{'id':_0xe58e74[_0x2b5603('0x1d')]}});})[_0x5acfda('0x1a')](function(_0x43c01a){const _0x7bb140=_0x5acfda;if(!_0x43c01a)throw new ValidationError('Cloud\x20Provider\x20not\x20available');if(!_0x43c01a[_0x7bb140('0xa')]||!_0x43c01a[_0x7bb140('0x30')])throw new ValidationError(_0x7bb140('0x2c'));_0x580703=_0x43c01a;const _0x1b17a0=[];return _0x3b95dc[_0x7bb140('0x42')](function(_0x1459bb){const _0x53e56b=_0x7bb140;_0x1b17a0[_0x53e56b('0x10')](checkTranscribeJob(_0x1459bb,_0xe58e74,_0x580703));}),Promise[_0x7bb140('0x11')](_0x1b17a0);})[_0x5acfda('0x29')](function(_0x1aa7cb){const _0x7f0dde=_0x5acfda;_0x1aa7cb&&((!_0x1aa7cb['name']||_0x1aa7cb['name']!=='SequelizeValidationError')&&logger['error'](util[_0x7f0dde('0x13')](_0x1aa7cb,{'showHidden':![],'depth':null})));});}exports[_0xc74842('0x3f')]=function(){return setInterval(function(){return checkTranscribe();},0x3c*0x3e8),checkTranscribe();};
\ No newline at end of file