Built motion from commit 420f8c692.|1.0.30
[motion.git] / server / api / sound / sound.controller.js
index 61b4644..e047839 100644 (file)
@@ -1 +1 @@
-var _0x8f31=["\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","\x53\x65\x74\x74\x69\x6E\x67\x73","\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","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\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"];_0x8f31[0];var _=require(_0x8f31[1]);var Sound=require(_0x8f31[3])[_0x8f31[2]];var uploadFile=require(_0x8f31[4]);var sr=require(_0x8f31[5]);var sox=require(_0x8f31[6]);var path=require(_0x8f31[7]);var config=require(_0x8f31[8]);var fs=require(_0x8f31[9]);var sequelize=require(_0x8f31[3])[_0x8f31[10]];var base64=require(_0x8f31[11]);var Promise=require(_0x8f31[12]);var Settings=require(_0x8f31[3])[_0x8f31[13]];exports[_0x8f31[14]]=function(_0xceb0xd,_0xceb0xe){return Sound[_0x8f31[19]]()[_0x8f31[18]](function(_0xceb0x10){return _0xceb0xe[_0x8f31[17]](200)[_0x8f31[16]](_0xceb0x10)})[_0x8f31[15]](function(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)})};exports[_0x8f31[20]]=function(_0xceb0xd,_0xceb0xe){return Sound[_0x8f31[24]](_0xceb0xd[_0x8f31[23]][_0x8f31[22]])[_0x8f31[18]](function(Sound){if(!Sound){return _0xceb0xe[_0x8f31[21]](404)};return _0xceb0xe[_0x8f31[16]](Sound)})[_0x8f31[15]](function(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)})};exports[_0x8f31[25]]=function(_0xceb0xd,_0xceb0xe){var _0xceb0x11= new uploadFile({dest:path[_0x8f31[27]](config[_0x8f31[26]]),maxFileSize:15*1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xceb0x12,_0xceb0x13){return sr()+path[_0x8f31[29]](_0xceb0x13[_0x8f31[28]])},messages:{maxNumberOfFiles:_0x8f31[30],acceptFileTypes:_0x8f31[31],maxFileSize:_0x8f31[32],invalidRequest:_0x8f31[33]}});_0xceb0x11[_0x8f31[56]](_0x8f31[34],function(_0xceb0x14,_0xceb0x15){if(!_0xceb0x15[_0x8f31[35]][_0x8f31[28]]){return _0xceb0xe[_0x8f31[17]](500)[_0x8f31[16]](_0xceb0x11)};return Settings[_0x8f31[24]](1)[_0x8f31[18]](function(_0xceb0x16){var _0xceb0x17={};var _0xceb0x18=path[_0x8f31[29]](_0xceb0x15[_0x8f31[35]][_0x8f31[28]]);_0xceb0x17[_0x8f31[36]]=_0x8f31[37];_0xceb0x17[_0x8f31[38]]=path[_0x8f31[29]](_0xceb0x15[_0x8f31[35]][_0x8f31[28]])[_0x8f31[39]](1);_0xceb0x17[_0x8f31[40]]=_0x8f31[41];_0xceb0x17[_0x8f31[42]]=_0xceb0x17[_0x8f31[43]]=path[_0x8f31[44]](_0xceb0x15[_0x8f31[35]][_0x8f31[7]],_0xceb0x18);_0xceb0x17[_0x8f31[45]]=path[_0x8f31[44]](_0xceb0x15[_0x8f31[35]][_0x8f31[28]],_0xceb0x18);var _0xceb0x19=path[_0x8f31[27]](config[_0x8f31[26]],_0xceb0x17[_0x8f31[45]]+_0xceb0x18);var _0xceb0x1a=path[_0x8f31[27]](_0xceb0x16[_0x8f31[46]]||_0x8f31[47],_0xceb0x17[_0x8f31[45]]+_0x8f31[48]+_0xceb0x17[_0x8f31[40]]);fs[_0x8f31[50]](_0xceb0x19,parseInt(_0x8f31[49],8));sox[_0x8f31[51]](_0xceb0x19,function(_0xceb0xf,_0xceb0x1b){});var _0xceb0x1c=sox[_0x8f31[52]](_0xceb0x19,_0xceb0x1a,{sampleRate:8000,format:_0x8f31[41],channelCount:1,bitRate:192*1024,compressionQuality:5});_0xceb0x1c[_0x8f31[56]](_0x8f31[53],function(_0xceb0xf){console[_0x8f31[53]](_0x8f31[54],_0xceb0xf);fs[_0x8f31[55]](_0xceb0x19,function(_0xceb0xf){if(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)}});return handleError(_0xceb0xe,_0xceb0xf)});_0xceb0x1c[_0x8f31[56]](_0x8f31[57],function(_0xceb0x1d,_0xceb0x1e){});_0xceb0x1c[_0x8f31[56]](_0x8f31[58],function(_0xceb0x1f){_0xceb0x17[_0x8f31[59]]=isNaN(_0xceb0x1f[_0x8f31[60]])?null:_0xceb0x1f[_0x8f31[60]]*1000;_0xceb0x17[_0x8f31[61]]=isNaN(_0xceb0x1f[_0x8f31[62]])?null:_0xceb0x1f[_0x8f31[62]];_0xceb0x17[_0x8f31[63]]=isNaN(_0xceb0x1f[_0x8f31[64]])?null:_0xceb0x1f[_0x8f31[64]];_0xceb0x17[_0x8f31[65]]=isNaN(_0xceb0x1f[_0x8f31[66]])?null:_0xceb0x1f[_0x8f31[66]];_0xceb0x17[_0x8f31[67]]=isNaN(_0xceb0x1f[_0x8f31[68]])?null:_0xceb0x1f[_0x8f31[68]]});_0xceb0x1c[_0x8f31[56]](_0x8f31[69],function(_0xceb0x1f){_0xceb0x17[_0x8f31[70]]=isNaN(_0xceb0x1f[_0x8f31[60]])?null:_0xceb0x1f[_0x8f31[60]]*1000;_0xceb0x17[_0x8f31[71]]=isNaN(_0xceb0x1f[_0x8f31[62]])?null:_0xceb0x1f[_0x8f31[62]];_0xceb0x17[_0x8f31[72]]=isNaN(_0xceb0x1f[_0x8f31[64]])?null:_0xceb0x1f[_0x8f31[64]];_0xceb0x17[_0x8f31[73]]=isNaN(_0xceb0x1f[_0x8f31[66]])?null:_0xceb0x1f[_0x8f31[66]];_0xceb0x17[_0x8f31[74]]=isNaN(_0xceb0x1f[_0x8f31[68]])?null:_0xceb0x1f[_0x8f31[68]]});_0xceb0x1c[_0x8f31[56]](_0x8f31[34],function(){console[_0x8f31[76]](_0x8f31[75]);fs[_0x8f31[50]](_0xceb0x1a,parseInt(_0x8f31[49],8));return Sound[_0x8f31[25]](_0xceb0x17)[_0x8f31[18]](function(_0xceb0x20){return _0xceb0xe[_0x8f31[17]](201)[_0x8f31[16]](_0xceb0x20)})[_0x8f31[15]](function(_0xceb0xf){console[_0x8f31[76]](_0xceb0xf);return handleError(_0xceb0xe,_0xceb0xf)})});_0xceb0x1c[_0x8f31[77]]()})[_0x8f31[15]](function(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)})});_0xceb0x11[_0x8f31[56]](_0x8f31[53],function(_0xceb0xf){console[_0x8f31[76]](_0x8f31[78],_0xceb0xf);return handleError(_0xceb0xe,_0xceb0xf)});_0xceb0x11[_0x8f31[79]](_0xceb0xd)};exports[_0x8f31[80]]=function(_0xceb0xd,_0xceb0xe){if(_0xceb0xd[_0x8f31[81]][_0x8f31[22]]){delete _0xceb0xd[_0x8f31[81]][_0x8f31[22]]};return Sound[_0x8f31[24]](_0xceb0xd[_0x8f31[23]][_0x8f31[22]])[_0x8f31[18]](function(_0xceb0x20){if(!_0xceb0x20){return _0xceb0xe[_0x8f31[21]](404)};var _0xceb0x21=_[_0x8f31[82]](_0xceb0x20,_0xceb0xd[_0x8f31[81]]);return _0xceb0x21[_0x8f31[83]]()})[_0x8f31[18]](function(_0xceb0x20){return _0xceb0xe[_0x8f31[17]](200)[_0x8f31[16]](_0xceb0x20)})[_0x8f31[15]](function(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)})};exports[_0x8f31[84]]=function(_0xceb0xd,_0xceb0xe){var _0xceb0x22;return Settings[_0x8f31[24]](1)[_0x8f31[18]](function(_0xceb0x16){_0xceb0x22=_0xceb0x16;return Sound[_0x8f31[24]](_0xceb0xd[_0x8f31[23]][_0x8f31[22]])})[_0x8f31[18]](function(_0xceb0x20){if(!_0xceb0x20){return _0xceb0xe[_0x8f31[21]](404)};var _0xceb0x23=path[_0x8f31[27]](config[_0x8f31[26]],_0xceb0x20[_0x8f31[45]]+_0x8f31[48]+_0xceb0x20[_0x8f31[38]]);var _0xceb0x24=path[_0x8f31[27]](_0xceb0x22[_0x8f31[46]]||_0x8f31[47],_0xceb0x20[_0x8f31[45]]+_0x8f31[48]+_0xceb0x20[_0x8f31[40]]);return sequelize[_0x8f31[85]](function(_0xceb0x25){return _0xceb0x20[_0x8f31[84]]({transaction:_0xceb0x25})[_0x8f31[18]](function(){fs[_0x8f31[55]](_0xceb0x23,function(_0xceb0xf){if(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)}});fs[_0x8f31[55]](_0xceb0x24,function(_0xceb0xf){if(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)}});return _0xceb0xe[_0x8f31[17]](200)[_0x8f31[16]](_0xceb0x20)})})[_0x8f31[15]](function(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)})})[_0x8f31[15]](function(_0xceb0xf){return handleError(_0xceb0xe,_0xceb0xf)})};exports[_0x8f31[86]]=function(_0xceb0xd,_0xceb0xe){getStream(_0xceb0xd,_0xceb0xe,_0x8f31[87])};exports[_0x8f31[88]]=function(_0xceb0xd,_0xceb0xe){getStream(_0xceb0xd,_0xceb0xe,_0x8f31[89])};function getStream(_0xceb0xd,_0xceb0xe,_0xceb0x27){return Sound[_0x8f31[24]](_0xceb0xd[_0x8f31[23]][_0x8f31[22]])[_0x8f31[18]](function(_0xceb0x20){var _0xceb0x29=Promise[_0x8f31[93]](fs[_0x8f31[92]]);return _0xceb0x29(path[_0x8f31[27]](config[_0xceb0x27+_0x8f31[94]],_0xceb0x20[_0x8f31[45]]+_0x8f31[48]+_0xceb0x20[_0xceb0x27+_0x8f31[95]]))})[_0x8f31[18]](function(_0xceb0x1b){var _0xceb0x28= new Buffer(_0xceb0x1b,_0x8f31[91]).toString(_0x8f31[90]);return _0xceb0x28})[_0x8f31[18]](function(_0xceb0x28){return _0xceb0xe[_0x8f31[17]](200)[_0x8f31[16]]({downloadString:_0xceb0x28})})[_0x8f31[15]](function(_0xceb0xf){console[_0x8f31[76]](_0xceb0xf);return handleError(_0xceb0xe,_0xceb0xf)})}function handleError(_0xceb0xe,_0xceb0xf){return _0xceb0xe[_0x8f31[17]](500)[_0x8f31[16]](_0xceb0xf)}
\ No newline at end of file
+var _0x914b=["\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","\x53\x65\x74\x74\x69\x6E\x67","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\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","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x6F\x78\x20\x69\x64\x65\x6E\x74\x69\x66\x79\x20\x52\x65\x73\x75\x6C\x74\x3A\x20","\x64\x65\x62\x75\x67","\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\x53\x6F\x78\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","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x6F\x78\x20\x63\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x6F\x78\x20\x73\x72\x63\x3A\x20","\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","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x53\x6F\x78\x20\x64\x65\x73\x74\x3A\x20","\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","\x53\x6F\x78\x20\x63\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\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","\x73\x74\x61\x63\x6B"];_0x914b[0];var _=require(_0x914b[1]);var Sound=require(_0x914b[3])[_0x914b[2]];var uploadFile=require(_0x914b[4]);var sr=require(_0x914b[5]);var sox=require(_0x914b[6]);var path=require(_0x914b[7]);var config=require(_0x914b[8]);var fs=require(_0x914b[9]);var sequelize=require(_0x914b[3])[_0x914b[10]];var base64=require(_0x914b[11]);var Promise=require(_0x914b[12]);var Setting=require(_0x914b[3])[_0x914b[13]];var logger=require(_0x914b[15])(_0x914b[14]);exports[_0x914b[16]]= function(_0x3113xe,_0x3113xf){return Sound[_0x914b[21]]()[_0x914b[20]](function(_0x3113x11){return _0x3113xf[_0x914b[19]](200)[_0x914b[18]](_0x3113x11)})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})};exports[_0x914b[22]]= function(_0x3113xe,_0x3113xf){return Sound[_0x914b[26]](_0x3113xe[_0x914b[25]][_0x914b[24]])[_0x914b[20]](function(Sound){if(!Sound){return _0x3113xf[_0x914b[23]](404)};return _0x3113xf[_0x914b[18]](Sound)})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})};exports[_0x914b[27]]= function(_0x3113xe,_0x3113xf){var _0x3113x12= new uploadFile({dest:path[_0x914b[29]](config[_0x914b[28]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0x3113x13,_0x3113x14){return sr()+ path[_0x914b[31]](_0x3113x14[_0x914b[30]])},messages:{maxNumberOfFiles:_0x914b[32],acceptFileTypes:_0x914b[33],maxFileSize:_0x914b[34],invalidRequest:_0x914b[35]}});_0x3113x12[_0x914b[60]](_0x914b[36],function(_0x3113x15,_0x3113x16){if(!_0x3113x16[_0x914b[37]][_0x914b[30]]){return _0x3113xf[_0x914b[19]](500)[_0x914b[18]](_0x3113x12)};return Setting[_0x914b[26]](1)[_0x914b[20]](function(_0x3113x17){var _0x3113x18={};var _0x3113x19=path[_0x914b[31]](_0x3113x16[_0x914b[37]][_0x914b[30]]);_0x3113x18[_0x914b[38]]= _0x914b[39];_0x3113x18[_0x914b[40]]= path[_0x914b[31]](_0x3113x16[_0x914b[37]][_0x914b[30]])[_0x914b[41]](1);_0x3113x18[_0x914b[42]]= _0x914b[43];_0x3113x18[_0x914b[44]]= _0x3113x18[_0x914b[45]]= path[_0x914b[46]](_0x3113x16[_0x914b[37]][_0x914b[7]],_0x3113x19);_0x3113x18[_0x914b[47]]= path[_0x914b[46]](_0x3113x16[_0x914b[37]][_0x914b[30]],_0x3113x19);var _0x3113x1a=path[_0x914b[29]](config[_0x914b[28]],_0x3113x18[_0x914b[47]]+ _0x3113x19);var _0x3113x1b=path[_0x914b[29]](_0x3113x17[_0x914b[48]]|| _0x914b[49],_0x3113x18[_0x914b[47]]+ _0x914b[50]+ _0x3113x18[_0x914b[42]]);fs[_0x914b[52]](_0x3113x1a,parseInt(_0x914b[51],8));sox[_0x914b[55]](_0x3113x1a,function(_0x3113x10,_0x3113x1c){logger[_0x914b[54]](_0x914b[53],_0x3113x1c)});var _0x3113x1d=sox[_0x914b[56]](_0x3113x1a,_0x3113x1b,{sampleRate:8000,format:_0x914b[43],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x3113x1d[_0x914b[60]](_0x914b[57],function(_0x3113x10){logger[_0x914b[54]](_0x914b[58],_0x3113x10);fs[_0x914b[59]](_0x3113x1a,function(_0x3113x10){if(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)}});return handleError(_0x3113xf,_0x3113x10)});_0x3113x1d[_0x914b[60]](_0x914b[61],function(_0x3113x1e,_0x3113x1f){logger[_0x914b[54]](_0x914b[62],_0x3113x1e,_0x3113x1f)});_0x3113x1d[_0x914b[60]](_0x914b[63],function(_0x3113x20){logger[_0x914b[54]](_0x914b[64],_0x3113x20);_0x3113x18[_0x914b[65]]= isNaN(_0x3113x20[_0x914b[66]])?null:_0x3113x20[_0x914b[66]]* 1000;_0x3113x18[_0x914b[67]]= isNaN(_0x3113x20[_0x914b[68]])?null:_0x3113x20[_0x914b[68]];_0x3113x18[_0x914b[69]]= isNaN(_0x3113x20[_0x914b[70]])?null:_0x3113x20[_0x914b[70]];_0x3113x18[_0x914b[71]]= isNaN(_0x3113x20[_0x914b[72]])?null:_0x3113x20[_0x914b[72]];_0x3113x18[_0x914b[73]]= isNaN(_0x3113x20[_0x914b[74]])?null:_0x3113x20[_0x914b[74]]});_0x3113x1d[_0x914b[60]](_0x914b[75],function(_0x3113x20){logger[_0x914b[54]](_0x914b[76],_0x3113x20);_0x3113x18[_0x914b[77]]= isNaN(_0x3113x20[_0x914b[66]])?null:_0x3113x20[_0x914b[66]]* 1000;_0x3113x18[_0x914b[78]]= isNaN(_0x3113x20[_0x914b[68]])?null:_0x3113x20[_0x914b[68]];_0x3113x18[_0x914b[79]]= isNaN(_0x3113x20[_0x914b[70]])?null:_0x3113x20[_0x914b[70]];_0x3113x18[_0x914b[80]]= isNaN(_0x3113x20[_0x914b[72]])?null:_0x3113x20[_0x914b[72]];_0x3113x18[_0x914b[81]]= isNaN(_0x3113x20[_0x914b[74]])?null:_0x3113x20[_0x914b[74]]});_0x3113x1d[_0x914b[60]](_0x914b[36],function(){logger[_0x914b[54]](_0x914b[82]);fs[_0x914b[52]](_0x3113x1b,parseInt(_0x914b[51],8));return Sound[_0x914b[27]](_0x3113x18)[_0x914b[20]](function(_0x3113x21){return _0x3113xf[_0x914b[19]](201)[_0x914b[18]](_0x3113x21)})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})});_0x3113x1d[_0x914b[83]]()})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})});_0x3113x12[_0x914b[60]](_0x914b[57],function(_0x3113x10){logger[_0x914b[57]](_0x914b[84],_0x3113x10);return handleError(_0x3113xf,_0x3113x10)});_0x3113x12[_0x914b[85]](_0x3113xe)};exports[_0x914b[86]]= function(_0x3113xe,_0x3113xf){if(_0x3113xe[_0x914b[87]][_0x914b[24]]){delete _0x3113xe[_0x914b[87]][_0x914b[24]]};return Sound[_0x914b[26]](_0x3113xe[_0x914b[25]][_0x914b[24]])[_0x914b[20]](function(_0x3113x21){if(!_0x3113x21){return _0x3113xf[_0x914b[23]](404)};var _0x3113x22=_[_0x914b[88]](_0x3113x21,_0x3113xe[_0x914b[87]]);return _0x3113x22[_0x914b[89]]()})[_0x914b[20]](function(_0x3113x21){return _0x3113xf[_0x914b[19]](200)[_0x914b[18]](_0x3113x21)})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})};exports[_0x914b[90]]= function(_0x3113xe,_0x3113xf){var _0x3113x23;return Setting[_0x914b[26]](1)[_0x914b[20]](function(_0x3113x17){_0x3113x23= _0x3113x17;return Sound[_0x914b[26]](_0x3113xe[_0x914b[25]][_0x914b[24]])})[_0x914b[20]](function(_0x3113x21){if(!_0x3113x21){return _0x3113xf[_0x914b[23]](404)};var _0x3113x24=path[_0x914b[29]](config[_0x914b[28]],_0x3113x21[_0x914b[47]]+ _0x914b[50]+ _0x3113x21[_0x914b[40]]);var _0x3113x25=path[_0x914b[29]](_0x3113x23[_0x914b[48]]|| _0x914b[49],_0x3113x21[_0x914b[47]]+ _0x914b[50]+ _0x3113x21[_0x914b[42]]);return sequelize[_0x914b[91]](function(_0x3113x26){return _0x3113x21[_0x914b[90]]({transaction:_0x3113x26})[_0x914b[20]](function(){fs[_0x914b[59]](_0x3113x24,function(_0x3113x10){if(_0x3113x10){logger[_0x914b[57]](_0x3113x10)}});fs[_0x914b[59]](_0x3113x25,function(_0x3113x10){if(_0x3113x10){logger[_0x914b[57]](_0x3113x10)}});return _0x3113xf[_0x914b[19]](200)[_0x914b[18]](_0x3113x21)})})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})};exports[_0x914b[92]]= function(_0x3113xe,_0x3113xf){getStream(_0x3113xe,_0x3113xf,_0x914b[93])};exports[_0x914b[94]]= function(_0x3113xe,_0x3113xf){getStream(_0x3113xe,_0x3113xf,_0x914b[95])};function getStream(_0x3113xe,_0x3113xf,_0x3113x28){return Sound[_0x914b[26]](_0x3113xe[_0x914b[25]][_0x914b[24]])[_0x914b[20]](function(_0x3113x21){var _0x3113x2a=Promise[_0x914b[99]](fs[_0x914b[98]]);return _0x3113x2a(path[_0x914b[29]](config[_0x3113x28+ _0x914b[100]],_0x3113x21[_0x914b[47]]+ _0x914b[50]+ _0x3113x21[_0x3113x28+ _0x914b[101]]))})[_0x914b[20]](function(_0x3113x1c){var _0x3113x29= new Buffer(_0x3113x1c,_0x914b[97]).toString(_0x914b[96]);return _0x3113x29})[_0x914b[20]](function(_0x3113x29){return _0x3113xf[_0x914b[19]](200)[_0x914b[18]]({downloadString:_0x3113x29})})[_0x914b[17]](function(_0x3113x10){return handleError(_0x3113xf,_0x3113x10)})}function handleError(_0x3113xf,_0x3113x10){logger[_0x914b[57]](_0x3113x10[_0x914b[102]]);return _0x3113xf[_0x914b[19]](500)[_0x914b[18]](_0x3113x10)}
\ No newline at end of file