Built motion from commit f7831a8.|0.0.80
[motion.git] / server / api / sound / sound.controller.js
index fc98686..158370f 100644 (file)
@@ -1 +1 @@
-var _0x9dbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x53\x6F\x75\x6E\x64\x73","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0x9dbb[0];var _=require(_0x9dbb[1]);var Sound=require(_0x9dbb[3])[_0x9dbb[2]];var uploadFile=require(_0x9dbb[4]);var sr=require(_0x9dbb[5]);var sox=require(_0x9dbb[6]);var path=require(_0x9dbb[7]);var config=require(_0x9dbb[8]);var fs=require(_0x9dbb[9]);var sequelize=require(_0x9dbb[3])[_0x9dbb[10]];var base64=require(_0x9dbb[11]);var Promise=require(_0x9dbb[12]);exports[_0x9dbb[13]]=function(_0xa1a0xc,_0xa1a0xd){Sound[_0x9dbb[18]]()[_0x9dbb[17]](function(_0xa1a0xf){return _0xa1a0xd[_0x9dbb[16]](200)[_0x9dbb[15]](_0xa1a0xf)})[_0x9dbb[14]](function(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)})};exports[_0x9dbb[19]]=function(_0xa1a0xc,_0xa1a0xd){Sound[_0x9dbb[23]](_0xa1a0xc[_0x9dbb[22]][_0x9dbb[21]])[_0x9dbb[17]](function(Sound){if(!Sound){return _0xa1a0xd[_0x9dbb[20]](404)};return _0xa1a0xd[_0x9dbb[15]](Sound)})[_0x9dbb[14]](function(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)})};exports[_0x9dbb[24]]=function(_0xa1a0xc,_0xa1a0xd){var _0xa1a0x10= new uploadFile({dest:path[_0x9dbb[26]](config[_0x9dbb[25]]),maxFileSize:15*1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xa1a0x11,_0xa1a0x12){return sr()+path[_0x9dbb[28]](_0xa1a0x12[_0x9dbb[27]])},messages:{maxNumberOfFiles:_0x9dbb[29],acceptFileTypes:_0x9dbb[30],maxFileSize:_0x9dbb[31],invalidRequest:_0x9dbb[32]}});_0xa1a0x10[_0x9dbb[54]](_0x9dbb[33],function(_0xa1a0x13,_0xa1a0x14){if(!_0xa1a0x14[_0x9dbb[34]][_0x9dbb[27]]){return _0xa1a0xd[_0x9dbb[16]](500)[_0x9dbb[15]](_0xa1a0x10)};var _0xa1a0x15={};var _0xa1a0x16=path[_0x9dbb[28]](_0xa1a0x14[_0x9dbb[34]][_0x9dbb[27]]);_0xa1a0x15[_0x9dbb[35]]=_0x9dbb[36];_0xa1a0x15[_0x9dbb[37]]=path[_0x9dbb[28]](_0xa1a0x14[_0x9dbb[34]][_0x9dbb[27]])[_0x9dbb[38]](1);_0xa1a0x15[_0x9dbb[39]]=_0x9dbb[40];_0xa1a0x15[_0x9dbb[41]]=_0xa1a0x15[_0x9dbb[42]]=path[_0x9dbb[43]](_0xa1a0x14[_0x9dbb[34]][_0x9dbb[7]],_0xa1a0x16);_0xa1a0x15[_0x9dbb[44]]=path[_0x9dbb[43]](_0xa1a0x14[_0x9dbb[34]][_0x9dbb[27]],_0xa1a0x16);var _0xa1a0x17=path[_0x9dbb[26]](config[_0x9dbb[25]],_0xa1a0x15[_0x9dbb[44]]+_0xa1a0x16);var _0xa1a0x18=path[_0x9dbb[26]](config[_0x9dbb[45]],_0xa1a0x15[_0x9dbb[44]]+_0x9dbb[46]+_0xa1a0x15[_0x9dbb[39]]);fs[_0x9dbb[48]](_0xa1a0x17,parseInt(_0x9dbb[47],8));sox[_0x9dbb[49]](_0xa1a0x17,function(_0xa1a0xe,_0xa1a0x19){});var _0xa1a0x1a=sox[_0x9dbb[50]](_0xa1a0x17,_0xa1a0x18,{sampleRate:8000,format:_0x9dbb[40],channelCount:1,bitRate:192*1024,compressionQuality:5});_0xa1a0x1a[_0x9dbb[54]](_0x9dbb[51],function(_0xa1a0xe){console[_0x9dbb[51]](_0x9dbb[52],_0xa1a0xe);fs[_0x9dbb[53]](_0xa1a0x17,function(_0xa1a0xe){if(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)}});return handleError(_0xa1a0xd,_0xa1a0xe)});_0xa1a0x1a[_0x9dbb[54]](_0x9dbb[55],function(_0xa1a0x1b,_0xa1a0x1c){});_0xa1a0x1a[_0x9dbb[54]](_0x9dbb[56],function(_0xa1a0x1d){_0xa1a0x15[_0x9dbb[57]]=isNaN(_0xa1a0x1d[_0x9dbb[58]])?null:_0xa1a0x1d[_0x9dbb[58]]*1000;_0xa1a0x15[_0x9dbb[59]]=isNaN(_0xa1a0x1d[_0x9dbb[60]])?null:_0xa1a0x1d[_0x9dbb[60]];_0xa1a0x15[_0x9dbb[61]]=isNaN(_0xa1a0x1d[_0x9dbb[62]])?null:_0xa1a0x1d[_0x9dbb[62]];_0xa1a0x15[_0x9dbb[63]]=isNaN(_0xa1a0x1d[_0x9dbb[64]])?null:_0xa1a0x1d[_0x9dbb[64]];_0xa1a0x15[_0x9dbb[65]]=isNaN(_0xa1a0x1d[_0x9dbb[66]])?null:_0xa1a0x1d[_0x9dbb[66]]});_0xa1a0x1a[_0x9dbb[54]](_0x9dbb[67],function(_0xa1a0x1d){_0xa1a0x15[_0x9dbb[68]]=isNaN(_0xa1a0x1d[_0x9dbb[58]])?null:_0xa1a0x1d[_0x9dbb[58]]*1000;_0xa1a0x15[_0x9dbb[69]]=isNaN(_0xa1a0x1d[_0x9dbb[60]])?null:_0xa1a0x1d[_0x9dbb[60]];_0xa1a0x15[_0x9dbb[70]]=isNaN(_0xa1a0x1d[_0x9dbb[62]])?null:_0xa1a0x1d[_0x9dbb[62]];_0xa1a0x15[_0x9dbb[71]]=isNaN(_0xa1a0x1d[_0x9dbb[64]])?null:_0xa1a0x1d[_0x9dbb[64]];_0xa1a0x15[_0x9dbb[72]]=isNaN(_0xa1a0x1d[_0x9dbb[66]])?null:_0xa1a0x1d[_0x9dbb[66]]});_0xa1a0x1a[_0x9dbb[54]](_0x9dbb[33],function(){console[_0x9dbb[74]](_0x9dbb[73]);fs[_0x9dbb[48]](_0xa1a0x18,parseInt(_0x9dbb[47],8));Sound[_0x9dbb[24]](_0xa1a0x15)[_0x9dbb[17]](function(_0xa1a0x1e){return _0xa1a0xd[_0x9dbb[16]](201)[_0x9dbb[15]](_0xa1a0x1e)})[_0x9dbb[14]](function(_0xa1a0xe){console[_0x9dbb[74]](_0xa1a0xe);return handleError(_0xa1a0xd,_0xa1a0xe)})});_0xa1a0x1a[_0x9dbb[75]]()});_0xa1a0x10[_0x9dbb[54]](_0x9dbb[51],function(_0xa1a0xe){console[_0x9dbb[74]](_0x9dbb[76],_0xa1a0xe);return handleError(_0xa1a0xd,_0xa1a0xe)});_0xa1a0x10[_0x9dbb[77]](_0xa1a0xc)};exports[_0x9dbb[78]]=function(_0xa1a0xc,_0xa1a0xd){if(_0xa1a0xc[_0x9dbb[79]][_0x9dbb[21]]){delete _0xa1a0xc[_0x9dbb[79]][_0x9dbb[21]]};Sound[_0x9dbb[23]](_0xa1a0xc[_0x9dbb[22]][_0x9dbb[21]])[_0x9dbb[17]](function(_0xa1a0x1e){if(!_0xa1a0x1e){return _0xa1a0xd[_0x9dbb[20]](404)};var _0xa1a0x1f=_[_0x9dbb[80]](_0xa1a0x1e,_0xa1a0xc[_0x9dbb[79]]);_0xa1a0x1f[_0x9dbb[81]]()[_0x9dbb[17]](function(){return _0xa1a0xd[_0x9dbb[16]](200)[_0x9dbb[15]](_0xa1a0x1e)})[_0x9dbb[14]](function(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)})})[_0x9dbb[14]](function(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)})};exports[_0x9dbb[82]]=function(_0xa1a0xc,_0xa1a0xd){Sound[_0x9dbb[23]](_0xa1a0xc[_0x9dbb[22]][_0x9dbb[21]])[_0x9dbb[17]](function(_0xa1a0x1e){if(!_0xa1a0x1e){return _0xa1a0xd[_0x9dbb[16]](404)[_0x9dbb[15]](_0xa1a0x1e)};var _0xa1a0x20=path[_0x9dbb[26]](config[_0x9dbb[25]],_0xa1a0x1e[_0x9dbb[44]]+_0x9dbb[46]+_0xa1a0x1e[_0x9dbb[37]]);var _0xa1a0x21=path[_0x9dbb[26]](config[_0x9dbb[45]],_0xa1a0x1e[_0x9dbb[44]]+_0x9dbb[46]+_0xa1a0x1e[_0x9dbb[39]]);return sequelize[_0x9dbb[83]](function(_0xa1a0x22){return _0xa1a0x1e[_0x9dbb[82]]({transaction:_0xa1a0x22})[_0x9dbb[17]](function(){fs[_0x9dbb[53]](_0xa1a0x20,function(_0xa1a0xe){if(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)}});fs[_0x9dbb[53]](_0xa1a0x21,function(_0xa1a0xe){if(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)}});return _0xa1a0xd[_0x9dbb[16]](200)[_0x9dbb[15]](_0xa1a0x1e)})})[_0x9dbb[14]](function(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)})})[_0x9dbb[14]](function(_0xa1a0xe){return handleError(_0xa1a0xd,_0xa1a0xe)})};exports[_0x9dbb[84]]=function(_0xa1a0xc,_0xa1a0xd){getStream(_0xa1a0xc,_0xa1a0xd,_0x9dbb[85])};exports[_0x9dbb[86]]=function(_0xa1a0xc,_0xa1a0xd){getStream(_0xa1a0xc,_0xa1a0xd,_0x9dbb[87])};function getStream(_0xa1a0xc,_0xa1a0xd,_0xa1a0x24){return Sound[_0x9dbb[23]](_0xa1a0xc[_0x9dbb[22]][_0x9dbb[21]])[_0x9dbb[17]](function(_0xa1a0x1e){var _0xa1a0x26=Promise[_0x9dbb[91]](fs[_0x9dbb[90]]);return _0xa1a0x26(path[_0x9dbb[26]](config[_0xa1a0x24+_0x9dbb[92]],_0xa1a0x1e[_0x9dbb[44]]+_0x9dbb[46]+_0xa1a0x1e[_0xa1a0x24+_0x9dbb[93]]))})[_0x9dbb[17]](function(_0xa1a0x19){var _0xa1a0x25= new Buffer(_0xa1a0x19,_0x9dbb[89]).toString(_0x9dbb[88]);return _0xa1a0x25})[_0x9dbb[17]](function(_0xa1a0x25){return _0xa1a0xd[_0x9dbb[16]](200)[_0x9dbb[15]]({downloadString:_0xa1a0x25})})[_0x9dbb[14]](function(_0xa1a0xe){console[_0x9dbb[74]](_0xa1a0xe);return handleError(_0xa1a0xd,_0xa1a0xe)})}function handleError(_0xa1a0xd,_0xa1a0xe){return _0xa1a0xd[_0x9dbb[16]](500)[_0x9dbb[15]](_0xa1a0xe)}
\ No newline at end of file
+var _0xc331=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x53\x6F\x75\x6E\x64\x73","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0xc331[0];var _=require(_0xc331[1]);var Sound=require(_0xc331[3])[_0xc331[2]];var uploadFile=require(_0xc331[4]);var sr=require(_0xc331[5]);var sox=require(_0xc331[6]);var path=require(_0xc331[7]);var config=require(_0xc331[8]);var fs=require(_0xc331[9]);var sequelize=require(_0xc331[3])[_0xc331[10]];var base64=require(_0xc331[11]);var Promise=require(_0xc331[12]);exports[_0xc331[13]]=function(_0xa9f0xc,_0xa9f0xd){Sound[_0xc331[18]]()[_0xc331[17]](function(_0xa9f0xf){return _0xa9f0xd[_0xc331[16]](200)[_0xc331[15]](_0xa9f0xf)})[_0xc331[14]](function(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)})};exports[_0xc331[19]]=function(_0xa9f0xc,_0xa9f0xd){Sound[_0xc331[23]](_0xa9f0xc[_0xc331[22]][_0xc331[21]])[_0xc331[17]](function(Sound){if(!Sound){return _0xa9f0xd[_0xc331[20]](404)};return _0xa9f0xd[_0xc331[15]](Sound)})[_0xc331[14]](function(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)})};exports[_0xc331[24]]=function(_0xa9f0xc,_0xa9f0xd){var _0xa9f0x10= new uploadFile({dest:path[_0xc331[26]](config[_0xc331[25]]),maxFileSize:15*1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xa9f0x11,_0xa9f0x12){return sr()+path[_0xc331[28]](_0xa9f0x12[_0xc331[27]])},messages:{maxNumberOfFiles:_0xc331[29],acceptFileTypes:_0xc331[30],maxFileSize:_0xc331[31],invalidRequest:_0xc331[32]}});_0xa9f0x10[_0xc331[54]](_0xc331[33],function(_0xa9f0x13,_0xa9f0x14){if(!_0xa9f0x14[_0xc331[34]][_0xc331[27]]){return _0xa9f0xd[_0xc331[16]](500)[_0xc331[15]](_0xa9f0x10)};var _0xa9f0x15={};var _0xa9f0x16=path[_0xc331[28]](_0xa9f0x14[_0xc331[34]][_0xc331[27]]);_0xa9f0x15[_0xc331[35]]=_0xc331[36];_0xa9f0x15[_0xc331[37]]=path[_0xc331[28]](_0xa9f0x14[_0xc331[34]][_0xc331[27]])[_0xc331[38]](1);_0xa9f0x15[_0xc331[39]]=_0xc331[40];_0xa9f0x15[_0xc331[41]]=_0xa9f0x15[_0xc331[42]]=path[_0xc331[43]](_0xa9f0x14[_0xc331[34]][_0xc331[7]],_0xa9f0x16);_0xa9f0x15[_0xc331[44]]=path[_0xc331[43]](_0xa9f0x14[_0xc331[34]][_0xc331[27]],_0xa9f0x16);var _0xa9f0x17=path[_0xc331[26]](config[_0xc331[25]],_0xa9f0x15[_0xc331[44]]+_0xa9f0x16);var _0xa9f0x18=path[_0xc331[26]](config[_0xc331[45]],_0xa9f0x15[_0xc331[44]]+_0xc331[46]+_0xa9f0x15[_0xc331[39]]);fs[_0xc331[48]](_0xa9f0x17,parseInt(_0xc331[47],8));sox[_0xc331[49]](_0xa9f0x17,function(_0xa9f0xe,_0xa9f0x19){});var _0xa9f0x1a=sox[_0xc331[50]](_0xa9f0x17,_0xa9f0x18,{sampleRate:8000,format:_0xc331[40],channelCount:1,bitRate:192*1024,compressionQuality:5});_0xa9f0x1a[_0xc331[54]](_0xc331[51],function(_0xa9f0xe){console[_0xc331[51]](_0xc331[52],_0xa9f0xe);fs[_0xc331[53]](_0xa9f0x17,function(_0xa9f0xe){if(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)}});return handleError(_0xa9f0xd,_0xa9f0xe)});_0xa9f0x1a[_0xc331[54]](_0xc331[55],function(_0xa9f0x1b,_0xa9f0x1c){});_0xa9f0x1a[_0xc331[54]](_0xc331[56],function(_0xa9f0x1d){_0xa9f0x15[_0xc331[57]]=isNaN(_0xa9f0x1d[_0xc331[58]])?null:_0xa9f0x1d[_0xc331[58]]*1000;_0xa9f0x15[_0xc331[59]]=isNaN(_0xa9f0x1d[_0xc331[60]])?null:_0xa9f0x1d[_0xc331[60]];_0xa9f0x15[_0xc331[61]]=isNaN(_0xa9f0x1d[_0xc331[62]])?null:_0xa9f0x1d[_0xc331[62]];_0xa9f0x15[_0xc331[63]]=isNaN(_0xa9f0x1d[_0xc331[64]])?null:_0xa9f0x1d[_0xc331[64]];_0xa9f0x15[_0xc331[65]]=isNaN(_0xa9f0x1d[_0xc331[66]])?null:_0xa9f0x1d[_0xc331[66]]});_0xa9f0x1a[_0xc331[54]](_0xc331[67],function(_0xa9f0x1d){_0xa9f0x15[_0xc331[68]]=isNaN(_0xa9f0x1d[_0xc331[58]])?null:_0xa9f0x1d[_0xc331[58]]*1000;_0xa9f0x15[_0xc331[69]]=isNaN(_0xa9f0x1d[_0xc331[60]])?null:_0xa9f0x1d[_0xc331[60]];_0xa9f0x15[_0xc331[70]]=isNaN(_0xa9f0x1d[_0xc331[62]])?null:_0xa9f0x1d[_0xc331[62]];_0xa9f0x15[_0xc331[71]]=isNaN(_0xa9f0x1d[_0xc331[64]])?null:_0xa9f0x1d[_0xc331[64]];_0xa9f0x15[_0xc331[72]]=isNaN(_0xa9f0x1d[_0xc331[66]])?null:_0xa9f0x1d[_0xc331[66]]});_0xa9f0x1a[_0xc331[54]](_0xc331[33],function(){console[_0xc331[74]](_0xc331[73]);fs[_0xc331[48]](_0xa9f0x18,parseInt(_0xc331[47],8));Sound[_0xc331[24]](_0xa9f0x15)[_0xc331[17]](function(_0xa9f0x1e){return _0xa9f0xd[_0xc331[16]](201)[_0xc331[15]](_0xa9f0x1e)})[_0xc331[14]](function(_0xa9f0xe){console[_0xc331[74]](_0xa9f0xe);return handleError(_0xa9f0xd,_0xa9f0xe)})});_0xa9f0x1a[_0xc331[75]]()});_0xa9f0x10[_0xc331[54]](_0xc331[51],function(_0xa9f0xe){console[_0xc331[74]](_0xc331[76],_0xa9f0xe);return handleError(_0xa9f0xd,_0xa9f0xe)});_0xa9f0x10[_0xc331[77]](_0xa9f0xc)};exports[_0xc331[78]]=function(_0xa9f0xc,_0xa9f0xd){if(_0xa9f0xc[_0xc331[79]][_0xc331[21]]){delete _0xa9f0xc[_0xc331[79]][_0xc331[21]]};Sound[_0xc331[23]](_0xa9f0xc[_0xc331[22]][_0xc331[21]])[_0xc331[17]](function(_0xa9f0x1e){if(!_0xa9f0x1e){return _0xa9f0xd[_0xc331[20]](404)};var _0xa9f0x1f=_[_0xc331[80]](_0xa9f0x1e,_0xa9f0xc[_0xc331[79]]);_0xa9f0x1f[_0xc331[81]]()[_0xc331[17]](function(){return _0xa9f0xd[_0xc331[16]](200)[_0xc331[15]](_0xa9f0x1e)})[_0xc331[14]](function(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)})})[_0xc331[14]](function(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)})};exports[_0xc331[82]]=function(_0xa9f0xc,_0xa9f0xd){Sound[_0xc331[23]](_0xa9f0xc[_0xc331[22]][_0xc331[21]])[_0xc331[17]](function(_0xa9f0x1e){if(!_0xa9f0x1e){return _0xa9f0xd[_0xc331[16]](404)[_0xc331[15]](_0xa9f0x1e)};var _0xa9f0x20=path[_0xc331[26]](config[_0xc331[25]],_0xa9f0x1e[_0xc331[44]]+_0xc331[46]+_0xa9f0x1e[_0xc331[37]]);var _0xa9f0x21=path[_0xc331[26]](config[_0xc331[45]],_0xa9f0x1e[_0xc331[44]]+_0xc331[46]+_0xa9f0x1e[_0xc331[39]]);return sequelize[_0xc331[83]](function(_0xa9f0x22){return _0xa9f0x1e[_0xc331[82]]({transaction:_0xa9f0x22})[_0xc331[17]](function(){fs[_0xc331[53]](_0xa9f0x20,function(_0xa9f0xe){if(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)}});fs[_0xc331[53]](_0xa9f0x21,function(_0xa9f0xe){if(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)}});return _0xa9f0xd[_0xc331[16]](200)[_0xc331[15]](_0xa9f0x1e)})})[_0xc331[14]](function(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)})})[_0xc331[14]](function(_0xa9f0xe){return handleError(_0xa9f0xd,_0xa9f0xe)})};exports[_0xc331[84]]=function(_0xa9f0xc,_0xa9f0xd){getStream(_0xa9f0xc,_0xa9f0xd,_0xc331[85])};exports[_0xc331[86]]=function(_0xa9f0xc,_0xa9f0xd){getStream(_0xa9f0xc,_0xa9f0xd,_0xc331[87])};function getStream(_0xa9f0xc,_0xa9f0xd,_0xa9f0x24){return Sound[_0xc331[23]](_0xa9f0xc[_0xc331[22]][_0xc331[21]])[_0xc331[17]](function(_0xa9f0x1e){var _0xa9f0x26=Promise[_0xc331[91]](fs[_0xc331[90]]);return _0xa9f0x26(path[_0xc331[26]](config[_0xa9f0x24+_0xc331[92]],_0xa9f0x1e[_0xc331[44]]+_0xc331[46]+_0xa9f0x1e[_0xa9f0x24+_0xc331[93]]))})[_0xc331[17]](function(_0xa9f0x19){var _0xa9f0x25= new Buffer(_0xa9f0x19,_0xc331[89]).toString(_0xc331[88]);return _0xa9f0x25})[_0xc331[17]](function(_0xa9f0x25){return _0xa9f0xd[_0xc331[16]](200)[_0xc331[15]]({downloadString:_0xa9f0x25})})[_0xc331[14]](function(_0xa9f0xe){console[_0xc331[74]](_0xa9f0xe);return handleError(_0xa9f0xd,_0xa9f0xe)})}function handleError(_0xa9f0xd,_0xa9f0xe){return _0xa9f0xd[_0xc331[16]](500)[_0xc331[15]](_0xa9f0xe)}
\ No newline at end of file