辰冢
2025-02-12 5052ca8bf03c178d9ae73cb68785cd4afb0144d2
funasr/auto/auto_model.py
@@ -366,7 +366,11 @@
        if pbar:
            # pbar.update(1)
            pbar.set_description(f"rtf_avg: {time_escape_total/time_speech_total:0.3f}")
        torch.cuda.empty_cache()
        device = next(model.parameters()).device
        if device.type == 'cuda':
            with torch.cuda.device():
                torch.cuda.empty_cache()
        return asr_result_list
    def inference_with_vad(self, input, input_len=None, **cfg):