Added provider option to sherpa-onnx and decode-file-c-api (#162)
This commit is contained in:
@@ -17,6 +17,8 @@ void OnlineTransducerModelConfig::Register(ParseOptions *po) {
|
||||
po->Register("tokens", &tokens, "Path to tokens.txt");
|
||||
po->Register("num_threads", &num_threads,
|
||||
"Number of threads to run the neural network");
|
||||
po->Register("provider", &provider,
|
||||
"Specify a provider to use: cpu, cuda, coreml");
|
||||
|
||||
po->Register("debug", &debug,
|
||||
"true to print model information while loading it.");
|
||||
@@ -60,6 +62,7 @@ std::string OnlineTransducerModelConfig::ToString() const {
|
||||
os << "joiner_filename=\"" << joiner_filename << "\", ";
|
||||
os << "tokens=\"" << tokens << "\", ";
|
||||
os << "num_threads=" << num_threads << ", ";
|
||||
os << "provider=\"" << provider << "\", ";
|
||||
os << "debug=" << (debug ? "True" : "False") << ")";
|
||||
|
||||
return os.str();
|
||||
|
||||
Reference in New Issue
Block a user