| | |
| | | hotword_list_or_file = None |
| | | clas_scale = 1.0 |
| | | |
| | | if kwargs.get("device", None) == "cpu": |
| | | ngpu = 0 |
| | | if ngpu >= 1 and torch.cuda.is_available(): |
| | | device = "cuda" |
| | | else: |
| | |
| | | logging.info(rtf_avg) |
| | | if writer is not None: |
| | | ibest_writer["rtf"]["rtf_avf"] = rtf_avg |
| | | torch.cuda.empty_cache() |
| | | return asr_result_list |
| | | |
| | | return _forward |
| | |
| | | ibest_writer["time_stamp"][key] = "{}".format(time_stamp_postprocessed) |
| | | |
| | | logging.info("decoding, utt: {}, predictions: {}".format(key, text_postprocessed_punc)) |
| | | torch.cuda.empty_cache() |
| | | return asr_result_list |
| | | |
| | | return _forward |