Skip to content

Commit

Permalink
tweaked Whisper parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasVincent committed Mar 9, 2023
1 parent d5efc06 commit a24fa78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/whisper_stt/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a24fa78

Please sign in to comment.