added vad filter
Browse files
App/Transcription/TranscriptionRoutes.py
CHANGED
@@ -19,7 +19,7 @@ async def create_file(
|
|
19 |
userId: int = 1,
|
20 |
model: str = Query(
|
21 |
"tiny",
|
22 |
-
enum=["tiny", "small", "medium", "base", "large"],
|
23 |
description="Whisper model Sizes",
|
24 |
),
|
25 |
):
|
|
|
19 |
userId: int = 1,
|
20 |
model: str = Query(
|
21 |
"tiny",
|
22 |
+
enum=["tiny", "small", "medium", "base", "large-v2"],
|
23 |
description="Whisper model Sizes",
|
24 |
),
|
25 |
):
|
App/Transcription/Utils/audio_transcription.py
CHANGED
@@ -15,7 +15,7 @@ def transcribe_file(state, file_path, model_size="tiny"):
|
|
15 |
meta=metadata.dict(),
|
16 |
)
|
17 |
model = WhisperModel(model_size, device="cpu", compute_type="int8")
|
18 |
-
segments, info = model.transcribe(file_path, beam_size=5)
|
19 |
|
20 |
total_duration = round(info.duration, 2)
|
21 |
metadata.logs = (
|
|
|
15 |
meta=metadata.dict(),
|
16 |
)
|
17 |
model = WhisperModel(model_size, device="cpu", compute_type="int8")
|
18 |
+
segments, info = model.transcribe(file_path, beam_size=5, vad_filter=True)
|
19 |
|
20 |
total_duration = round(info.duration, 2)
|
21 |
metadata.logs = (
|