Support CoreML for macOS (#151)

This commit is contained in:
Fangjun Kuang
2023-05-12 15:57:44 +08:00
committed by GitHub
parent de1880948b
commit cea718e3d8
22 changed files with 216 additions and 87 deletions

View File

@@ -40,6 +40,7 @@ class OfflineRecognizer(object):
feature_dim: int = 80,
decoding_method: str = "greedy_search",
debug: bool = False,
provider: str = "cpu",
):
"""
Please refer to
@@ -70,6 +71,8 @@ class OfflineRecognizer(object):
Support only greedy_search for now.
debug:
True to show debug messages.
provider:
onnxruntime execution providers. Valid values are: cpu, cuda, coreml.
"""
self = cls.__new__(cls)
model_config = OfflineModelConfig(
@@ -81,6 +84,7 @@ class OfflineRecognizer(object):
tokens=tokens,
num_threads=num_threads,
debug=debug,
provider=provider,
)
feat_config = OfflineFeatureExtractorConfig(