spleeter
Version:
Deezers spleeter CLI
34 lines (25 loc) • 798 B
JavaScript
const path = require('path')
const { getOS, OperatingSystem } = require('./getOS')
module.exports = { getBinaryPath }
const supportedOSes = [OperatingSystem.MAC_OS]
function getBinaryPath () {
const os = getOS()
if (!supportedOSes.includes(os)) {
console.error(
`Operating System ${os.toLowerCase()} is not supported yet.`,
)
return
}
switch (os) {
default:
console.error(
`Operating System '${os.toLowerCase()}' is not supported yet.`,
)
return
case OperatingSystem.UNKNOWN:
console.error('Unable to determine OS')
return undefined
case OperatingSystem.MAC_OS:
return path.join(__dirname, '../../bin/macos/spleeter')
}
}