chompionsawelo commited on
Commit
e2d8d82
·
1 Parent(s): 073beae

transcribe fix

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -1
  2. transcribe.py +2 -4
requirements.txt CHANGED
@@ -3,4 +3,4 @@ pyannote-audio @ git+https://github.com/pyannote/pyannote-audio.git@develop
3
  pydub
4
  transformers
5
  torch
6
- whisper
 
3
  pydub
4
  transformers
5
  torch
6
+ faster-whisper
transcribe.py CHANGED
@@ -1,4 +1,4 @@
1
- import whisper
2
  import torch
3
  import gc
4
  import json
@@ -6,9 +6,7 @@ import json
6
  gc.collect()
7
  torch.cuda.empty_cache()
8
 
9
-
10
- device = torch.device("cuda")
11
- model = whisper.load_model("medium", device=device)
12
 
13
 
14
  def start_transcribe(progress):
 
1
+ from faster_whisper import WhisperModel
2
  import torch
3
  import gc
4
  import json
 
6
  gc.collect()
7
  torch.cuda.empty_cache()
8
 
9
+ model = WhisperModel("medium", device="cuda", compute_type="int8_float16")
 
 
10
 
11
 
12
  def start_transcribe(progress):