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