|
sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
|
#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. | |
| MoveOnly & | operator= (const MoveOnly &)=delete |
| MoveOnly & | operator= (MoveOnly &&other) |
| 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_ |
|
explicit |
| void sherpa_onnx::cxx::OnlineStream::AcceptWaveform | ( | int32_t | sample_rate, |
| const float * | samples, | ||
| int32_t | n | ||
| ) | const |
| void sherpa_onnx::cxx::OnlineStream::Destroy | ( | const SherpaOnnxOnlineStream * | p | ) | const |
| const char * sherpa_onnx::cxx::OnlineStream::GetOption | ( | const char * | key | ) | const |
| int32_t sherpa_onnx::cxx::OnlineStream::HasOption | ( | const char * | key | ) | const |
| void sherpa_onnx::cxx::OnlineStream::InputFinished | ( | ) | const |
| void sherpa_onnx::cxx::OnlineStream::SetOption | ( | const char * | key, |
| const char * | value | ||
| ) | const |