Add Kotlin API for Matcha-TTS models. (#1668)
This commit is contained in:
@@ -1727,11 +1727,15 @@ const SherpaOnnxOnlinePunctuation *SherpaOnnxCreateOnlinePunctuation(
|
||||
auto p = new SherpaOnnxOnlinePunctuation;
|
||||
try {
|
||||
sherpa_onnx::OnlinePunctuationConfig punctuation_config;
|
||||
punctuation_config.model.cnn_bilstm = SHERPA_ONNX_OR(config->model.cnn_bilstm, "");
|
||||
punctuation_config.model.bpe_vocab = SHERPA_ONNX_OR(config->model.bpe_vocab, "");
|
||||
punctuation_config.model.num_threads = SHERPA_ONNX_OR(config->model.num_threads, 1);
|
||||
punctuation_config.model.cnn_bilstm =
|
||||
SHERPA_ONNX_OR(config->model.cnn_bilstm, "");
|
||||
punctuation_config.model.bpe_vocab =
|
||||
SHERPA_ONNX_OR(config->model.bpe_vocab, "");
|
||||
punctuation_config.model.num_threads =
|
||||
SHERPA_ONNX_OR(config->model.num_threads, 1);
|
||||
punctuation_config.model.debug = config->model.debug;
|
||||
punctuation_config.model.provider = SHERPA_ONNX_OR(config->model.provider, "cpu");
|
||||
punctuation_config.model.provider =
|
||||
SHERPA_ONNX_OR(config->model.provider, "cpu");
|
||||
|
||||
p->impl =
|
||||
std::make_unique<sherpa_onnx::OnlinePunctuation>(punctuation_config);
|
||||
|
||||
Reference in New Issue
Block a user