Skip to content

Commit

Permalink
run vad on gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmol committed Sep 30, 2023
1 parent 5a0541e commit 23ba656
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions faster_whisper/vad.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,13 @@ def __init__(self, path):
) from e

opts = onnxruntime.SessionOptions()
opts.inter_op_num_threads = 1
opts.intra_op_num_threads = 1
opts.log_severity_level = 4
opts.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_ENABLE_BASIC
# https://github.com/microsoft/onnxruntime/issues/11548#issuecomment-1158314424

self.session = onnxruntime.InferenceSession(
path,
providers=["CPUExecutionProvider"],
providers=["CUDAExecutionProvider"],
sess_options=opts,
)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ av==10.*
ctranslate2>=3.17,<4
huggingface_hub>=0.13
tokenizers>=0.13,<0.15
onnxruntime>=1.14,<2
onnxruntime-gpu>=1.16.0,<2

0 comments on commit 23ba656

Please sign in to comment.