Add C++ support for streaming NeMo CTC models. (#857)

This commit is contained in:
Fangjun Kuang
2024-05-10 16:26:43 +08:00
committed by GitHub
parent 1eb60e8711
commit 46e4e5b7ac
22 changed files with 782 additions and 41 deletions

View File

@@ -0,0 +1,28 @@
// sherpa-onnx/csrc/online-nemo-ctc-model-config.h
//
// Copyright (c) 2024 Xiaomi Corporation
#ifndef SHERPA_ONNX_CSRC_ONLINE_NEMO_CTC_MODEL_CONFIG_H_
#define SHERPA_ONNX_CSRC_ONLINE_NEMO_CTC_MODEL_CONFIG_H_
#include <string>
#include "sherpa-onnx/csrc/parse-options.h"
namespace sherpa_onnx {
struct OnlineNeMoCtcModelConfig {
std::string model;
OnlineNeMoCtcModelConfig() = default;
explicit OnlineNeMoCtcModelConfig(const std::string &model) : model(model) {}
void Register(ParseOptions *po);
bool Validate() const;
std::string ToString() const;
};
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_ONLINE_NEMO_CTC_MODEL_CONFIG_H_