import warnings
warnings.simplefilter('ignore')
import nussl
import numpy as np
# from common import viz
mix = nussl.AudioSignal('pop.mp3')
# stft = signal1.stft()
repet = nussl.separation.primitive.Repet(mix)
repet.run()
repet_bg, repet_fg = repet.make_audio_signals()
# Will run the algorithm and return AudioSignals in one step
repet = nussl.separation.primitive.Repet(mix)
repet_bg, repet_fg = repet()
repet_bg.istft()
repet_bg.embed_audio()
repet_fg.istft()
repet_fg.embed_audio()
repet_bg.write_audio_to_file('bg2.wav')
repet_fg.write_audio_to_file('fg2.wav')