text: from spleeter.agent import Agent
  from converter.converter import Converter
  from combiner.combiner import Combiner
  
  
  def separate_and_combine(file_in: str, out_codec: str):
  
      file_dir = file_in.split('/')[0]
      file_name = file_in.rstrip('.' + file_in.split('.')[-1]).split('/')[-1]
      dir = file_dir + "/separated_audio/"
      file_acc = dir + file_name + '_accompaniment' + '.wav'
      file_voc = dir + file_name + '_vocals' + '.wav'
      file_mel = dir + file_name + '_melody' + '.wav'
      file_mel_mid = dir + file_name + '_melody' + '.mid'
      file_out = dir + file_name + '_final' + '.' + out_codec
  
      agent: Agent = Agent()
      agent.separate_audio(file_in)
      conv: Converter = Converter(file_voc, file_mel)
      conv.convert()
      comb: Combiner = Combiner(file_acc, file_mel, file_out)
      comb.combine()
  
  
  if __name__ == '__main__':
      separate_and_combine("../audio/audio_example.mp3", "wav")
      # separate_and_combine("../audio/train01.wav", "wav")
      # separate_and_combine("../audio/train02.wav", "wav")
      # separate_and_combine("../audio/train03.wav", "wav")
      # separate_and_combine("../audio/train04.wav", "wav")
      # separate_and_combine("../audio/train05.wav", "wav")
      # separate_and_combine("../audio/train06.wav", "wav")
      # separate_and_combine("../audio/train07.wav", "wav")
      # separate_and_combine("../audio/train08.wav", "wav")
      # separate_and_combine("../audio/train09.wav", "wav")
  