yhliang
2023-04-20 5de9e75d587b752d8d1063cc7903c4571df99189
funasr/bin/asr_inference_paraformer.py
@@ -612,6 +612,8 @@
        **kwargs,
):
    assert check_argument_types()
    ncpu = kwargs.get("ncpu", 1)
    torch.set_num_threads(ncpu)
    if word_lm_train_config is not None:
        raise NotImplementedError("Word LM is not implemented")
@@ -630,6 +632,8 @@
    else:
        hotword_list_or_file = None
    if kwargs.get("device", None) == "cpu":
        ngpu = 0
    if ngpu >= 1 and torch.cuda.is_available():
        device = "cuda"
    else: