online-transducer: reset the encoder toghter with 2 previous output symbols (non-blank) (#2129)
* online-transducer: reset the encoder toghter with 2 previous output symbols (non-blank) - added `reset_encoder` boolean member into the OnlineRecognizerConfig class - by default the encoder is not reset * pybind11, adding empty symbols for disabled modules (tts, diarization) * reset_encoder, add default value (false) [pybind11]
This commit is contained in:
@@ -75,6 +75,15 @@ PYBIND11_MODULE(_sherpa_onnx, m) {
|
||||
|
||||
#if SHERPA_ONNX_ENABLE_TTS == 1
|
||||
PybindOfflineTts(&m);
|
||||
#else
|
||||
/* Define "empty" TTS sybmbols */
|
||||
m.attr("OfflineTtsKokoroModelConfig") = py::none();
|
||||
m.attr("OfflineTtsMatchaModelConfig") = py::none();
|
||||
m.attr("OfflineTtsModelConfig") = py::none();
|
||||
m.attr("OfflineTtsVitsModelConfig") = py::none();
|
||||
m.attr("GeneratedAudio") = py::none();
|
||||
m.attr("OfflineTtsConfig") = py::none();
|
||||
m.attr("OfflineTts") = py::none();
|
||||
#endif
|
||||
|
||||
PybindSpeakerEmbeddingExtractor(&m);
|
||||
@@ -85,6 +94,16 @@ PYBIND11_MODULE(_sherpa_onnx, m) {
|
||||
PybindFastClustering(&m);
|
||||
PybindOfflineSpeakerDiarizationResult(&m);
|
||||
PybindOfflineSpeakerDiarization(&m);
|
||||
#else
|
||||
/* Define "empty" diarization sybmbols */
|
||||
m.attr("FastClusteringConfig") = py::none();
|
||||
m.attr("FastClustering") = py::none();
|
||||
m.attr("OfflineSpeakerDiarizationSegment") = py::none();
|
||||
m.attr("OfflineSpeakerDiarizationResult") = py::none();
|
||||
m.attr("OfflineSpeakerSegmentationPyannoteModelConfig") = py::none();
|
||||
m.attr("OfflineSpeakerSegmentationModelConfig") = py::none();
|
||||
m.attr("OfflineSpeakerDiarizationConfig") = py::none();
|
||||
m.attr("OfflineSpeakerDiarization") = py::none();
|
||||
#endif
|
||||
|
||||
PybindAlsa(&m);
|
||||
|
||||
Reference in New Issue
Block a user