Add C++ runtime for Tele-AI/TeleSpeech-ASR (#970)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
../../../../go-api-examples/non-streaming-decode-files/run-telespeech-ctc.sh
|
||||
@@ -381,8 +381,9 @@ type OfflineModelConfig struct {
|
||||
// Optional. Specify it for faster model initialization.
|
||||
ModelType string
|
||||
|
||||
ModelingUnit string // Optional. cjkchar, bpe, cjkchar+bpe
|
||||
BpeVocab string // Optional.
|
||||
ModelingUnit string // Optional. cjkchar, bpe, cjkchar+bpe
|
||||
BpeVocab string // Optional.
|
||||
TeleSpeechCtc string // Optional.
|
||||
}
|
||||
|
||||
// Configuration for the offline/non-streaming recognizer.
|
||||
@@ -477,6 +478,9 @@ func NewOfflineRecognizer(config *OfflineRecognizerConfig) *OfflineRecognizer {
|
||||
c.model_config.bpe_vocab = C.CString(config.ModelConfig.BpeVocab)
|
||||
defer C.free(unsafe.Pointer(c.model_config.bpe_vocab))
|
||||
|
||||
c.model_config.telespeech_ctc = C.CString(config.ModelConfig.TeleSpeechCtc)
|
||||
defer C.free(unsafe.Pointer(c.model_config.telespeech_ctc))
|
||||
|
||||
c.lm_config.model = C.CString(config.LmConfig.Model)
|
||||
defer C.free(unsafe.Pointer(c.lm_config.model))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user