|
sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
|
RAII wrapper for linear resampling. More...
#include <cxx-api.h>
Inheritance diagram for sherpa_onnx::cxx::LinearResampler:
Collaboration diagram for sherpa_onnx::cxx::LinearResampler:Public Member Functions | |
| LinearResampler ()=default | |
| Construct an empty wrapper. | |
| void | Destroy (const SherpaOnnxLinearResampler *p) const |
| Destroy the wrapped C handle. | |
| void | Reset () const |
| Reset the resampler state. | |
| std::vector< float > | Resample (const float *input, int32_t input_dim, bool flush) const |
| Resample one chunk of input audio. | |
| int32_t | GetInputSamplingRate () const |
| Return the input sample rate in Hz. | |
| int32_t | GetOutputSamplingRate () const |
| Return the output sample rate in Hz. | |
Public Member Functions inherited from sherpa_onnx::cxx::MoveOnly< LinearResampler, SherpaOnnxLinearResampler > | |
| MoveOnly ()=default | |
| Construct an empty wrapper. | |
| MoveOnly (const SherpaOnnxLinearResampler *p) | |
| Construct a wrapper from a raw C handle. | |
| MoveOnly (const MoveOnly &)=delete | |
| MoveOnly (MoveOnly &&other) | |
| ~MoveOnly () | |
| Destroy the wrapped handle if present. | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| MoveOnly & | operator= (MoveOnly &&other) |
| const SherpaOnnxLinearResampler * | Get () const |
| Return the wrapped raw pointer without transferring ownership. | |
| const SherpaOnnxLinearResampler * | Release () |
| Release ownership of the wrapped raw pointer. | |
Static Public Member Functions | |
| static LinearResampler | Create (int32_t samp_rate_in_hz, int32_t samp_rate_out_hz, float filter_cutoff_hz, int32_t num_zeros) |
| Create a linear resampler. | |
Additional Inherited Members | |
Protected Attributes inherited from sherpa_onnx::cxx::MoveOnly< LinearResampler, SherpaOnnxLinearResampler > | |
| const SherpaOnnxLinearResampler * | p_ |
|
default |
|
static |
| void sherpa_onnx::cxx::LinearResampler::Destroy | ( | const SherpaOnnxLinearResampler * | p | ) | const |
| int32_t sherpa_onnx::cxx::LinearResampler::GetInputSamplingRate | ( | ) | const |
| int32_t sherpa_onnx::cxx::LinearResampler::GetOutputSamplingRate | ( | ) | const |
| std::vector< float > sherpa_onnx::cxx::LinearResampler::Resample | ( | const float * | input, |
| int32_t | input_dim, | ||
| bool | flush | ||
| ) | const |
| void sherpa_onnx::cxx::LinearResampler::Reset | ( | ) | const |