Spaces:
Runtime error
Runtime error
import nussl | |
import os | |
def run_separation(file_path): | |
signal = nussl.AudioSignal(file_path) | |
repet = nussl.separation.primitive.Repet(signal) | |
bg, fg = repet() | |
bg_file = "bg.wav" | |
fg_file = "fg.wav" | |
bg.write_audio_to_file(bg_file) | |
fg.write_audio_to_file(fg_file) | |
return {"background": bg_file, "foreground": fg_file} | |