Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fixed version of faster-whisper==1.1.1 #441

Merged
merged 5 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/vad/silero_vad.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def get_speech_timestamps(
vad_options = VadOptions(**kwargs)

threshold = vad_options.threshold
neg_threshold = vad_options.neg_threshold
min_speech_duration_ms = vad_options.min_speech_duration_ms
max_speech_duration_s = vad_options.max_speech_duration_s
min_silence_duration_ms = vad_options.min_silence_duration_ms
Expand All @@ -117,7 +118,8 @@ def get_speech_timestamps(
triggered = False
speeches = []
current_speech = {}
neg_threshold = vad_options.neg_threshold
if neg_threshold is None:
neg_threshold = max(threshold - 0.15, 0.01)

# to save potential segment end (and tolerate some silence)
temp_end = 0
Expand Down
2 changes: 2 additions & 0 deletions modules/whisper/base_transcription_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def run(self,
segments=result,
speech_chunks=speech_chunks,
)
if not result:
raise ValueError("VAD detected no speech segments in the audio.")

if diarization_params.is_diarize:
result, elapsed_time_diarization = self.diarizer.run(
Expand Down
6 changes: 3 additions & 3 deletions notebook/whisper-webui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"!git clone https://github.com/jhj0517/Whisper-WebUI.git\n",
"%cd Whisper-WebUI\n",
"!pip install git+https://github.com/jhj0517/jhj0517-whisper.git\n",
"!pip install git+https://github.com/SYSTRAN/faster-whisper.git\n",
"!pip install faster-whisper==1.1.1\n",
"!pip install ctranslate2==4.4.0\n",
"!pip install gradio\n",
"!pip install gradio-i18n\n",
Expand Down Expand Up @@ -129,12 +129,12 @@
"id": "Qosz9BFlGui3",
"cellView": "form"
},
"execution_count": 4,
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"id": "PQroYRRZzQiN",
"cellView": "form"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
torch
torchaudio
git+https://github.com/jhj0517/jhj0517-whisper.git
git+https://github.com/SYSTRAN/faster-whisper.git
faster-whisper==1.1.1
transformers
gradio
gradio-i18n
Expand Down
Loading