Skip to content

Commit

Permalink
Update asr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jonafeucht committed Jun 13, 2024
1 parent b8063f0 commit 085c661
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routes/api/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import traceback
import time
from src.shared.shared import LANGUAGE_CODES
import gc
import torch

router = APIRouter()

Expand Down Expand Up @@ -67,3 +69,6 @@ async def asr(

finally:
audio_file.close()
del model
torch.cuda.empty_cache()
gc.collect()

0 comments on commit 085c661

Please sign in to comment.