Spaces:
Sleeping
Sleeping
update
Browse files
toolbox/k2_sherpa/nn_models.py
CHANGED
|
@@ -761,6 +761,7 @@ def load_sherpa_onnx_online_recognizer_from_paraformer(encoder_model_file: str,
|
|
| 761 |
return recognizer
|
| 762 |
|
| 763 |
|
|
|
|
| 764 |
def load_recognizer(local_model_dir: Path,
|
| 765 |
decoding_method: str = "greedy_search",
|
| 766 |
num_active_paths: int = 4,
|
|
@@ -839,6 +840,7 @@ def load_recognizer(local_model_dir: Path,
|
|
| 839 |
return recognizer
|
| 840 |
|
| 841 |
|
|
|
|
| 842 |
def load_punctuation_model(local_model_dir: Path,
|
| 843 |
nn_model_file: str,
|
| 844 |
nn_model_file_sub_folder: str,
|
|
|
|
| 761 |
return recognizer
|
| 762 |
|
| 763 |
|
| 764 |
+
@lru_cache(maxsize=15)
|
| 765 |
def load_recognizer(local_model_dir: Path,
|
| 766 |
decoding_method: str = "greedy_search",
|
| 767 |
num_active_paths: int = 4,
|
|
|
|
| 840 |
return recognizer
|
| 841 |
|
| 842 |
|
| 843 |
+
@lru_cache(maxsize=15)
|
| 844 |
def load_punctuation_model(local_model_dir: Path,
|
| 845 |
nn_model_file: str,
|
| 846 |
nn_model_file_sub_folder: str,
|