From ccb379c36e07d4b4151e1fc0df7e90d071f7c1bd Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Wed, 27 Nov 2024 22:03:21 +0000 Subject: [PATCH 1/4] Pass all envvars to child process, helps ROCm to work --- main-src/processQueue.cjs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main-src/processQueue.cjs b/main-src/processQueue.cjs index 83a5d51..8bcd1c5 100644 --- a/main-src/processQueue.cjs +++ b/main-src/processQueue.cjs @@ -61,10 +61,7 @@ const PATH_TO_FFMPEG = PATH_TO_THIRD_PARTY_APPS const DEMUCS_EXE_NAME = PATH_TO_THIRD_PARTY_APPS ? 'demucs-cxfreeze' : 'demucs' const FFMPEG_EXE_NAME = 'ffmpeg' const CHILD_PROCESS_ENV = { - CUDA_PATH: process.env.CUDA_PATH, - PATH: process.env.PATH, - TEMP: process.env.TEMP, - TMP: process.env.TMP, + ... process.env, LANG: null, // Will be set when ready to split, since we can only check system locale after `app` is ready } if (PATH_TO_THIRD_PARTY_APPS) { From 624c59ee6b1db12d4c6237657c068f1e08af9f22 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Wed, 27 Nov 2024 22:04:55 +0000 Subject: [PATCH 2/4] Hint about ffmpeg not being detected by torchaudio on GNU/Linux --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 45a72a0..313ef01 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ npm i -D Install `ffmpeg` globally using your preferred package manager, and install `demucs` globally with `pip`. +If you get "Couldn't find appropriate backend" errors, try installing `libsox-dev` instead. + ## Run in Development Mode `npm run dev` From b5adc6a708abb827ccae388717229c180b717270 Mon Sep 17 00:00:00 2001 From: iffyloop <35245220+iffyloop@users.noreply.github.com> Date: Sun, 26 Jan 2025 22:32:40 -0600 Subject: [PATCH 3/4] Minor formatting updates --- README.md | 3 +-- main-src/processQueue.cjs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 313ef01..153a6c0 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,7 @@ npm i -D ### Linux (Not officially supported) Install `ffmpeg` globally using your preferred package manager, and install `demucs` globally with `pip`. - -If you get "Couldn't find appropriate backend" errors, try installing `libsox-dev` instead. +If you get "Couldn't find appropriate backend" errors, try installing `libsox-dev`. ## Run in Development Mode diff --git a/main-src/processQueue.cjs b/main-src/processQueue.cjs index 8bcd1c5..f7fdbdc 100644 --- a/main-src/processQueue.cjs +++ b/main-src/processQueue.cjs @@ -61,7 +61,7 @@ const PATH_TO_FFMPEG = PATH_TO_THIRD_PARTY_APPS const DEMUCS_EXE_NAME = PATH_TO_THIRD_PARTY_APPS ? 'demucs-cxfreeze' : 'demucs' const FFMPEG_EXE_NAME = 'ffmpeg' const CHILD_PROCESS_ENV = { - ... process.env, + ...process.env, LANG: null, // Will be set when ready to split, since we can only check system locale after `app` is ready } if (PATH_TO_THIRD_PARTY_APPS) { From 4fe8ebe8ad50a74be447da4260f0d0512835c595 Mon Sep 17 00:00:00 2001 From: iffyloop <35245220+iffyloop@users.noreply.github.com> Date: Sun, 26 Jan 2025 22:37:40 -0600 Subject: [PATCH 4/4] Update ytdl-core and StemRoller package.json version --- package-lock.json | 141 ++++++++++++++++++++++++++++++---------------- package.json | 4 +- 2 files changed, 93 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5f6aaa..61b063b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "stemroller", - "version": "2.1.1", + "version": "2.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "stemroller", - "version": "2.1.1", + "version": "2.1.2", "license": "Unlicense", "dependencies": { - "@distube/ytdl-core": "^4.14.1", + "@distube/ytdl-core": "^4.15.9", "compare-versions": "^4.1.3", "electron-fetch": "^1.7.4", "electron-serve": "^1.1.0", @@ -66,11 +66,12 @@ } }, "node_modules/@distube/ytdl-core": { - "version": "4.14.1", - "resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.14.1.tgz", - "integrity": "sha512-ymtw6IZyyUAzE+9Nbnhxa7PcFkPI+5OF9ckJZtqnI7gHlEH41jew6Z/im7mOAhmmiy6ppYXoAL0GhJIGRSGR1g==", + "version": "4.15.9", + "resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.15.9.tgz", + "integrity": "sha512-8rFL1NAMsYz4t7Ryaz09Ld7VgoBurGB0KECG8BpTR2vikN0gD1VVusdfZqTYK/gp7uj/TbTJBa85oMCiVXvxcA==", "dependencies": { - "http-cookie-agent": "^6.0.5", + "http-cookie-agent": "^6.0.8", + "https-proxy-agent": "^7.0.6", "m3u8stream": "^0.8.6", "miniget": "^4.2.3", "sax": "^1.4.1", @@ -84,6 +85,26 @@ "url": "https://github.com/distubejs/ytdl-core?sponsor" } }, + "node_modules/@distube/ytdl-core/node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@distube/ytdl-core/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/@electron/get": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz", @@ -4561,11 +4582,11 @@ "dev": true }, "node_modules/http-cookie-agent": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.5.tgz", - "integrity": "sha512-sfZ8fDgDP3B1YB+teqSnAK1aPgBu8reUUGxSsndP2XnYN6cM29EURXWXZqQQiaRdor3B4QjpkUNfv21syaO4DA==", + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.8.tgz", + "integrity": "sha512-qnYh3yLSr2jBsTYkw11elq+T361uKAJaZ2dR4cfYZChw1dt9uL5t3zSUwehoqqVb4oldk1BpkXKm2oat8zV+oA==", "dependencies": { - "agent-base": "^7.1.1" + "agent-base": "^7.1.3" }, "engines": { "node": ">=18.0.0" @@ -4574,7 +4595,7 @@ "url": "https://github.com/sponsors/3846masa" }, "peerDependencies": { - "tough-cookie": "^4.0.0", + "tough-cookie": "^4.0.0 || ^5.0.0", "undici": "^5.11.0 || ^6.0.0" }, "peerDependenciesMeta": { @@ -4584,12 +4605,9 @@ } }, "node_modules/http-cookie-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "engines": { "node": ">= 14" } @@ -6134,9 +6152,15 @@ "dev": true }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } }, "node_modules/pump": { "version": "3.0.0", @@ -6149,9 +6173,9 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -7386,9 +7410,9 @@ "dev": true }, "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -7754,16 +7778,33 @@ } }, "@distube/ytdl-core": { - "version": "4.14.1", - "resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.14.1.tgz", - "integrity": "sha512-ymtw6IZyyUAzE+9Nbnhxa7PcFkPI+5OF9ckJZtqnI7gHlEH41jew6Z/im7mOAhmmiy6ppYXoAL0GhJIGRSGR1g==", + "version": "4.15.9", + "resolved": "https://registry.npmjs.org/@distube/ytdl-core/-/ytdl-core-4.15.9.tgz", + "integrity": "sha512-8rFL1NAMsYz4t7Ryaz09Ld7VgoBurGB0KECG8BpTR2vikN0gD1VVusdfZqTYK/gp7uj/TbTJBa85oMCiVXvxcA==", "requires": { - "http-cookie-agent": "^6.0.5", + "http-cookie-agent": "^6.0.8", + "https-proxy-agent": "^7.0.6", "m3u8stream": "^0.8.6", "miniget": "^4.2.3", "sax": "^1.4.1", "tough-cookie": "^4.1.4", "undici": "five" + }, + "dependencies": { + "agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==" + }, + "https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "requires": { + "agent-base": "^7.1.2", + "debug": "4" + } + } } }, "@electron/get": { @@ -11124,20 +11165,17 @@ "dev": true }, "http-cookie-agent": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.5.tgz", - "integrity": "sha512-sfZ8fDgDP3B1YB+teqSnAK1aPgBu8reUUGxSsndP2XnYN6cM29EURXWXZqQQiaRdor3B4QjpkUNfv21syaO4DA==", + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-6.0.8.tgz", + "integrity": "sha512-qnYh3yLSr2jBsTYkw11elq+T361uKAJaZ2dR4cfYZChw1dt9uL5t3zSUwehoqqVb4oldk1BpkXKm2oat8zV+oA==", "requires": { - "agent-base": "^7.1.1" + "agent-base": "^7.1.3" }, "dependencies": { "agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "requires": { - "debug": "^4.3.4" - } + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==" } } }, @@ -12262,9 +12300,12 @@ "dev": true }, "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "requires": { + "punycode": "^2.3.1" + } }, "pump": { "version": "3.0.0", @@ -12277,9 +12318,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" }, "querystringify": { "version": "2.2.0", @@ -13196,9 +13237,9 @@ "dev": true }, "undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", "requires": { "@fastify/busboy": "^2.0.0" } diff --git a/package.json b/package.json index 616761b..70b8fe3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stemroller", - "version": "2.1.1", + "version": "2.1.2", "private": true, "type": "module", "description": "Isolate vocals, drums, bass, and other instrumental stems from any song", @@ -54,7 +54,7 @@ "tailwindcss": "^3.1.4" }, "dependencies": { - "@distube/ytdl-core": "^4.14.1", + "@distube/ytdl-core": "^4.15.9", "compare-versions": "^4.1.3", "electron-fetch": "^1.7.4", "electron-serve": "^1.1.0",