From a24fa781f1627ffc0c15cf56f1eb1b1f8ee26876 Mon Sep 17 00:00:00 2001 From: EliasVincent Date: Thu, 9 Mar 2023 21:18:46 +0100 Subject: [PATCH] tweaked Whisper parameters --- extensions/whisper_stt/script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/whisper_stt/script.py b/extensions/whisper_stt/script.py index 9f07e5c9..dec1efb0 100644 --- a/extensions/whisper_stt/script.py +++ b/extensions/whisper_stt/script.py @@ -11,11 +11,11 @@ def do_stt(): transcription = "" r = sr.Recognizer() with sr.Microphone() as source: - r.adjust_for_ambient_noise(source) + r.adjust_for_ambient_noise(source, 0.2) audio = r.listen(source) try: - transcription = r.recognize_whisper(audio, language="english", model="tiny.en") + transcription = r.recognize_whisper(audio, language="english", model="base.en") except sr.UnknownValueError: print("Whisper could not understand audio") except sr.RequestError as e: