diff --git a/yohane-cli/yohane_cli/audio.py b/yohane-cli/yohane_cli/audio.py index ea634725..97b311be 100644 --- a/yohane-cli/yohane_cli/audio.py +++ b/yohane-cli/yohane_cli/audio.py @@ -65,9 +65,9 @@ def save_separated_tracks(yohane: Yohane, song_path: Path): waveform, sample_rate = yohane.vocals filename = song_path.with_suffix(".vocals.wav") logger.info(f"Saving vocals track to {filename}") - torchaudio.save(filename, waveform.to("cpu"), sample_rate) + torchaudio.save(filename.as_posix(), waveform.to("cpu"), sample_rate) if yohane.off_vocal is not None: waveform, sample_rate = yohane.off_vocal filename = song_path.with_suffix(".off_vocal.wav") logger.info(f"Saving off vocal track to {filename}") - torchaudio.save(filename, waveform.to("cpu"), sample_rate) + torchaudio.save(filename.as_posix(), waveform.to("cpu"), sample_rate) diff --git a/yohane/pipeline.py b/yohane/pipeline.py index 6a4c6a3c..389946ae 100644 --- a/yohane/pipeline.py +++ b/yohane/pipeline.py @@ -36,7 +36,7 @@ def off_vocal(self): def load_song(self, song_file: Path): logger.info("Loading song") - self.song = torchaudio.load(song_file) + self.song = torchaudio.load(song_file.as_posix()) def extract_vocals(self): if self.separator is not None: