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.
bool SetVoiceSample (const float *samples, int32_t n, int32_t sample_rate) const
 Set a PCM voice sample for VoxLock.
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 ()
 Destroy the wrapped handle if present.
MoveOnly & operator= (const MoveOnly &)=delete
const SherpaOnnxOnlineSpeechDenoiser * Get () const
 Return the wrapped raw pointer without transferring ownership.
const SherpaOnnxOnlineSpeechDenoiser * Release ()
 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 SherpaOnnxOnlineSpeechDenoiser * p_

Detailed Description

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

Member Function Documentation

◆ Create()

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

◆ SetVoiceSample()

bool sherpa_onnx::cxx::OnlineSpeechDenoiser::SetVoiceSample ( const float * samples,
int32_t n,
int32_t sample_rate ) const

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