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

RAII wrapper for an offline decoding stream. More...

#include <cxx-api.h>

Inheritance diagram for sherpa_onnx::cxx::OfflineStream:
Collaboration diagram for sherpa_onnx::cxx::OfflineStream:

Public Member Functions

 OfflineStream (const SherpaOnnxOfflineStream *p)
 Wrap an existing C offline stream handle.
void AcceptWaveform (int32_t sample_rate, const float *samples, int32_t n) const
 Provide the complete waveform for offline decoding.
void SetOption (const char *key, const char *value) const
 Set a per-stream string option.
const char * GetOption (const char *key) const
 Get a per-stream string option.
int32_t HasOption (const char *key) const
 Check whether a per-stream option exists.
void Destroy (const SherpaOnnxOfflineStream *p) const
 Destroy the wrapped C handle.
Public Member Functions inherited from sherpa_onnx::cxx::MoveOnly< OfflineStream, SherpaOnnxOfflineStream >
 MoveOnly ()=default
 Construct an empty wrapper.
 ~MoveOnly ()
 Destroy the wrapped handle if present.
MoveOnly & operator= (const MoveOnly &)=delete
const SherpaOnnxOfflineStream * Get () const
 Return the wrapped raw pointer without transferring ownership.
const SherpaOnnxOfflineStream * Release ()
 Release ownership of the wrapped raw pointer.

Additional Inherited Members

Protected Attributes inherited from sherpa_onnx::cxx::MoveOnly< OfflineStream, SherpaOnnxOfflineStream >
const SherpaOnnxOfflineStream * p_

Detailed Description

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

Constructor & Destructor Documentation

◆ OfflineStream()

sherpa_onnx::cxx::OfflineStream::OfflineStream ( const SherpaOnnxOfflineStream * p)
explicit

Member Function Documentation

◆ AcceptWaveform()

void sherpa_onnx::cxx::OfflineStream::AcceptWaveform ( int32_t sample_rate,
const float * samples,
int32_t n ) const

◆ Destroy()

void sherpa_onnx::cxx::OfflineStream::Destroy ( const SherpaOnnxOfflineStream * p) const

◆ GetOption()

const char * sherpa_onnx::cxx::OfflineStream::GetOption ( const char * key) const

◆ HasOption()

int32_t sherpa_onnx::cxx::OfflineStream::HasOption ( const char * key) const

◆ SetOption()

void sherpa_onnx::cxx::OfflineStream::SetOption ( const char * key,
const char * value ) const

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