python – I am utilizing this Spleeter library for vocal seperation however it’s not working


I am utilizing this Spleeter library for vocal seperation
Spleeter-Android-iOS

Nevertheless it provides me 1 as a substitute of 0 after I name the func
spleeterSDK.course of(wavPath!, outPath: path).
I do not know what’s the downside.

Any assist might be appreciated

let ret = spleeterSDK.course of(wavPath!, outPath: path) // right here the ret needs to be zero
    if(ret == 0) {
        let queue = DispatchQueue(label: "process-queue")
        queue.async {
            whereas(true) {
                let progress = self.spleeterSDK.progress()
                DispatchQueue.major.async {
                    self.progress.textual content = String(progress) + "%"
                }
                usleep(1000 * 1000);
                
                if(progress == 100) {
                    break
                }
            }
           
            self.spleeterSDK.saveOne(url.path + "https://blingeach.b-cdn.net/report.wav", stemRatio: UnsafeMutablePointer<Float32>(mutating: self.stemRatio))
            
            DispatchQueue.major.async {
                self.btnProcess.isEnabled = true
                
                do {
                    attempt AVAudioSession.sharedInstance().setCategory(.playback, mode: .default)
                    attempt AVAudioSession.sharedInstance().setActive(true)
                    
                    self.participant = attempt AVAudioPlayer(contentsOf: URL(fileURLWithPath: path + "https://blingeach.b-cdn.net/report.wav"))
                    guard let participant = self.participant else {
                        return
                    }

                    participant.play()
                } catch let error {
                    print(error.localizedDescription)
                }
            }
        }
    }

Leave a Reply

Your email address will not be published.