effects.h 749 Bytes
Newer Older
1
2
3
4
#ifndef TORCHAUDIO_SOX_EFFECTS_H
#define TORCHAUDIO_SOX_EFFECTS_H

#include <torch/script.h>
moto's avatar
moto committed
5
#include <torchaudio/csrc/sox/utils.h>
6
7
8
9
10
11
12
13

namespace torchaudio {
namespace sox_effects {

void initialize_sox_effects();

void shutdown_sox_effects();

14
15
16
17
18
std::tuple<torch::Tensor, int64_t> apply_effects_tensor(
    torch::Tensor waveform,
    int64_t sample_rate,
    std::vector<std::vector<std::string>> effects,
    bool channels_first);
moto's avatar
moto committed
19

20
std::tuple<torch::Tensor, int64_t> apply_effects_file(
moto's avatar
moto committed
21
22
    const std::string path,
    std::vector<std::vector<std::string>> effects,
23
24
    c10::optional<bool> normalize,
    c10::optional<bool> channels_first,
25
    const c10::optional<std::string>& format);
26
27
28
29
30

} // namespace sox_effects
} // namespace torchaudio

#endif