"tasks/orqa/unsupervised/tokenizers.py" did not exist on "8b04e0e43e180e6ae8ca2442ed37df1f6aa581fb"
effects.h 741 Bytes
Newer Older
1
2
3
#ifndef TORCHAUDIO_SOX_EFFECTS_H
#define TORCHAUDIO_SOX_EFFECTS_H

4
#include <libtorchaudio/sox/utils.h>
5
6
#include <torch/script.h>

Moto Hira's avatar
Moto Hira committed
7
namespace torchaudio::sox {
8
9
10
11
12

void initialize_sox_effects();

void shutdown_sox_effects();

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

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

Moto Hira's avatar
Moto Hira committed
27
} // namespace torchaudio::sox
28
29

#endif