Update modules/whisper/faster_whisper_inference.py
Browse files
modules/whisper/faster_whisper_inference.py
CHANGED
|
@@ -67,6 +67,8 @@ class FasterWhisperInference(WhisperBase):
|
|
| 67 |
if params.model_size != self.current_model_size or self.model is None or self.current_compute_type != params.compute_type:
|
| 68 |
self.update_model(params.model_size, params.compute_type, progress)
|
| 69 |
|
|
|
|
|
|
|
| 70 |
segments, info = self.model.transcribe(
|
| 71 |
audio=audio,
|
| 72 |
language=params.lang,
|
|
@@ -93,7 +95,7 @@ class FasterWhisperInference(WhisperBase):
|
|
| 93 |
chunk_length=params.chunk_length,
|
| 94 |
hallucination_silence_threshold=params.hallucination_silence_threshold,
|
| 95 |
hotwords=params.hotwords,
|
| 96 |
-
language_detection_threshold=
|
| 97 |
language_detection_segments=params.language_detection_segments,
|
| 98 |
prompt_reset_on_temperature=params.prompt_reset_on_temperature,
|
| 99 |
)
|
|
|
|
| 67 |
if params.model_size != self.current_model_size or self.model is None or self.current_compute_type != params.compute_type:
|
| 68 |
self.update_model(params.model_size, params.compute_type, progress)
|
| 69 |
|
| 70 |
+
print("test: "+str(params.language_detection_threshold)
|
| 71 |
+
|
| 72 |
segments, info = self.model.transcribe(
|
| 73 |
audio=audio,
|
| 74 |
language=params.lang,
|
|
|
|
| 95 |
chunk_length=params.chunk_length,
|
| 96 |
hallucination_silence_threshold=params.hallucination_silence_threshold,
|
| 97 |
hotwords=params.hotwords,
|
| 98 |
+
language_detection_threshold=params.language_detection_threshold,
|
| 99 |
language_detection_segments=params.language_detection_segments,
|
| 100 |
prompt_reset_on_temperature=params.prompt_reset_on_temperature,
|
| 101 |
)
|