BienBoy
2025-02-05 6ebf6e48eb0368518452312c803c58a65fe9bd26
funasr/auto/auto_model.py
@@ -366,8 +366,11 @@
        if pbar:
            # pbar.update(1)
            pbar.set_description(f"rtf_avg: {time_escape_total/time_speech_total:0.3f}")
        with torch.cuda.device(next(model.parameters()).device):
            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):