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 ()
 Destroy the wrapped handle if present.
MoveOnly & operator= (const MoveOnly &)=delete
const SherpaOnnxOnlineStream * Get () const
 Return the wrapped raw pointer without transferring ownership.
const SherpaOnnxOnlineStream * Release ()
 Release ownership of the wrapped raw pointer.

Additional Inherited Members

Protected Attributes inherited from sherpa_onnx::cxx::MoveOnly< OnlineStream, SherpaOnnxOnlineStream >
const SherpaOnnxOnlineStream * p_

Detailed Description

Definition at line 344 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: