AXCWG 2 ماه پیش
والد
کامیت
c25a9207ad
4فایلهای تغییر یافته به همراه12 افزوده شده و 12 حذف شده
  1. 2 1
      .gitignore
  2. 1 1
      .idea/dataSources.xml
  3. 1 0
      README.md
  4. 8 10
      main.js

+ 2 - 1
.gitignore

@@ -8,4 +8,5 @@ database.db
 .DS_Store
 .idea/.DS_Store
 *.mp3
-log
+log
+sec.js

+ 1 - 1
.idea/dataSources.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
-    <data-source source="LOCAL" name="@8.141.5.12" uuid="d06398b7-49f6-46ef-acd8-28d6def335d4">
+    <data-source source="LOCAL" name="@andyxie.cn" uuid="d06398b7-49f6-46ef-acd8-28d6def335d4">
       <driver-ref>mysql.8</driver-ref>
       <synchronize>true</synchronize>
       <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>

+ 1 - 0
README.md

@@ -23,6 +23,7 @@ Not aimed for public. Classified documents contained.
     3 - bass
     4 - drums
     5 - vocal only (Alternate model)
+    6 - Guitar
 
 
 ## TODO 

+ 8 - 10
main.js

@@ -21,7 +21,7 @@ console.log = (str) => {
         fs.mkdirSync("log")
 
     }
-    fs.appendFileSync("log/latest.log",  "["+new Date().toISOString() + "] " + str.toString()+"\n");
+    fs.appendFileSync("log/latest.log", "[" + new Date().toISOString() + "] " + str.toString() + "\n");
     original(str);
 
 }
@@ -36,6 +36,7 @@ import https from "node:https";
 import nrc from "node-run-cmd";
 
 import bodyParser from "body-parser";
+import sec from "./sec.js";
 
 let argv = Minimist(process.argv.slice(2));
 
@@ -54,15 +55,7 @@ const Kind = {
     5: "其他",
 }
 
-const db = mysql.createConnection({
-    host: 'andyxie.cn',
-    user: 'external',
-    password: 'moyingren2015',
-    database: "instrunet_data",
-    pool: pool,
-    enableKeepAlive: true,
-    keepAliveInitialDelay: 0,
-})
+const db = mysql.createConnection(sec(pool))
 const {OpenCC} = pkg
 
 webp.grant_permission()
@@ -206,6 +199,11 @@ async function Submit(req) {
 
 
             break;
+        case 6:
+            kind_of[0] = `audio-separator ./${uuid} -m htdemucs_6s.yaml --output_format mp3 --output_dir output --single_stem guitar`
+            kind_of[1] = `./output/${uuid}_(Guitar)_htdemucs_6s.mp3`
+            kind_of[2] = `${uuid}_(Guitar)_htdemucs_6s.mp3`
+            kind_of[3] = `./output/${uuid}_(Others)_UVR_MDXNET_Main.mp3`
 
 
     }