Built motion from commit d127c62.|0.0.151
[motion.git] / server / api / sound / sound.controller.js
index abc5e52..dd6fbbd 100644 (file)
@@ -1 +1 @@
-var _0x25f6=["\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"];_0x25f6[0];var _=require(_0x25f6[1]);var Sound=require(_0x25f6[3])[_0x25f6[2]];var uploadFile=require(_0x25f6[4]);var sr=require(_0x25f6[5]);var sox=require(_0x25f6[6]);var path=require(_0x25f6[7]);var config=require(_0x25f6[8]);var fs=require(_0x25f6[9]);var sequelize=require(_0x25f6[3])[_0x25f6[10]];var base64=require(_0x25f6[11]);var Promise=require(_0x25f6[12]);var Settings=require(_0x25f6[3])[_0x25f6[13]];exports[_0x25f6[14]]=function(_0xff5fxd,_0xff5fxe){return Sound[_0x25f6[19]]()[_0x25f6[18]](function(_0xff5fx10){return _0xff5fxe[_0x25f6[17]](200)[_0x25f6[16]](_0xff5fx10)})[_0x25f6[15]](function(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)})};exports[_0x25f6[20]]=function(_0xff5fxd,_0xff5fxe){return Sound[_0x25f6[24]](_0xff5fxd[_0x25f6[23]][_0x25f6[22]])[_0x25f6[18]](function(Sound){if(!Sound){return _0xff5fxe[_0x25f6[21]](404)};return _0xff5fxe[_0x25f6[16]](Sound)})[_0x25f6[15]](function(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)})};exports[_0x25f6[25]]=function(_0xff5fxd,_0xff5fxe){var _0xff5fx11= new uploadFile({dest:path[_0x25f6[27]](config[_0x25f6[26]]),maxFileSize:15*1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xff5fx12,_0xff5fx13){return sr()+path[_0x25f6[29]](_0xff5fx13[_0x25f6[28]])},messages:{maxNumberOfFiles:_0x25f6[30],acceptFileTypes:_0x25f6[31],maxFileSize:_0x25f6[32],invalidRequest:_0x25f6[33]}});_0xff5fx11[_0x25f6[56]](_0x25f6[34],function(_0xff5fx14,_0xff5fx15){if(!_0xff5fx15[_0x25f6[35]][_0x25f6[28]]){return _0xff5fxe[_0x25f6[17]](500)[_0x25f6[16]](_0xff5fx11)};return Settings[_0x25f6[24]](1)[_0x25f6[18]](function(_0xff5fx16){var _0xff5fx17={};var _0xff5fx18=path[_0x25f6[29]](_0xff5fx15[_0x25f6[35]][_0x25f6[28]]);_0xff5fx17[_0x25f6[36]]=_0x25f6[37];_0xff5fx17[_0x25f6[38]]=path[_0x25f6[29]](_0xff5fx15[_0x25f6[35]][_0x25f6[28]])[_0x25f6[39]](1);_0xff5fx17[_0x25f6[40]]=_0x25f6[41];_0xff5fx17[_0x25f6[42]]=_0xff5fx17[_0x25f6[43]]=path[_0x25f6[44]](_0xff5fx15[_0x25f6[35]][_0x25f6[7]],_0xff5fx18);_0xff5fx17[_0x25f6[45]]=path[_0x25f6[44]](_0xff5fx15[_0x25f6[35]][_0x25f6[28]],_0xff5fx18);var _0xff5fx19=path[_0x25f6[27]](config[_0x25f6[26]],_0xff5fx17[_0x25f6[45]]+_0xff5fx18);var _0xff5fx1a=path[_0x25f6[27]](_0xff5fx16[_0x25f6[46]]||_0x25f6[47],_0xff5fx17[_0x25f6[45]]+_0x25f6[48]+_0xff5fx17[_0x25f6[40]]);fs[_0x25f6[50]](_0xff5fx19,parseInt(_0x25f6[49],8));sox[_0x25f6[51]](_0xff5fx19,function(_0xff5fxf,_0xff5fx1b){});var _0xff5fx1c=sox[_0x25f6[52]](_0xff5fx19,_0xff5fx1a,{sampleRate:8000,format:_0x25f6[41],channelCount:1,bitRate:192*1024,compressionQuality:5});_0xff5fx1c[_0x25f6[56]](_0x25f6[53],function(_0xff5fxf){console[_0x25f6[53]](_0x25f6[54],_0xff5fxf);fs[_0x25f6[55]](_0xff5fx19,function(_0xff5fxf){if(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)}});return handleError(_0xff5fxe,_0xff5fxf)});_0xff5fx1c[_0x25f6[56]](_0x25f6[57],function(_0xff5fx1d,_0xff5fx1e){});_0xff5fx1c[_0x25f6[56]](_0x25f6[58],function(_0xff5fx1f){_0xff5fx17[_0x25f6[59]]=isNaN(_0xff5fx1f[_0x25f6[60]])?null:_0xff5fx1f[_0x25f6[60]]*1000;_0xff5fx17[_0x25f6[61]]=isNaN(_0xff5fx1f[_0x25f6[62]])?null:_0xff5fx1f[_0x25f6[62]];_0xff5fx17[_0x25f6[63]]=isNaN(_0xff5fx1f[_0x25f6[64]])?null:_0xff5fx1f[_0x25f6[64]];_0xff5fx17[_0x25f6[65]]=isNaN(_0xff5fx1f[_0x25f6[66]])?null:_0xff5fx1f[_0x25f6[66]];_0xff5fx17[_0x25f6[67]]=isNaN(_0xff5fx1f[_0x25f6[68]])?null:_0xff5fx1f[_0x25f6[68]]});_0xff5fx1c[_0x25f6[56]](_0x25f6[69],function(_0xff5fx1f){_0xff5fx17[_0x25f6[70]]=isNaN(_0xff5fx1f[_0x25f6[60]])?null:_0xff5fx1f[_0x25f6[60]]*1000;_0xff5fx17[_0x25f6[71]]=isNaN(_0xff5fx1f[_0x25f6[62]])?null:_0xff5fx1f[_0x25f6[62]];_0xff5fx17[_0x25f6[72]]=isNaN(_0xff5fx1f[_0x25f6[64]])?null:_0xff5fx1f[_0x25f6[64]];_0xff5fx17[_0x25f6[73]]=isNaN(_0xff5fx1f[_0x25f6[66]])?null:_0xff5fx1f[_0x25f6[66]];_0xff5fx17[_0x25f6[74]]=isNaN(_0xff5fx1f[_0x25f6[68]])?null:_0xff5fx1f[_0x25f6[68]]});_0xff5fx1c[_0x25f6[56]](_0x25f6[34],function(){console[_0x25f6[76]](_0x25f6[75]);fs[_0x25f6[50]](_0xff5fx1a,parseInt(_0x25f6[49],8));return Sound[_0x25f6[25]](_0xff5fx17)[_0x25f6[18]](function(_0xff5fx20){return _0xff5fxe[_0x25f6[17]](201)[_0x25f6[16]](_0xff5fx20)})[_0x25f6[15]](function(_0xff5fxf){console[_0x25f6[76]](_0xff5fxf);return handleError(_0xff5fxe,_0xff5fxf)})});_0xff5fx1c[_0x25f6[77]]()})[_0x25f6[15]](function(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)})});_0xff5fx11[_0x25f6[56]](_0x25f6[53],function(_0xff5fxf){console[_0x25f6[76]](_0x25f6[78],_0xff5fxf);return handleError(_0xff5fxe,_0xff5fxf)});_0xff5fx11[_0x25f6[79]](_0xff5fxd)};exports[_0x25f6[80]]=function(_0xff5fxd,_0xff5fxe){if(_0xff5fxd[_0x25f6[81]][_0x25f6[22]]){delete _0xff5fxd[_0x25f6[81]][_0x25f6[22]]};return Sound[_0x25f6[24]](_0xff5fxd[_0x25f6[23]][_0x25f6[22]])[_0x25f6[18]](function(_0xff5fx20){if(!_0xff5fx20){return _0xff5fxe[_0x25f6[21]](404)};var _0xff5fx21=_[_0x25f6[82]](_0xff5fx20,_0xff5fxd[_0x25f6[81]]);return _0xff5fx21[_0x25f6[83]]()})[_0x25f6[18]](function(_0xff5fx20){return _0xff5fxe[_0x25f6[17]](200)[_0x25f6[16]](_0xff5fx20)})[_0x25f6[15]](function(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)})};exports[_0x25f6[84]]=function(_0xff5fxd,_0xff5fxe){var _0xff5fx22;return Settings[_0x25f6[24]](1)[_0x25f6[18]](function(_0xff5fx16){_0xff5fx22=_0xff5fx16;return Sound[_0x25f6[24]](_0xff5fxd[_0x25f6[23]][_0x25f6[22]])})[_0x25f6[18]](function(_0xff5fx20){if(!_0xff5fx20){return _0xff5fxe[_0x25f6[21]](404)};var _0xff5fx23=path[_0x25f6[27]](config[_0x25f6[26]],_0xff5fx20[_0x25f6[45]]+_0x25f6[48]+_0xff5fx20[_0x25f6[38]]);var _0xff5fx24=path[_0x25f6[27]](_0xff5fx22[_0x25f6[46]]||_0x25f6[47],_0xff5fx20[_0x25f6[45]]+_0x25f6[48]+_0xff5fx20[_0x25f6[40]]);return sequelize[_0x25f6[85]](function(_0xff5fx25){return _0xff5fx20[_0x25f6[84]]({transaction:_0xff5fx25})[_0x25f6[18]](function(){fs[_0x25f6[55]](_0xff5fx23,function(_0xff5fxf){if(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)}});fs[_0x25f6[55]](_0xff5fx24,function(_0xff5fxf){if(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)}});return _0xff5fxe[_0x25f6[17]](200)[_0x25f6[16]](_0xff5fx20)})})[_0x25f6[15]](function(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)})})[_0x25f6[15]](function(_0xff5fxf){return handleError(_0xff5fxe,_0xff5fxf)})};exports[_0x25f6[86]]=function(_0xff5fxd,_0xff5fxe){getStream(_0xff5fxd,_0xff5fxe,_0x25f6[87])};exports[_0x25f6[88]]=function(_0xff5fxd,_0xff5fxe){getStream(_0xff5fxd,_0xff5fxe,_0x25f6[89])};function getStream(_0xff5fxd,_0xff5fxe,_0xff5fx27){return Sound[_0x25f6[24]](_0xff5fxd[_0x25f6[23]][_0x25f6[22]])[_0x25f6[18]](function(_0xff5fx20){var _0xff5fx29=Promise[_0x25f6[93]](fs[_0x25f6[92]]);return _0xff5fx29(path[_0x25f6[27]](config[_0xff5fx27+_0x25f6[94]],_0xff5fx20[_0x25f6[45]]+_0x25f6[48]+_0xff5fx20[_0xff5fx27+_0x25f6[95]]))})[_0x25f6[18]](function(_0xff5fx1b){var _0xff5fx28= new Buffer(_0xff5fx1b,_0x25f6[91]).toString(_0x25f6[90]);return _0xff5fx28})[_0x25f6[18]](function(_0xff5fx28){return _0xff5fxe[_0x25f6[17]](200)[_0x25f6[16]]({downloadString:_0xff5fx28})})[_0x25f6[15]](function(_0xff5fxf){console[_0x25f6[76]](_0xff5fxf);return handleError(_0xff5fxe,_0xff5fxf)})}function handleError(_0xff5fxe,_0xff5fxf){return _0xff5fxe[_0x25f6[17]](500)[_0x25f6[16]](_0xff5fxf)}
\ No newline at end of file
+var _0x6cef=["\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","\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"];_0x6cef[0];var _=require(_0x6cef[1]);var Sound=require(_0x6cef[3])[_0x6cef[2]];var uploadFile=require(_0x6cef[4]);var sr=require(_0x6cef[5]);var sox=require(_0x6cef[6]);var path=require(_0x6cef[7]);var config=require(_0x6cef[8]);var fs=require(_0x6cef[9]);var sequelize=require(_0x6cef[3])[_0x6cef[10]];var base64=require(_0x6cef[11]);var Promise=require(_0x6cef[12]);var Setting=require(_0x6cef[3])[_0x6cef[13]];exports[_0x6cef[14]]= function(_0xb7bfxd,_0xb7bfxe){return Sound[_0x6cef[19]]()[_0x6cef[18]](function(_0xb7bfx10){return _0xb7bfxe[_0x6cef[17]](200)[_0x6cef[16]](_0xb7bfx10)})[_0x6cef[15]](function(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)})};exports[_0x6cef[20]]= function(_0xb7bfxd,_0xb7bfxe){return Sound[_0x6cef[24]](_0xb7bfxd[_0x6cef[23]][_0x6cef[22]])[_0x6cef[18]](function(Sound){if(!Sound){return _0xb7bfxe[_0x6cef[21]](404)};return _0xb7bfxe[_0x6cef[16]](Sound)})[_0x6cef[15]](function(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)})};exports[_0x6cef[25]]= function(_0xb7bfxd,_0xb7bfxe){var _0xb7bfx11= new uploadFile({dest:path[_0x6cef[27]](config[_0x6cef[26]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xb7bfx12,_0xb7bfx13){return sr()+ path[_0x6cef[29]](_0xb7bfx13[_0x6cef[28]])},messages:{maxNumberOfFiles:_0x6cef[30],acceptFileTypes:_0x6cef[31],maxFileSize:_0x6cef[32],invalidRequest:_0x6cef[33]}});_0xb7bfx11[_0x6cef[56]](_0x6cef[34],function(_0xb7bfx14,_0xb7bfx15){if(!_0xb7bfx15[_0x6cef[35]][_0x6cef[28]]){return _0xb7bfxe[_0x6cef[17]](500)[_0x6cef[16]](_0xb7bfx11)};return Setting[_0x6cef[24]](1)[_0x6cef[18]](function(_0xb7bfx16){var _0xb7bfx17={};var _0xb7bfx18=path[_0x6cef[29]](_0xb7bfx15[_0x6cef[35]][_0x6cef[28]]);_0xb7bfx17[_0x6cef[36]]= _0x6cef[37];_0xb7bfx17[_0x6cef[38]]= path[_0x6cef[29]](_0xb7bfx15[_0x6cef[35]][_0x6cef[28]])[_0x6cef[39]](1);_0xb7bfx17[_0x6cef[40]]= _0x6cef[41];_0xb7bfx17[_0x6cef[42]]= _0xb7bfx17[_0x6cef[43]]= path[_0x6cef[44]](_0xb7bfx15[_0x6cef[35]][_0x6cef[7]],_0xb7bfx18);_0xb7bfx17[_0x6cef[45]]= path[_0x6cef[44]](_0xb7bfx15[_0x6cef[35]][_0x6cef[28]],_0xb7bfx18);var _0xb7bfx19=path[_0x6cef[27]](config[_0x6cef[26]],_0xb7bfx17[_0x6cef[45]]+ _0xb7bfx18);var _0xb7bfx1a=path[_0x6cef[27]](_0xb7bfx16[_0x6cef[46]]|| _0x6cef[47],_0xb7bfx17[_0x6cef[45]]+ _0x6cef[48]+ _0xb7bfx17[_0x6cef[40]]);fs[_0x6cef[50]](_0xb7bfx19,parseInt(_0x6cef[49],8));sox[_0x6cef[51]](_0xb7bfx19,function(_0xb7bfxf,_0xb7bfx1b){});var _0xb7bfx1c=sox[_0x6cef[52]](_0xb7bfx19,_0xb7bfx1a,{sampleRate:8000,format:_0x6cef[41],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xb7bfx1c[_0x6cef[56]](_0x6cef[53],function(_0xb7bfxf){console[_0x6cef[53]](_0x6cef[54],_0xb7bfxf);fs[_0x6cef[55]](_0xb7bfx19,function(_0xb7bfxf){if(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)}});return handleError(_0xb7bfxe,_0xb7bfxf)});_0xb7bfx1c[_0x6cef[56]](_0x6cef[57],function(_0xb7bfx1d,_0xb7bfx1e){});_0xb7bfx1c[_0x6cef[56]](_0x6cef[58],function(_0xb7bfx1f){_0xb7bfx17[_0x6cef[59]]= isNaN(_0xb7bfx1f[_0x6cef[60]])?null:_0xb7bfx1f[_0x6cef[60]]* 1000;_0xb7bfx17[_0x6cef[61]]= isNaN(_0xb7bfx1f[_0x6cef[62]])?null:_0xb7bfx1f[_0x6cef[62]];_0xb7bfx17[_0x6cef[63]]= isNaN(_0xb7bfx1f[_0x6cef[64]])?null:_0xb7bfx1f[_0x6cef[64]];_0xb7bfx17[_0x6cef[65]]= isNaN(_0xb7bfx1f[_0x6cef[66]])?null:_0xb7bfx1f[_0x6cef[66]];_0xb7bfx17[_0x6cef[67]]= isNaN(_0xb7bfx1f[_0x6cef[68]])?null:_0xb7bfx1f[_0x6cef[68]]});_0xb7bfx1c[_0x6cef[56]](_0x6cef[69],function(_0xb7bfx1f){_0xb7bfx17[_0x6cef[70]]= isNaN(_0xb7bfx1f[_0x6cef[60]])?null:_0xb7bfx1f[_0x6cef[60]]* 1000;_0xb7bfx17[_0x6cef[71]]= isNaN(_0xb7bfx1f[_0x6cef[62]])?null:_0xb7bfx1f[_0x6cef[62]];_0xb7bfx17[_0x6cef[72]]= isNaN(_0xb7bfx1f[_0x6cef[64]])?null:_0xb7bfx1f[_0x6cef[64]];_0xb7bfx17[_0x6cef[73]]= isNaN(_0xb7bfx1f[_0x6cef[66]])?null:_0xb7bfx1f[_0x6cef[66]];_0xb7bfx17[_0x6cef[74]]= isNaN(_0xb7bfx1f[_0x6cef[68]])?null:_0xb7bfx1f[_0x6cef[68]]});_0xb7bfx1c[_0x6cef[56]](_0x6cef[34],function(){console[_0x6cef[76]](_0x6cef[75]);fs[_0x6cef[50]](_0xb7bfx1a,parseInt(_0x6cef[49],8));return Sound[_0x6cef[25]](_0xb7bfx17)[_0x6cef[18]](function(_0xb7bfx20){return _0xb7bfxe[_0x6cef[17]](201)[_0x6cef[16]](_0xb7bfx20)})[_0x6cef[15]](function(_0xb7bfxf){console[_0x6cef[76]](_0xb7bfxf);return handleError(_0xb7bfxe,_0xb7bfxf)})});_0xb7bfx1c[_0x6cef[77]]()})[_0x6cef[15]](function(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)})});_0xb7bfx11[_0x6cef[56]](_0x6cef[53],function(_0xb7bfxf){console[_0x6cef[76]](_0x6cef[78],_0xb7bfxf);return handleError(_0xb7bfxe,_0xb7bfxf)});_0xb7bfx11[_0x6cef[79]](_0xb7bfxd)};exports[_0x6cef[80]]= function(_0xb7bfxd,_0xb7bfxe){if(_0xb7bfxd[_0x6cef[81]][_0x6cef[22]]){delete _0xb7bfxd[_0x6cef[81]][_0x6cef[22]]};return Sound[_0x6cef[24]](_0xb7bfxd[_0x6cef[23]][_0x6cef[22]])[_0x6cef[18]](function(_0xb7bfx20){if(!_0xb7bfx20){return _0xb7bfxe[_0x6cef[21]](404)};var _0xb7bfx21=_[_0x6cef[82]](_0xb7bfx20,_0xb7bfxd[_0x6cef[81]]);return _0xb7bfx21[_0x6cef[83]]()})[_0x6cef[18]](function(_0xb7bfx20){return _0xb7bfxe[_0x6cef[17]](200)[_0x6cef[16]](_0xb7bfx20)})[_0x6cef[15]](function(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)})};exports[_0x6cef[84]]= function(_0xb7bfxd,_0xb7bfxe){var _0xb7bfx22;return Setting[_0x6cef[24]](1)[_0x6cef[18]](function(_0xb7bfx16){_0xb7bfx22= _0xb7bfx16;return Sound[_0x6cef[24]](_0xb7bfxd[_0x6cef[23]][_0x6cef[22]])})[_0x6cef[18]](function(_0xb7bfx20){if(!_0xb7bfx20){return _0xb7bfxe[_0x6cef[21]](404)};var _0xb7bfx23=path[_0x6cef[27]](config[_0x6cef[26]],_0xb7bfx20[_0x6cef[45]]+ _0x6cef[48]+ _0xb7bfx20[_0x6cef[38]]);var _0xb7bfx24=path[_0x6cef[27]](_0xb7bfx22[_0x6cef[46]]|| _0x6cef[47],_0xb7bfx20[_0x6cef[45]]+ _0x6cef[48]+ _0xb7bfx20[_0x6cef[40]]);return sequelize[_0x6cef[85]](function(_0xb7bfx25){return _0xb7bfx20[_0x6cef[84]]({transaction:_0xb7bfx25})[_0x6cef[18]](function(){fs[_0x6cef[55]](_0xb7bfx23,function(_0xb7bfxf){if(_0xb7bfxf){console[_0x6cef[76]](_0xb7bfxf)}});fs[_0x6cef[55]](_0xb7bfx24,function(_0xb7bfxf){if(_0xb7bfxf){console[_0x6cef[76]](_0xb7bfxf)}});return _0xb7bfxe[_0x6cef[17]](200)[_0x6cef[16]](_0xb7bfx20)})})[_0x6cef[15]](function(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)})})[_0x6cef[15]](function(_0xb7bfxf){return handleError(_0xb7bfxe,_0xb7bfxf)})};exports[_0x6cef[86]]= function(_0xb7bfxd,_0xb7bfxe){getStream(_0xb7bfxd,_0xb7bfxe,_0x6cef[87])};exports[_0x6cef[88]]= function(_0xb7bfxd,_0xb7bfxe){getStream(_0xb7bfxd,_0xb7bfxe,_0x6cef[89])};function getStream(_0xb7bfxd,_0xb7bfxe,_0xb7bfx27){return Sound[_0x6cef[24]](_0xb7bfxd[_0x6cef[23]][_0x6cef[22]])[_0x6cef[18]](function(_0xb7bfx20){var _0xb7bfx29=Promise[_0x6cef[93]](fs[_0x6cef[92]]);return _0xb7bfx29(path[_0x6cef[27]](config[_0xb7bfx27+ _0x6cef[94]],_0xb7bfx20[_0x6cef[45]]+ _0x6cef[48]+ _0xb7bfx20[_0xb7bfx27+ _0x6cef[95]]))})[_0x6cef[18]](function(_0xb7bfx1b){var _0xb7bfx28= new Buffer(_0xb7bfx1b,_0x6cef[91]).toString(_0x6cef[90]);return _0xb7bfx28})[_0x6cef[18]](function(_0xb7bfx28){return _0xb7bfxe[_0x6cef[17]](200)[_0x6cef[16]]({downloadString:_0xb7bfx28})})[_0x6cef[15]](function(_0xb7bfxf){console[_0x6cef[76]](_0xb7bfxf);return handleError(_0xb7bfxe,_0xb7bfxf)})}function handleError(_0xb7bfxe,_0xb7bfxf){return _0xb7bfxe[_0x6cef[17]](500)[_0x6cef[16]](_0xb7bfxf)}
\ No newline at end of file