I am trying to spawn Deezer/Spleeter using NodeJS child_process. For the arguments Im passing the location of audio file from the api. Something like this:
const {spawn} = require('child_process');
function runSpleeter(audioPath) {
const command = `spleeter separate -p ${process.env.spleeterModel} -o output ${audioPath}`;
const process = spawn(command);
process.stderr.on('error', (e) => {
console.log(e);
});
}
If I try to run this directly on my terminal it works fine but when I call this through a function on my app I get "The filename, directory name, or volume label syntax is incorrect: https//" error. I believe this error is when it tries to download the models for spleeter.
What can be done to fix this and is there an alternate way of doing this?