Add CTC HLG decoding using OpenFst (#349)
This commit is contained in:
31
sherpa-onnx/csrc/offline-ctc-fst-decoder-config.h
Normal file
31
sherpa-onnx/csrc/offline-ctc-fst-decoder-config.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// sherpa-onnx/csrc/offline-ctc-fst-decoder-config.h
|
||||
//
|
||||
// Copyright (c) 2023 Xiaomi Corporation
|
||||
|
||||
#ifndef SHERPA_ONNX_CSRC_OFFLINE_CTC_FST_DECODER_CONFIG_H_
|
||||
#define SHERPA_ONNX_CSRC_OFFLINE_CTC_FST_DECODER_CONFIG_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "sherpa-onnx/csrc/parse-options.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
struct OfflineCtcFstDecoderConfig {
|
||||
// Path to H.fst, HL.fst or HLG.fst
|
||||
std::string graph;
|
||||
int32_t max_active = 3000;
|
||||
|
||||
OfflineCtcFstDecoderConfig() = default;
|
||||
|
||||
OfflineCtcFstDecoderConfig(const std::string &graph, int32_t max_active)
|
||||
: graph(graph), max_active(max_active) {}
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
void Register(ParseOptions *po);
|
||||
};
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
#endif // SHERPA_ONNX_CSRC_OFFLINE_CTC_FST_DECODER_CONFIG_H_
|
||||
Reference in New Issue
Block a user