Offline Interface

The simple interface used to run the neural network on large signals.

Initialize

void spleeter::Initialize(const std::string &path_to_models, const std::unordered_set<SeparationType> &separation_types, std::error_code &err)

Initialize the spleeter tools by loading models at the specified path

Parameters
  • path_to_models: the path to spleeter exported models.
  • separation_types: the types of separation required
  • err: an error code that gets set if something goes wrong

Two stems

void spleeter::Split(const Waveform &input, Waveform *vocals, Waveform *accompaniment, std::error_code &err)

Split the input waveform into vocals and accompaniment

Parameters
  • input: the input waveform
  • vocals: the extracted vocals waveform
  • accompaniment: the extracted accompaniment waveform
  • err: an error code that gets set if something goes wrong. std::errc::protocol_error is obtained when the model hasn’t been properly initialized

Four stems

void spleeter::Split(const Waveform &input, Waveform *vocals, Waveform *drums, Waveform *bass, Waveform *other, std::error_code &err)

Split the input waveform into vocals, drums, bass and other

Parameters
  • input: the input waveform
  • vocals: the extracted vocals waveform
  • drums: the extracted drums waveform
  • bass: the extracted bass waveform
  • other: the extracted other waveform
  • err: an error code that gets set if something goes wrong. std::errc::protocol_error is obtained when the model hasn’t been properly initialized

Five stems

void spleeter::Split(const Waveform &input, Waveform *vocals, Waveform *drums, Waveform *bass, Waveform *piano, Waveform *other, std::error_code &err)

Split the input waveform into vocals, drums, bass, piano and other

Parameters
  • input: the input waveform
  • vocals: the extracted vocals waveform
  • drums: the extracted drums waveform
  • bass: the extracted bass waveform
  • piano: the extracted piano waveform
  • other: the extracted other waveform
  • err: an error code that gets set if something goes wrong. std::errc::protocol_error is obtained when the model hasn’t been properly initialized