add streaming websocket server and client (#62)

This commit is contained in:
Fangjun Kuang
2023-02-24 21:39:51 +08:00
committed by GitHub
parent ce4dd176e4
commit 40522f037b
20 changed files with 1197 additions and 1 deletions

View File

@@ -17,11 +17,15 @@
#include "sherpa-onnx/csrc/features.h"
#include "sherpa-onnx/csrc/online-stream.h"
#include "sherpa-onnx/csrc/online-transducer-model-config.h"
#include "sherpa-onnx/csrc/parse-options.h"
namespace sherpa_onnx {
struct OnlineRecognizerResult {
std::string text;
// TODO(fangjun): Add a method to return a json string
std::string ToString() const { return text; }
};
struct OnlineRecognizerConfig {
@@ -41,6 +45,9 @@ struct OnlineRecognizerConfig {
endpoint_config(endpoint_config),
enable_endpoint(enable_endpoint) {}
void Register(ParseOptions *po);
bool Validate() const;
std::string ToString() const;
};