offline-canary-model-config.h
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// sherpa-onnx/csrc/offline-canary-model-config.h
//
// Copyright (c) 2025 Xiaomi Corporation
#ifndef SHERPA_ONNX_CSRC_OFFLINE_CANARY_MODEL_CONFIG_H_
#define SHERPA_ONNX_CSRC_OFFLINE_CANARY_MODEL_CONFIG_H_
#include <string>
#include "sherpa-onnx/csrc/parse-options.h"
namespace sherpa_onnx {
struct OfflineCanaryModelConfig {
std::string encoder;
std::string decoder;
// en, de, es, fr, or leave it empty to use en
std::string src_lang;
// en, de, es, fr, or leave it empty to use en
std::string tgt_lang;
// true to enable punctuations and casing
// false to disable punctuations and casing
bool use_pnc = true;
OfflineCanaryModelConfig() = default;
OfflineCanaryModelConfig(const std::string &encoder,
const std::string &decoder,
const std::string &src_lang,
const std::string &tgt_lang, bool use_pnc)
: encoder(encoder),
decoder(decoder),
src_lang(src_lang),
tgt_lang(tgt_lang),
use_pnc(use_pnc) {}
void Register(ParseOptions *po);
bool Validate() const;
std::string ToString() const;
};
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_OFFLINE_CANARY_MODEL_CONFIG_H_