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

#include <cxx-api.h>

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

Public Member Functions

 OnlineStream (const SherpaOnnxOnlineStream *p)
 Wrap an existing C online stream handle.
 
void AcceptWaveform (int32_t sample_rate, const float *samples, int32_t n) const
 Append audio samples to the stream.
 
void InputFinished () const
 Indicate that no more input audio will be provided.
 
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 SherpaOnnxOnlineStream *p) const
 Destroy the wrapped C handle.
 
- Public Member Functions inherited from sherpa_onnx::cxx::MoveOnly< OnlineStream, SherpaOnnxOnlineStream >
 MoveOnly ()=default
 Construct an empty wrapper.
 
 MoveOnly (const SherpaOnnxOnlineStream *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 SherpaOnnxOnlineStreamGet () const
 Return the wrapped raw pointer without transferring ownership.
 
const SherpaOnnxOnlineStreamRelease ()
 Release ownership of the wrapped raw pointer.
 

Additional Inherited Members

- Protected Attributes inherited from sherpa_onnx::cxx::MoveOnly< OnlineStream, SherpaOnnxOnlineStream >
const SherpaOnnxOnlineStreamp_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ OnlineStream()

sherpa_onnx::cxx::OnlineStream::OnlineStream ( const SherpaOnnxOnlineStream p)
explicit

Member Function Documentation

◆ AcceptWaveform()

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

◆ Destroy()

void sherpa_onnx::cxx::OnlineStream::Destroy ( const SherpaOnnxOnlineStream p) const

◆ GetOption()

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

◆ HasOption()

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

◆ InputFinished()

void sherpa_onnx::cxx::OnlineStream::InputFinished ( ) const

◆ SetOption()

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

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