Skip to content

Commit

Permalink
Fixes OOM Errors - too high RAM usage by VAD
Browse files Browse the repository at this point in the history
Reported problems:
#1193
#1169

VAD implementations consumes humongous memory amounts [original Silero doesn't have this problem]

This PR should fix the OOM problem.
Alt solution could be removing 'lru_cache'.
  • Loading branch information
Purfview authored Dec 10, 2024
1 parent 8327d8c commit 01340c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions faster_whisper/vad.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ def __init__(self, encoder_path, decoder_path):
) from e

opts = onnxruntime.SessionOptions()
opts.inter_op_num_threads = 0
opts.intra_op_num_threads = 0
opts.inter_op_num_threads = 1
opts.intra_op_num_threads = 1
opts.enable_cpu_mem_arena = False
opts.log_severity_level = 4

self.encoder_session = onnxruntime.InferenceSession(
Expand Down

0 comments on commit 01340c2

Please sign in to comment.