mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
tweaked Whisper parameters
This commit is contained in:
parent
d5efc0659b
commit
a24fa781f1
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user