jhj0517 commited on
Commit
19e342a
·
1 Parent(s): ce2f852

Add gradio value validation

Browse files
modules/whisper/base_transcription_pipeline.py CHANGED
@@ -554,6 +554,9 @@ class BaseTranscriptionPipeline(ABC):
554
  if cached_yaml["whisper"].get("lang", None) is None:
555
  cached_yaml["whisper"]["lang"] = AUTOMATIC_DETECTION.unwrap()
556
 
 
 
 
557
  if cached_yaml is not None and cached_yaml:
558
  save_yaml(cached_yaml, DEFAULT_PARAMETERS_CONFIG_PATH)
559
 
 
554
  if cached_yaml["whisper"].get("lang", None) is None:
555
  cached_yaml["whisper"]["lang"] = AUTOMATIC_DETECTION.unwrap()
556
 
557
+ if cached_yaml["vad"].get("max_speech_duration_s", float('inf')) == float('inf'):
558
+ cached_yaml["vad"]["max_speech_duration_s"] = 9999
559
+
560
  if cached_yaml is not None and cached_yaml:
561
  save_yaml(cached_yaml, DEFAULT_PARAMETERS_CONFIG_PATH)
562