sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
Loading...
Searching...
No Matches
sherpa_onnx::cxx::OnlineSpeechDenoiser Class Reference

RAII wrapper for online speech denoising. More...

#include <cxx-api.h>

+ Inheritance diagram for sherpa_onnx::cxx::OnlineSpeechDenoiser:
+ Collaboration diagram for sherpa_onnx::cxx::OnlineSpeechDenoiser:

Public Member Functions

void Destroy (const SherpaOnnxOnlineSpeechDenoiser *p) const
 Destroy the wrapped C handle.
 
DenoisedAudio Run (const float *samples, int32_t n, int32_t sample_rate) const
 Process one chunk of streaming audio.
 
DenoisedAudio Flush () const
 Flush buffered audio and reset the denoiser.
 
void Reset () const
 Reset the denoiser for a new stream.
 
int32_t GetSampleRate () const
 Return the expected input sample rate.
 
int32_t GetFrameShiftInSamples () const
 Return the recommended frame shift in samples for streaming input.
 
- Public Member Functions inherited from sherpa_onnx::cxx::MoveOnly< OnlineSpeechDenoiser, SherpaOnnxOnlineSpeechDenoiser >
 MoveOnly ()=default
 Construct an empty wrapper.
 
 MoveOnly (const SherpaOnnxOnlineSpeechDenoiser *p)
 Construct a wrapper from a raw C handle.
 
 MoveOnly (const MoveOnly &)=delete
 
 MoveOnly (MoveOnly &&other)
 
 ~MoveOnly ()
 Destroy the wrapped handle if present.
 
MoveOnlyoperator= (const MoveOnly &)=delete
 
MoveOnlyoperator= (MoveOnly &&other)
 
const SherpaOnnxOnlineSpeechDenoiserGet () const
 Return the wrapped raw pointer without transferring ownership.
 
const SherpaOnnxOnlineSpeechDenoiserRelease ()
 Release ownership of the wrapped raw pointer.
 

Static Public Member Functions

static OnlineSpeechDenoiser Create (const OnlineSpeechDenoiserConfig &config)
 Create an online speech denoiser.
 

Additional Inherited Members

- Protected Attributes inherited from sherpa_onnx::cxx::MoveOnly< OnlineSpeechDenoiser, SherpaOnnxOnlineSpeechDenoiser >
const SherpaOnnxOnlineSpeechDenoiserp_
 

Detailed Description

Definition at line 1284 of file cxx-api.h.

Member Function Documentation

◆ Create()

static OnlineSpeechDenoiser sherpa_onnx::cxx::OnlineSpeechDenoiser::Create ( const OnlineSpeechDenoiserConfig config)
static

◆ Destroy()

void sherpa_onnx::cxx::OnlineSpeechDenoiser::Destroy ( const SherpaOnnxOnlineSpeechDenoiser p) const

◆ Flush()

DenoisedAudio sherpa_onnx::cxx::OnlineSpeechDenoiser::Flush ( ) const

◆ GetFrameShiftInSamples()

int32_t sherpa_onnx::cxx::OnlineSpeechDenoiser::GetFrameShiftInSamples ( ) const

◆ GetSampleRate()

int32_t sherpa_onnx::cxx::OnlineSpeechDenoiser::GetSampleRate ( ) const

◆ Reset()

void sherpa_onnx::cxx::OnlineSpeechDenoiser::Reset ( ) const

◆ Run()

DenoisedAudio sherpa_onnx::cxx::OnlineSpeechDenoiser::Run ( const float *  samples,
int32_t  n,
int32_t  sample_rate 
) const

The documentation for this class was generated from the following file: