|
sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
|
RAII wrapper for keyword spotting. More...
#include <cxx-api.h>
Inheritance diagram for sherpa_onnx::cxx::KeywordSpotter:
Collaboration diagram for sherpa_onnx::cxx::KeywordSpotter:Public Member Functions | |
| void | Destroy (const SherpaOnnxKeywordSpotter *p) const |
| Destroy the wrapped C handle. | |
| OnlineStream | CreateStream () const |
| Create a keyword stream using configured keywords. | |
| OnlineStream | CreateStream (const std::string &keywords) const |
| Create a keyword stream with inline extra or replacement keywords. | |
| bool | IsReady (const OnlineStream *s) const |
| Check whether the stream has enough data to decode. | |
| void | Decode (const OnlineStream *s) const |
| Decode one ready stream. | |
| void | Decode (const OnlineStream *ss, int32_t n) const |
| Decode multiple ready streams in parallel. | |
| void | Reset (const OnlineStream *s) const |
| Reset a stream after a keyword trigger. | |
| KeywordResult | GetResult (const OnlineStream *s) const |
| Return the copied keyword spotting result for a stream. | |
Public Member Functions inherited from sherpa_onnx::cxx::MoveOnly< KeywordSpotter, SherpaOnnxKeywordSpotter > | |
| MoveOnly ()=default | |
| Construct an empty wrapper. | |
| MoveOnly (const SherpaOnnxKeywordSpotter *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 SherpaOnnxKeywordSpotter * | Get () const |
| Return the wrapped raw pointer without transferring ownership. | |
| const SherpaOnnxKeywordSpotter * | Release () |
| Release ownership of the wrapped raw pointer. | |
Static Public Member Functions | |
| static KeywordSpotter | Create (const KeywordSpotterConfig &config) |
| Create a keyword spotter from a config struct. | |
Additional Inherited Members | |
Protected Attributes inherited from sherpa_onnx::cxx::MoveOnly< KeywordSpotter, SherpaOnnxKeywordSpotter > | |
| const SherpaOnnxKeywordSpotter * | p_ |
|
static |
| OnlineStream sherpa_onnx::cxx::KeywordSpotter::CreateStream | ( | ) | const |
| OnlineStream sherpa_onnx::cxx::KeywordSpotter::CreateStream | ( | const std::string & | keywords | ) | const |
| void sherpa_onnx::cxx::KeywordSpotter::Decode | ( | const OnlineStream * | s | ) | const |
| void sherpa_onnx::cxx::KeywordSpotter::Decode | ( | const OnlineStream * | ss, |
| int32_t | n | ||
| ) | const |
| void sherpa_onnx::cxx::KeywordSpotter::Destroy | ( | const SherpaOnnxKeywordSpotter * | p | ) | const |
| KeywordResult sherpa_onnx::cxx::KeywordSpotter::GetResult | ( | const OnlineStream * | s | ) | const |
| bool sherpa_onnx::cxx::KeywordSpotter::IsReady | ( | const OnlineStream * | s | ) | const |
| void sherpa_onnx::cxx::KeywordSpotter::Reset | ( | const OnlineStream * | s | ) | const |