add online-recognizer (#29)

This commit is contained in:
Fangjun Kuang
2023-02-19 12:45:38 +08:00
committed by GitHub
parent d4b0c0590a
commit ebc3b47fb8
11 changed files with 267 additions and 61 deletions

View File

@@ -8,6 +8,7 @@
#include <memory>
#include <vector>
#include "onnxruntime_cxx_api.h" // NOLINT
#include "sherpa-onnx/csrc/features.h"
#include "sherpa-onnx/csrc/online-transducer-decoder.h"
@@ -63,6 +64,9 @@ class OnlineStream {
void SetResult(const OnlineTransducerDecoderResult &r);
const OnlineTransducerDecoderResult &GetResult() const;
void SetStates(std::vector<Ort::Value> states);
std::vector<Ort::Value> &GetStates();
private:
class Impl;
std::unique_ptr<Impl> impl_;