jhj0517 commited on
Commit
7ff9bba
·
1 Parent(s): 0391d2f

Add parameters

Browse files
Files changed (1) hide show
  1. tests/test_transcription.py +13 -2
tests/test_transcription.py CHANGED
@@ -9,8 +9,16 @@ import gradio as gr
9
  import os
10
 
11
 
12
- @pytest.mark.parametrize("whisper_type", ["whisper", "faster-whisper", "insanely_fast_whisper"])
13
- def test_transcribe(whisper_type: str):
 
 
 
 
 
 
 
 
14
  audio_path_dir = os.path.join(WEBUI_DIR, "tests")
15
  audio_path = os.path.join(audio_path_dir, "jfk.wav")
16
  if not os.path.exists(audio_path):
@@ -23,6 +31,9 @@ def test_transcribe(whisper_type: str):
23
 
24
  hparams = WhisperValues(
25
  model_size=TEST_WHISPER_MODEL,
 
 
 
26
  ).as_list()
27
 
28
  subtitle_str, file_path = whisper_inferencer.transcribe_file(
 
9
  import os
10
 
11
 
12
+ @pytest.mark.parametrize("whisper_type", "vad_filter", "bgm_separation", [
13
+ ("whisper", False, False),
14
+ ("faster-whisper", False, False),
15
+ ("insanely_fast_whisper", False, False)
16
+ ])
17
+ def test_transcribe(
18
+ whisper_type: str,
19
+ vad_filter: bool,
20
+ bgm_separation: bool,
21
+ ):
22
  audio_path_dir = os.path.join(WEBUI_DIR, "tests")
23
  audio_path = os.path.join(audio_path_dir, "jfk.wav")
24
  if not os.path.exists(audio_path):
 
31
 
32
  hparams = WhisperValues(
33
  model_size=TEST_WHISPER_MODEL,
34
+ vad_filter=vad_filter,
35
+ is_bgm_separate=bgm_separation,
36
+ uvr_enable_offload=True
37
  ).as_list()
38
 
39
  subtitle_str, file_path = whisper_inferencer.transcribe_file(