DeeeeeeM commited on
Commit
77b6231
·
1 Parent(s): 0f42c39

removed batched inference feature temporarily due to unknown issues

Browse files
Files changed (3) hide show
  1. app.py +4 -6
  2. requirements-gpu.txt +8 -0
  3. requirements.txt +2 -1
app.py CHANGED
@@ -25,16 +25,14 @@ def process_media(
25
  if model_type == "faster whisper":
26
  device = "cuda" if torch.cuda.is_available() else "cpu"
27
  model = stable_whisper.load_faster_whisper(model_size, device=device)
 
28
  else:
29
  device = "cuda" if torch.cuda.is_available() else "cpu"
30
  model = stable_whisper.load_model(model_size, device=device)
 
 
 
31
 
32
- try:
33
- result = model.transcribe(temp_path, language=source_lang, vad=True, regroup=False, no_speech_threshold=0.9, denoiser="demucs", batch_size=16)
34
- #result.save_as_json(word_transcription_path)
35
- except Exception as e:
36
- return None, None, None, None
37
-
38
  # ADVANCED SETTINGS #
39
  if max_chars or max_words:
40
  result.split_by_length(
 
25
  if model_type == "faster whisper":
26
  device = "cuda" if torch.cuda.is_available() else "cpu"
27
  model = stable_whisper.load_faster_whisper(model_size, device=device)
28
+ result = model.transcribe(temp_path, language=source_lang, vad=True, regroup=False, no_speech_threshold=0.9, denoiser="demucs")
29
  else:
30
  device = "cuda" if torch.cuda.is_available() else "cpu"
31
  model = stable_whisper.load_model(model_size, device=device)
32
+ result = model.transcribe(temp_path, language=source_lang, vad=True, regroup=False, no_speech_threshold=0.9, denoiser="demucs")
33
+ #, batch_size=16
34
+ #result.save_as_json(word_transcription_path)
35
 
 
 
 
 
 
 
36
  # ADVANCED SETTINGS #
37
  if max_chars or max_words:
38
  result.split_by_length(
requirements-gpu.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ gradio
2
+ stable-ts
3
+ stable-ts[fw]
4
+ torch==2.6.0+cu124
5
+ numpy<2.3,>=1.24
6
+ sympy==1.13.1
7
+ demucs
8
+ chardet
requirements.txt CHANGED
@@ -3,5 +3,6 @@ stable-ts
3
  stable-ts[fw]
4
  demucs
5
  torch==2.6.0
6
- numpy<2
 
7
  chardet
 
3
  stable-ts[fw]
4
  demucs
5
  torch==2.6.0
6
+ numpy>=1.24,<2.3
7
+ sympy==1.13.1
8
  chardet