Commit a81b0ed2 authored by Moto Hira's avatar Moto Hira Committed by Facebook GitHub Bot
Browse files

Simplify sox namespace (#3383)

Summary:
Pull Request resolved: https://github.com/pytorch/audio/pull/3383

This commit reduces `torchaudio::sox_*` namespace into `torchaudio::sox`.
Also put Pybind11 registration and TorchBind registration into anonymous namescope.

Differential Revision: D46257367

fbshipit-source-id: 0f0f181eaa72036916e223263daf4b7c298fca0d
parent 6425d46c
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
#include <torchaudio/csrc/sox/effects_chain.h> #include <torchaudio/csrc/sox/effects_chain.h>
#include <torchaudio/csrc/sox/utils.h> #include <torchaudio/csrc/sox/utils.h>
using namespace torchaudio::sox_utils; namespace torchaudio::sox {
namespace torchaudio {
namespace sox_effects {
namespace { namespace {
enum SoxEffectsResourceState { NotInitialized, Initialized, ShutDown }; enum SoxEffectsResourceState { NotInitialized, Initialized, ShutDown };
...@@ -58,7 +54,7 @@ auto apply_effects_tensor( ...@@ -58,7 +54,7 @@ auto apply_effects_tensor(
// Create SoxEffectsChain // Create SoxEffectsChain
const auto dtype = waveform.dtype(); const auto dtype = waveform.dtype();
torchaudio::sox_effects_chain::SoxEffectsChain chain( SoxEffectsChain chain(
/*input_encoding=*/get_tensor_encodinginfo(dtype), /*input_encoding=*/get_tensor_encodinginfo(dtype),
/*output_encoding=*/get_tensor_encodinginfo(dtype)); /*output_encoding=*/get_tensor_encodinginfo(dtype));
...@@ -113,7 +109,7 @@ auto apply_effects_file( ...@@ -113,7 +109,7 @@ auto apply_effects_file(
out_buffer.reserve(sf->signal.length); out_buffer.reserve(sf->signal.length);
// Create and run SoxEffectsChain // Create and run SoxEffectsChain
torchaudio::sox_effects_chain::SoxEffectsChain chain( SoxEffectsChain chain(
/*input_encoding=*/sf->encoding, /*input_encoding=*/sf->encoding,
/*output_encoding=*/get_tensor_encodinginfo(dtype)); /*output_encoding=*/get_tensor_encodinginfo(dtype));
...@@ -138,20 +134,16 @@ auto apply_effects_file( ...@@ -138,20 +134,16 @@ auto apply_effects_file(
tensor, chain.getOutputSampleRate()); tensor, chain.getOutputSampleRate());
} }
namespace {
TORCH_LIBRARY_FRAGMENT(torchaudio, m) { TORCH_LIBRARY_FRAGMENT(torchaudio, m) {
m.def( m.def(
"torchaudio::sox_effects_initialize_sox_effects", "torchaudio::sox_effects_initialize_sox_effects",
&torchaudio::sox_effects::initialize_sox_effects); &initialize_sox_effects);
m.def( m.def("torchaudio::sox_effects_shutdown_sox_effects", &shutdown_sox_effects);
"torchaudio::sox_effects_shutdown_sox_effects", m.def("torchaudio::sox_effects_apply_effects_tensor", &apply_effects_tensor);
&torchaudio::sox_effects::shutdown_sox_effects); m.def("torchaudio::sox_effects_apply_effects_file", &apply_effects_file);
m.def(
"torchaudio::sox_effects_apply_effects_tensor",
&torchaudio::sox_effects::apply_effects_tensor);
m.def(
"torchaudio::sox_effects_apply_effects_file",
&torchaudio::sox_effects::apply_effects_file);
} }
} // namespace sox_effects } // namespace
} // namespace torchaudio } // namespace torchaudio::sox
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#include <torch/script.h> #include <torch/script.h>
#include <torchaudio/csrc/sox/utils.h> #include <torchaudio/csrc/sox/utils.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_effects {
void initialize_sox_effects(); void initialize_sox_effects();
...@@ -25,7 +24,6 @@ auto apply_effects_file( ...@@ -25,7 +24,6 @@ auto apply_effects_file(
const c10::optional<std::string>& format) const c10::optional<std::string>& format)
-> c10::optional<std::tuple<torch::Tensor, int64_t>>; -> c10::optional<std::tuple<torch::Tensor, int64_t>>;
} // namespace sox_effects } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
#include "c10/util/Exception.h" #include "c10/util/Exception.h"
using namespace torch::indexing; using namespace torch::indexing;
using namespace torchaudio::sox_utils;
namespace torchaudio { namespace torchaudio::sox {
namespace sox_effects_chain {
namespace { namespace {
...@@ -300,5 +298,4 @@ int64_t SoxEffectsChain::getOutputSampleRate() { ...@@ -300,5 +298,4 @@ int64_t SoxEffectsChain::getOutputSampleRate() {
return interm_sig_.rate; return interm_sig_.rate;
} }
} // namespace sox_effects_chain } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#include <sox.h> #include <sox.h>
#include <torchaudio/csrc/sox/utils.h> #include <torchaudio/csrc/sox/utils.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_effects_chain {
// Helper struct to safely close sox_effect_t* pointer returned by // Helper struct to safely close sox_effect_t* pointer returned by
// sox_create_effect // sox_create_effect
...@@ -57,7 +56,6 @@ class SoxEffectsChain { ...@@ -57,7 +56,6 @@ class SoxEffectsChain {
int64_t getOutputSampleRate(); int64_t getOutputSampleRate();
}; };
} // namespace sox_effects_chain } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
#include <torchaudio/csrc/sox/utils.h> #include <torchaudio/csrc/sox/utils.h>
using namespace torch::indexing; using namespace torch::indexing;
using namespace torchaudio::sox_utils;
namespace torchaudio { namespace torchaudio::sox {
namespace sox_io {
c10::optional<MetaDataTuple> get_info_file( c10::optional<MetaDataTuple> get_info_file(
const std::string& path, const std::string& path,
...@@ -68,8 +66,7 @@ c10::optional<std::tuple<torch::Tensor, int64_t>> load_audio_file( ...@@ -68,8 +66,7 @@ c10::optional<std::tuple<torch::Tensor, int64_t>> load_audio_file(
c10::optional<bool> channels_first, c10::optional<bool> channels_first,
const c10::optional<std::string>& format) { const c10::optional<std::string>& format) {
auto effects = get_effects(frame_offset, num_frames); auto effects = get_effects(frame_offset, num_frames);
return torchaudio::sox_effects::apply_effects_file( return apply_effects_file(path, effects, normalize, channels_first, format);
path, effects, normalize, channels_first, format);
} }
void save_audio_file( void save_audio_file(
...@@ -123,7 +120,7 @@ void save_audio_file( ...@@ -123,7 +120,7 @@ void save_audio_file(
"Error saving audio file: failed to open file ", "Error saving audio file: failed to open file ",
path); path);
torchaudio::sox_effects_chain::SoxEffectsChain chain( SoxEffectsChain chain(
/*input_encoding=*/get_tensor_encodinginfo(tensor.dtype()), /*input_encoding=*/get_tensor_encodinginfo(tensor.dtype()),
/*output_encoding=*/sf->encoding); /*output_encoding=*/sf->encoding);
chain.addInputTensor(&tensor, sample_rate, channels_first); chain.addInputTensor(&tensor, sample_rate, channels_first);
...@@ -132,14 +129,9 @@ void save_audio_file( ...@@ -132,14 +129,9 @@ void save_audio_file(
} }
TORCH_LIBRARY_FRAGMENT(torchaudio, m) { TORCH_LIBRARY_FRAGMENT(torchaudio, m) {
m.def("torchaudio::sox_io_get_info", &torchaudio::sox_io::get_info_file); m.def("torchaudio::sox_io_get_info", &get_info_file);
m.def( m.def("torchaudio::sox_io_load_audio_file", &load_audio_file);
"torchaudio::sox_io_load_audio_file", m.def("torchaudio::sox_io_save_audio_file", &save_audio_file);
&torchaudio::sox_io::load_audio_file);
m.def(
"torchaudio::sox_io_save_audio_file",
&torchaudio::sox_io::save_audio_file);
} }
} // namespace sox_io } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#include <torch/script.h> #include <torch/script.h>
#include <torchaudio/csrc/sox/utils.h> #include <torchaudio/csrc/sox/utils.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_io {
auto get_effects( auto get_effects(
const c10::optional<int64_t>& frame_offset, const c10::optional<int64_t>& frame_offset,
...@@ -37,7 +36,6 @@ void save_audio_file( ...@@ -37,7 +36,6 @@ void save_audio_file(
c10::optional<std::string> encoding, c10::optional<std::string> encoding,
c10::optional<int64_t> bits_per_sample); c10::optional<int64_t> bits_per_sample);
} // namespace sox_io } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
#include <torchaudio/csrc/sox/pybind/effects_chain.h> #include <torchaudio/csrc/sox/pybind/effects_chain.h>
#include <torchaudio/csrc/sox/pybind/utils.h> #include <torchaudio/csrc/sox/pybind/utils.h>
using namespace torchaudio::sox_utils; namespace torchaudio::sox {
namespace torchaudio {
namespace sox_effects {
// Streaming decoding over file-like object is tricky because libsox operates on // Streaming decoding over file-like object is tricky because libsox operates on
// FILE pointer. The folloing is what `sox` and `play` commands do // FILE pointer. The folloing is what `sox` and `play` commands do
...@@ -95,7 +92,7 @@ auto apply_effects_fileobj( ...@@ -95,7 +92,7 @@ auto apply_effects_fileobj(
// Create and run SoxEffectsChain // Create and run SoxEffectsChain
const auto dtype = get_dtype(sf->encoding.encoding, sf->signal.precision); const auto dtype = get_dtype(sf->encoding.encoding, sf->signal.precision);
torchaudio::sox_effects_chain::SoxEffectsChainPyBind chain( SoxEffectsChainPyBind chain(
/*input_encoding=*/sf->encoding, /*input_encoding=*/sf->encoding,
/*output_encoding=*/get_tensor_encodinginfo(dtype)); /*output_encoding=*/get_tensor_encodinginfo(dtype));
chain.addInputFileObj(sf, in_buf, in_buffer_size, &fileobj); chain.addInputFileObj(sf, in_buf, in_buffer_size, &fileobj);
...@@ -119,5 +116,4 @@ auto apply_effects_fileobj( ...@@ -119,5 +116,4 @@ auto apply_effects_fileobj(
tensor, static_cast<int64_t>(chain.getOutputSampleRate())); tensor, static_cast<int64_t>(chain.getOutputSampleRate()));
} }
} // namespace sox_effects } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
#include <torch/extension.h> #include <torch/extension.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_effects {
auto apply_effects_fileobj( auto apply_effects_fileobj(
py::object fileobj, py::object fileobj,
...@@ -14,7 +13,6 @@ auto apply_effects_fileobj( ...@@ -14,7 +13,6 @@ auto apply_effects_fileobj(
c10::optional<std::string> format) c10::optional<std::string> format)
-> c10::optional<std::tuple<torch::Tensor, int64_t>>; -> c10::optional<std::tuple<torch::Tensor, int64_t>>;
} // namespace sox_effects } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
#include <torchaudio/csrc/sox/pybind/effects_chain.h> #include <torchaudio/csrc/sox/pybind/effects_chain.h>
#include <torchaudio/csrc/sox/pybind/utils.h> #include <torchaudio/csrc/sox/pybind/utils.h>
using namespace torchaudio::sox_utils; namespace torchaudio::sox {
namespace torchaudio {
namespace sox_effects_chain {
namespace { namespace {
/// helper classes for passing file-like object to SoxEffectChain /// helper classes for passing file-like object to SoxEffectChain
...@@ -233,5 +229,4 @@ void SoxEffectsChainPyBind::addOutputFileObj( ...@@ -233,5 +229,4 @@ void SoxEffectsChainPyBind::addOutputFileObj(
} }
} }
} // namespace sox_effects_chain } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#include <torch/extension.h> #include <torch/extension.h>
#include <torchaudio/csrc/sox/effects_chain.h> #include <torchaudio/csrc/sox/effects_chain.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_effects_chain {
class SoxEffectsChainPyBind : public SoxEffectsChain { class SoxEffectsChainPyBind : public SoxEffectsChain {
using SoxEffectsChain::SoxEffectsChain; using SoxEffectsChain::SoxEffectsChain;
...@@ -24,7 +23,6 @@ class SoxEffectsChainPyBind : public SoxEffectsChain { ...@@ -24,7 +23,6 @@ class SoxEffectsChainPyBind : public SoxEffectsChain {
py::object* fileobj); py::object* fileobj);
}; };
} // namespace sox_effects_chain } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -7,10 +7,7 @@ ...@@ -7,10 +7,7 @@
#include <utility> #include <utility>
using namespace torchaudio::sox_utils; namespace torchaudio::sox {
namespace torchaudio {
namespace sox_io {
auto get_info_fileobj(py::object fileobj, c10::optional<std::string> format) auto get_info_fileobj(py::object fileobj, c10::optional<std::string> format)
-> c10::optional<MetaDataTuple> { -> c10::optional<MetaDataTuple> {
...@@ -83,7 +80,7 @@ auto load_audio_fileobj( ...@@ -83,7 +80,7 @@ auto load_audio_fileobj(
c10::optional<std::string> format) c10::optional<std::string> format)
-> c10::optional<std::tuple<torch::Tensor, int64_t>> { -> c10::optional<std::tuple<torch::Tensor, int64_t>> {
auto effects = get_effects(frame_offset, num_frames); auto effects = get_effects(frame_offset, num_frames);
return torchaudio::sox_effects::apply_effects_fileobj( return apply_effects_fileobj(
std::move(fileobj), std::move(fileobj),
effects, effects,
normalize, normalize,
...@@ -177,7 +174,7 @@ void save_audio_fileobj( ...@@ -177,7 +174,7 @@ void save_audio_fileobj(
"Error saving audio file: failed to open memory stream."); "Error saving audio file: failed to open memory stream.");
} }
torchaudio::sox_effects_chain::SoxEffectsChainPyBind chain( SoxEffectsChainPyBind chain(
/*input_encoding=*/get_tensor_encodinginfo(tensor.dtype()), /*input_encoding=*/get_tensor_encodinginfo(tensor.dtype()),
/*output_encoding=*/sf->encoding); /*output_encoding=*/sf->encoding);
chain.addInputTensor(&tensor, sample_rate, channels_first); chain.addInputTensor(&tensor, sample_rate, channels_first);
...@@ -191,5 +188,4 @@ void save_audio_fileobj( ...@@ -191,5 +188,4 @@ void save_audio_fileobj(
fileobj.attr("write")(py::bytes(buffer.ptr, buffer.size)); fileobj.attr("write")(py::bytes(buffer.ptr, buffer.size));
} }
} // namespace sox_io } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
#include <torch/extension.h> #include <torch/extension.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_io {
using MetaDataTuple = using MetaDataTuple =
std::tuple<int64_t, int64_t, int64_t, int64_t, std::string>; std::tuple<int64_t, int64_t, int64_t, int64_t, std::string>;
...@@ -31,7 +30,6 @@ void save_audio_fileobj( ...@@ -31,7 +30,6 @@ void save_audio_fileobj(
c10::optional<std::string> encoding, c10::optional<std::string> encoding,
c10::optional<int64_t> bits_per_sample); c10::optional<int64_t> bits_per_sample);
} // namespace sox_io } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -3,21 +3,22 @@ ...@@ -3,21 +3,22 @@
#include <torchaudio/csrc/sox/pybind/effects.h> #include <torchaudio/csrc/sox/pybind/effects.h>
#include <torchaudio/csrc/sox/pybind/io.h> #include <torchaudio/csrc/sox/pybind/io.h>
namespace torchaudio::sox {
namespace {
PYBIND11_MODULE(_torchaudio_sox, m) { PYBIND11_MODULE(_torchaudio_sox, m) {
m.def( m.def(
"get_info_fileobj", "get_info_fileobj",
&torchaudio::sox_io::get_info_fileobj, &get_info_fileobj,
"Get metadata of audio in file object."); "Get metadata of audio in file object.");
m.def( m.def(
"load_audio_fileobj", "load_audio_fileobj",
&torchaudio::sox_io::load_audio_fileobj, &load_audio_fileobj,
"Load audio from file object."); "Load audio from file object.");
m.def( m.def("save_audio_fileobj", &save_audio_fileobj, "Save audio to file obj.");
"save_audio_fileobj",
&torchaudio::sox_io::save_audio_fileobj,
"Save audio to file obj.");
m.def( m.def(
"apply_effects_fileobj", "apply_effects_fileobj",
&torchaudio::sox_effects::apply_effects_fileobj, &apply_effects_fileobj,
"Decode audio data from file-like obj and apply effects."); "Decode audio data from file-like obj and apply effects.");
} }
} // namespace
} // namespace torchaudio::sox
#include <torchaudio/csrc/sox/pybind/utils.h> #include <torchaudio/csrc/sox/pybind/utils.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_utils {
auto read_fileobj(py::object* fileobj, const uint64_t size, char* buffer) auto read_fileobj(py::object* fileobj, const uint64_t size, char* buffer)
-> uint64_t { -> uint64_t {
...@@ -29,5 +28,4 @@ auto read_fileobj(py::object* fileobj, const uint64_t size, char* buffer) ...@@ -29,5 +28,4 @@ auto read_fileobj(py::object* fileobj, const uint64_t size, char* buffer)
return num_read; return num_read;
} }
} // namespace sox_utils } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -3,12 +3,10 @@ ...@@ -3,12 +3,10 @@
#include <torch/extension.h> #include <torch/extension.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_utils {
auto read_fileobj(py::object* fileobj, uint64_t size, char* buffer) -> uint64_t; auto read_fileobj(py::object* fileobj, uint64_t size, char* buffer) -> uint64_t;
} // namespace sox_utils } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
#include <torchaudio/csrc/sox/types.h> #include <torchaudio/csrc/sox/types.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_utils {
Format get_format_from_string(const std::string& format) { Format get_format_from_string(const std::string& format) {
if (format == "wav") if (format == "wav")
...@@ -129,5 +128,4 @@ std::string get_encoding(sox_encoding_t encoding) { ...@@ -129,5 +128,4 @@ std::string get_encoding(sox_encoding_t encoding) {
} }
} }
} // namespace sox_utils } // namespace torchaudio::sox
} // namespace torchaudio
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#include <sox.h> #include <sox.h>
#include <torch/script.h> #include <torch/script.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_utils {
enum class Format { enum class Format {
WAV, WAV,
...@@ -54,7 +53,6 @@ BitDepth get_bit_depth_from_option(const c10::optional<int64_t> bit_depth); ...@@ -54,7 +53,6 @@ BitDepth get_bit_depth_from_option(const c10::optional<int64_t> bit_depth);
std::string get_encoding(sox_encoding_t encoding); std::string get_encoding(sox_encoding_t encoding);
} // namespace sox_utils } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
#include <torchaudio/csrc/sox/types.h> #include <torchaudio/csrc/sox/types.h>
#include <torchaudio/csrc/sox/utils.h> #include <torchaudio/csrc/sox/utils.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_utils {
void set_seed(const int64_t seed) { void set_seed(const int64_t seed) {
sox_get_globals()->ranqd1 = static_cast<sox_int32_t>(seed); sox_get_globals()->ranqd1 = static_cast<sox_int32_t>(seed);
...@@ -492,30 +491,18 @@ sox_encodinginfo_t get_encodinginfo_for_save( ...@@ -492,30 +491,18 @@ sox_encodinginfo_t get_encodinginfo_for_save(
/*opposite_endian=*/sox_false}; /*opposite_endian=*/sox_false};
} }
namespace {
TORCH_LIBRARY_FRAGMENT(torchaudio, m) { TORCH_LIBRARY_FRAGMENT(torchaudio, m) {
m.def("torchaudio::sox_utils_set_seed", &torchaudio::sox_utils::set_seed); m.def("torchaudio::sox_utils_set_seed", &set_seed);
m.def( m.def("torchaudio::sox_utils_set_verbosity", &set_verbosity);
"torchaudio::sox_utils_set_verbosity", m.def("torchaudio::sox_utils_set_use_threads", &set_use_threads);
&torchaudio::sox_utils::set_verbosity); m.def("torchaudio::sox_utils_set_buffer_size", &set_buffer_size);
m.def( m.def("torchaudio::sox_utils_list_effects", &list_effects);
"torchaudio::sox_utils_set_use_threads", m.def("torchaudio::sox_utils_list_read_formats", &list_read_formats);
&torchaudio::sox_utils::set_use_threads); m.def("torchaudio::sox_utils_list_write_formats", &list_write_formats);
m.def( m.def("torchaudio::sox_utils_get_buffer_size", &get_buffer_size);
"torchaudio::sox_utils_set_buffer_size",
&torchaudio::sox_utils::set_buffer_size);
m.def(
"torchaudio::sox_utils_list_effects",
&torchaudio::sox_utils::list_effects);
m.def(
"torchaudio::sox_utils_list_read_formats",
&torchaudio::sox_utils::list_read_formats);
m.def(
"torchaudio::sox_utils_list_write_formats",
&torchaudio::sox_utils::list_write_formats);
m.def(
"torchaudio::sox_utils_get_buffer_size",
&torchaudio::sox_utils::get_buffer_size);
} }
} // namespace sox_utils } // namespace
} // namespace torchaudio } // namespace torchaudio::sox
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
#include <sox.h> #include <sox.h>
#include <torch/script.h> #include <torch/script.h>
namespace torchaudio { namespace torchaudio::sox {
namespace sox_utils {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// APIs for Python interaction // APIs for Python interaction
...@@ -106,6 +105,5 @@ sox_encodinginfo_t get_encodinginfo_for_save( ...@@ -106,6 +105,5 @@ sox_encodinginfo_t get_encodinginfo_for_save(
const c10::optional<std::string> encoding, const c10::optional<std::string> encoding,
const c10::optional<int64_t> bits_per_sample); const c10::optional<int64_t> bits_per_sample);
} // namespace sox_utils } // namespace torchaudio::sox
} // namespace torchaudio
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment