Skip to content

Commit 617f587

Browse files
authored
Merge pull request #354 from makaveli10/remove_audio_clipping
Remove clip_audio from faster_whisper backend
2 parents 5e430f8 + fb3deb2 commit 617f587

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

whisper_live/backend/base.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def __init__(self, client_uid, websocket):
2828
self.transcript = []
2929
self.send_last_n_segments = 10
3030
self.no_speech_thresh = 0.45
31+
self.clip_audio = False
3132

3233
# text formatting
3334
self.pick_previous_segments = 2
@@ -60,7 +61,8 @@ def speech_to_text(self):
6061
if self.frames_np is None:
6162
continue
6263

63-
self.clip_audio_if_no_valid_segment()
64+
if self.clip_audio:
65+
self.clip_audio_if_no_valid_segment()
6466

6567
input_bytes, duration = self.get_audio_chunk_for_processing()
6668
if duration < 1.0:

whisper_live/backend/openvino_backend.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self, websocket, task="transcribe", device=None, language=None, cli
3838
self.task = "transcribe" if task is None else task
3939
self.same_output_threshold = 10
4040
self.end_time_for_same_output = None
41+
self.clip_audio = True
4142

4243
core = Core()
4344
available_devices = core.available_devices

0 commit comments

Comments
 (0)