// the code is from https://github.com/pytorch/audio/blob/main/torchaudio/csrc/sox/effects.h with modification. #include #include #include "paddleaudio/src/optional/optional.hpp" namespace py = pybind11; namespace paddleaudio::sox_effects { auto apply_effects_fileobj( py::object fileobj, const std::vector>& effects, tl::optional normalize, tl::optional channels_first, tl::optional format) -> tl::optional>; void initialize_sox_effects(); void shutdown_sox_effects(); auto apply_effects_tensor( py::array waveform, int64_t sample_rate, const std::vector>& effects, bool channels_first) -> std::tuple; auto apply_effects_file( const std::string& path, const std::vector>& effects, tl::optional normalize, tl::optional channels_first, const tl::optional& format) -> tl::optional>; } // namespace paddleaudio::sox_effects