Spaces:
Running
Running
jhj0517
commited on
Commit
·
ca8ee6a
1
Parent(s):
c364d35
update docstring
Browse files
modules/faster_whisper_inference.py
CHANGED
|
@@ -2,7 +2,6 @@ import os
|
|
| 2 |
import time
|
| 3 |
import numpy as np
|
| 4 |
from typing import BinaryIO, Union, Tuple, List
|
| 5 |
-
|
| 6 |
import faster_whisper
|
| 7 |
from faster_whisper.vad import VadOptions
|
| 8 |
import ctranslate2
|
|
@@ -13,7 +12,6 @@ from modules.whisper_parameter import *
|
|
| 13 |
from modules.whisper_base import WhisperBase
|
| 14 |
|
| 15 |
|
| 16 |
-
|
| 17 |
class FasterWhisperInference(WhisperBase):
|
| 18 |
def __init__(self,
|
| 19 |
model_dir: str,
|
|
@@ -43,7 +41,7 @@ class FasterWhisperInference(WhisperBase):
|
|
| 43 |
progress: gr.Progress
|
| 44 |
Indicator to show progress directly in gradio.
|
| 45 |
*whisper_params: tuple
|
| 46 |
-
|
| 47 |
|
| 48 |
Returns
|
| 49 |
----------
|
|
|
|
| 2 |
import time
|
| 3 |
import numpy as np
|
| 4 |
from typing import BinaryIO, Union, Tuple, List
|
|
|
|
| 5 |
import faster_whisper
|
| 6 |
from faster_whisper.vad import VadOptions
|
| 7 |
import ctranslate2
|
|
|
|
| 12 |
from modules.whisper_base import WhisperBase
|
| 13 |
|
| 14 |
|
|
|
|
| 15 |
class FasterWhisperInference(WhisperBase):
|
| 16 |
def __init__(self,
|
| 17 |
model_dir: str,
|
|
|
|
| 41 |
progress: gr.Progress
|
| 42 |
Indicator to show progress directly in gradio.
|
| 43 |
*whisper_params: tuple
|
| 44 |
+
Parameters related with whisper. This will be dealt with "WhisperParameters" data class
|
| 45 |
|
| 46 |
Returns
|
| 47 |
----------
|
modules/insanely_fast_whisper_inference.py
CHANGED
|
@@ -43,7 +43,7 @@ class InsanelyFastWhisperInference(WhisperBase):
|
|
| 43 |
progress: gr.Progress
|
| 44 |
Indicator to show progress directly in gradio.
|
| 45 |
*whisper_params: tuple
|
| 46 |
-
|
| 47 |
|
| 48 |
Returns
|
| 49 |
----------
|
|
|
|
| 43 |
progress: gr.Progress
|
| 44 |
Indicator to show progress directly in gradio.
|
| 45 |
*whisper_params: tuple
|
| 46 |
+
Parameters related with whisper. This will be dealt with "WhisperParameters" data class
|
| 47 |
|
| 48 |
Returns
|
| 49 |
----------
|
modules/whisper_Inference.py
CHANGED
|
@@ -35,7 +35,7 @@ class WhisperInference(WhisperBase):
|
|
| 35 |
progress: gr.Progress
|
| 36 |
Indicator to show progress directly in gradio.
|
| 37 |
*whisper_params: tuple
|
| 38 |
-
|
| 39 |
|
| 40 |
Returns
|
| 41 |
----------
|
|
|
|
| 35 |
progress: gr.Progress
|
| 36 |
Indicator to show progress directly in gradio.
|
| 37 |
*whisper_params: tuple
|
| 38 |
+
Parameters related with whisper. This will be dealt with "WhisperParameters" data class
|
| 39 |
|
| 40 |
Returns
|
| 41 |
----------
|
modules/whisper_parameter.py
CHANGED
|
@@ -130,6 +130,7 @@ class WhisperParameters:
|
|
| 130 |
|
| 131 |
hf_token: gr.Textbox
|
| 132 |
This parameter is related with whisperx. Huggingface token is needed to download diarization models.
|
|
|
|
| 133 |
"""
|
| 134 |
|
| 135 |
def to_list(self) -> list:
|
|
|
|
| 130 |
|
| 131 |
hf_token: gr.Textbox
|
| 132 |
This parameter is related with whisperx. Huggingface token is needed to download diarization models.
|
| 133 |
+
Read more about : https://huggingface.co/pyannote/speaker-diarization-3.1#requirements
|
| 134 |
"""
|
| 135 |
|
| 136 |
def to_list(self) -> list:
|