游雁
2023-07-05 4e2fe544ae37174a3e09dfcdbbdae5abfe711e53
funasr/bin/asr_inference_launch.py
@@ -255,9 +255,10 @@
    if param_dict is not None:
        hotword_list_or_file = param_dict.get('hotword')
        export_mode = param_dict.get("export_mode", False)
        clas_scale = param_dict.get('clas_scale', 1.0)
    else:
        hotword_list_or_file = None
    clas_scale = param_dict.get('clas_scale', 1.0)
        clas_scale = 1.0
    if kwargs.get("device", None) == "cpu":
        ngpu = 0
@@ -1367,10 +1368,7 @@
        left_context=left_context,
        right_context=right_context,
    )
    speech2text = Speech2TextTransducer.from_pretrained(
        model_tag=model_tag,
        **speech2text_kwargs,
    )
    speech2text = Speech2TextTransducer(**speech2text_kwargs)
    def _forward(data_path_and_name_and_type,
                 raw_inputs: Union[np.ndarray, torch.Tensor] = None,