web2py.transcription/modules/transcription_tools/__init__.py

9 lines
196 B
Python
Raw Normal View History

from vosk import Model
from gluon.cache import lazy_cache
2021-10-08 15:26:30 +02:00
@lazy_cache('get_model', time_expire=3600, cache_model='ram')
def get_model(model_path):
model = Model(model_path)
return model