zhifu gao
2023-02-17 40b772101a379a9f2ee8dfb2d8278b1dad76420e
funasr/bin/asr_inference_paraformer_vad.py
@@ -167,6 +167,11 @@
        level=log_level,
        format="%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s",
    )
    if param_dict is not None:
        hotword_list_or_file = param_dict.get('hotword')
    else:
        hotword_list_or_file = None
    
    if ngpu >= 1 and torch.cuda.is_available():
        device = "cuda"
@@ -206,6 +211,7 @@
        ngram_weight=ngram_weight,
        penalty=penalty,
        nbest=nbest,
        hotword_list_or_file=hotword_list_or_file,
    )
    speech2text = Speech2Text(**speech2text_kwargs)
    text2punc = None