Fix code style issues (#774)
This commit is contained in:
@@ -12,10 +12,8 @@ static void PybindFeatureExtractorConfig(py::module *m) {
|
||||
using PyClass = FeatureExtractorConfig;
|
||||
py::class_<PyClass>(*m, "FeatureExtractorConfig")
|
||||
.def(py::init<int32_t, int32_t, float, float, float>(),
|
||||
py::arg("sampling_rate") = 16000,
|
||||
py::arg("feature_dim") = 80,
|
||||
py::arg("low_freq") = 20.0f,
|
||||
py::arg("high_freq") = -400.0f,
|
||||
py::arg("sampling_rate") = 16000, py::arg("feature_dim") = 80,
|
||||
py::arg("low_freq") = 20.0f, py::arg("high_freq") = -400.0f,
|
||||
py::arg("dither") = 0.0f)
|
||||
.def_readwrite("sampling_rate", &PyClass::sampling_rate)
|
||||
.def_readwrite("feature_dim", &PyClass::feature_dim)
|
||||
|
||||
@@ -23,8 +23,7 @@ static void PybindOfflineRecognizerConfig(py::module *m) {
|
||||
py::arg("ctc_fst_decoder_config") = OfflineCtcFstDecoderConfig(),
|
||||
py::arg("decoding_method") = "greedy_search",
|
||||
py::arg("max_active_paths") = 4, py::arg("hotwords_file") = "",
|
||||
py::arg("hotwords_score") = 1.5,
|
||||
py::arg("blank_penalty") = 0.0)
|
||||
py::arg("hotwords_score") = 1.5, py::arg("blank_penalty") = 0.0)
|
||||
.def_readwrite("feat_config", &PyClass::feat_config)
|
||||
.def_readwrite("model_config", &PyClass::model_config)
|
||||
.def_readwrite("lm_config", &PyClass::lm_config)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "sherpa-onnx/python/csrc/offline-transducer-model-config.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -16,7 +15,7 @@ void PybindOfflineTransducerModelConfig(py::module *m) {
|
||||
using PyClass = OfflineTransducerModelConfig;
|
||||
py::class_<PyClass>(*m, "OfflineTransducerModelConfig")
|
||||
.def(py::init<const std::string &, const std::string &,
|
||||
const std::string &>(),
|
||||
const std::string &>(),
|
||||
py::arg("encoder_filename"), py::arg("decoder_filename"),
|
||||
py::arg("joiner_filename"))
|
||||
.def_readwrite("encoder_filename", &PyClass::encoder_filename)
|
||||
|
||||
@@ -27,9 +27,9 @@ void PybindOnlineModelConfig(py::module *m) {
|
||||
.def(py::init<const OnlineTransducerModelConfig &,
|
||||
const OnlineParaformerModelConfig &,
|
||||
const OnlineWenetCtcModelConfig &,
|
||||
const OnlineZipformer2CtcModelConfig &,
|
||||
const std::string &, int32_t, int32_t,
|
||||
bool, const std::string &, const std::string &>(),
|
||||
const OnlineZipformer2CtcModelConfig &, const std::string &,
|
||||
int32_t, int32_t, bool, const std::string &,
|
||||
const std::string &>(),
|
||||
py::arg("transducer") = OnlineTransducerModelConfig(),
|
||||
py::arg("paraformer") = OnlineParaformerModelConfig(),
|
||||
py::arg("wenet_ctc") = OnlineWenetCtcModelConfig(),
|
||||
|
||||
Reference in New Issue
Block a user