From fdccea6b23b8554083b011bca0700ed04318262f Mon Sep 17 00:00:00 2001 From: Malar Kannan Date: Tue, 12 May 2020 23:38:31 +0530 Subject: [PATCH] unlink temporary files after transcribing --- jasper/asr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jasper/asr.py b/jasper/asr.py index 2f16635..e52695d 100644 --- a/jasper/asr.py +++ b/jasper/asr.py @@ -108,6 +108,8 @@ class JasperASR(object): tensors = self.neural_factory.infer(tensors=eval_tensors) prediction = post_process_predictions(tensors[0], self.labels) prediction_text = ". ".join(prediction) + os.unlink(manifest_file.name) + os.unlink(audio_file.name) return prediction_text def transcribe_file(self, audio_file, *args, **kwargs):