Spaces:
Sleeping
Sleeping
Fnu Mahnoor commited on
Commit ·
822e7b7
1
Parent(s): 1ca4f5c
fix streaming.py
Browse files
src/transcription/streaming_transcriber.py
CHANGED
|
@@ -67,33 +67,6 @@ class StreamingTranscriber:
|
|
| 67 |
condition_on_previous_text=True,
|
| 68 |
best_of=3 # Checks 3 variations to find the best one
|
| 69 |
)
|
| 70 |
-
|
| 71 |
-
# segments, _ = self.model.transcribe(
|
| 72 |
-
# new_state,
|
| 73 |
-
# beam_size=self.beam_size, # Increased for better word choice
|
| 74 |
-
# language=language,
|
| 75 |
-
# vad_filter=True,
|
| 76 |
-
# # Add these two for better flow:
|
| 77 |
-
# best_of=5, # Samples multiple times to find the best version
|
| 78 |
-
# patience=1.0, # Allows the model to wait for a better conclusion
|
| 79 |
-
# condition_on_previous_text=True # Set to True to help with context, but keep buffers small
|
| 80 |
-
# )
|
| 81 |
-
|
| 82 |
-
# segments, _ = self.model.transcribe(
|
| 83 |
-
# new_state,
|
| 84 |
-
# beam_size=self.beam_size,
|
| 85 |
-
# language=language,
|
| 86 |
-
# vad_filter=True,
|
| 87 |
-
# # Anti-repetition settings:
|
| 88 |
-
# # compression_ratio_threshold=2.4,
|
| 89 |
-
# # no_speech_threshold=0.6,
|
| 90 |
-
# # vad_parameters=dict(
|
| 91 |
-
# # threshold=0.5, # 0.5 is standard; increase to 0.6 if it still talks during silence
|
| 92 |
-
# # min_speech_duration_ms=300, # Ignore sounds shorter than 0.3s (clicks/breath)
|
| 93 |
-
# # min_silence_duration_ms=1000 # Wait for 1 second of silence before cutting off
|
| 94 |
-
# # ),
|
| 95 |
-
# condition_on_previous_text=False
|
| 96 |
-
# )
|
| 97 |
current_chunk_text = "".join([s.text for s in segments]).strip()
|
| 98 |
|
| 99 |
if current_chunk_text:
|
|
|
|
| 67 |
condition_on_previous_text=True,
|
| 68 |
best_of=3 # Checks 3 variations to find the best one
|
| 69 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
current_chunk_text = "".join([s.text for s in segments]).strip()
|
| 71 |
|
| 72 |
if current_chunk_text:
|