Esempio n. 1
0
def load_model(device, model_path, use_half):
    model = DeepSpeech.load_model(hydra.utils.to_absolute_path(model_path))
    model.eval()
    model = model.to(device)
    if use_half:
        model = model.half()
    return model
Esempio n. 2
0
def load_model(device, model_path, use_half):
    model = DeepSpeech.load_model(model_path)
    model.eval()
    model = model.to(device)
    if use_half:
        model = model.half()
    return model