diff --git a/whisper-2023/hotwords.py b/whisper-2023/hotwords.py index 342f79b..b98db81 100644 --- a/whisper-2023/hotwords.py +++ b/whisper-2023/hotwords.py @@ -112,6 +112,8 @@ class Parser(threading.Thread): log("Parser.run: start") while True: try: + if environ.get("DEBUG", None): + log(self.inq.qsize()) clip = self.inq.get() if clip is None: break @@ -123,7 +125,7 @@ class Parser(threading.Thread): def _run(self, clip): r = sr.Recognizer() - return r.recognize_whisper(clip, language="english", model="small.en") # tiny.en=32x, base.en=16x, small.en=6x + return r.recognize_whisper(clip, language="english", model=environ.get("MODEL", "small.en")) # tiny.en=32x, base.en=16x, small.en=6x, medium.en=x2 def load_dot_notation(v, s): items = s.replace("[]", ".[]").split(".")