Spaces:
Running
Running
jhj0517
commited on
Commit
·
b30c9c5
1
Parent(s):
dc53364
Add UVR test
Browse files- tests/test_bgm_separation.py +44 -0
tests/test_bgm_separation.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.utils.paths import *
|
| 2 |
+
from modules.whisper.whisper_factory import WhisperFactory
|
| 3 |
+
from modules.whisper.whisper_parameter import WhisperValues
|
| 4 |
+
from test_config import *
|
| 5 |
+
from test_transcription import download_file, test_transcribe
|
| 6 |
+
|
| 7 |
+
import gradio as gr
|
| 8 |
+
import pytest
|
| 9 |
+
import os
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
@pytest.mark.parametrize(
|
| 13 |
+
"whisper_type,vad_filter,bgm_separation,diarization",
|
| 14 |
+
[
|
| 15 |
+
("whisper", False, True, False),
|
| 16 |
+
("faster-whisper", False, True, False),
|
| 17 |
+
("insanely_fast_whisper", False, True, False)
|
| 18 |
+
]
|
| 19 |
+
)
|
| 20 |
+
def test_bgm_separation_pipeline(
|
| 21 |
+
whisper_type: str,
|
| 22 |
+
vad_filter: bool,
|
| 23 |
+
bgm_separation: bool,
|
| 24 |
+
diarization: bool,
|
| 25 |
+
):
|
| 26 |
+
test_transcribe(whisper_type, vad_filter, bgm_separation, diarization)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
@pytest.mark.parametrize(
|
| 30 |
+
"whisper_type,vad_filter,bgm_separation,diarization",
|
| 31 |
+
[
|
| 32 |
+
("whisper", True, True, False),
|
| 33 |
+
("faster-whisper", True, True, False),
|
| 34 |
+
("insanely_fast_whisper", True, True, False)
|
| 35 |
+
]
|
| 36 |
+
)
|
| 37 |
+
def test_bgm_separation_with_vad_pipeline(
|
| 38 |
+
whisper_type: str,
|
| 39 |
+
vad_filter: bool,
|
| 40 |
+
bgm_separation: bool,
|
| 41 |
+
diarization: bool,
|
| 42 |
+
):
|
| 43 |
+
test_transcribe(whisper_type, vad_filter, bgm_separation, diarization)
|
| 44 |
+
|