From 7ba0c4c6ac84b6d7da99616a9c22bebb4a2802ac Mon Sep 17 00:00:00 2001 From: Jared Swift Date: Tue, 9 Jul 2024 14:11:45 +0100 Subject: [PATCH] feat: use dynamic energy threshold. --- .../nodes/transcribe_microphone_server | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/speech/lasr_speech_recognition_whisper/nodes/transcribe_microphone_server b/common/speech/lasr_speech_recognition_whisper/nodes/transcribe_microphone_server index 8d3fffb1c..8ca656e73 100644 --- a/common/speech/lasr_speech_recognition_whisper/nodes/transcribe_microphone_server +++ b/common/speech/lasr_speech_recognition_whisper/nodes/transcribe_microphone_server @@ -43,7 +43,7 @@ class speech_model_params: mic_device: Optional[str] = None timer_duration: Optional[int] = 20 warmup: bool = True - energy_threshold: Optional[int] = 600 + energy_threshold: Optional[int] = None pause_threshold: Optional[float] = 2.0 @@ -291,8 +291,8 @@ def parse_args() -> dict: parser.add_argument( "--energy_threshold", - type=int, - default=600, + type=Optional[int], + default=None, help="Energy threshold for silence detection. Using this disables automatic adjustment", )