from spleeter.separator import Separator def split_audio(): from spleeter.separator import Separator separator = Separator('spleeter:2stems') separator.separate_to_file("song.mp3", '/', codec="mp3", filename_format="{instrument}.{codec}") split_audio()