defualt to k

master
bel 2023-03-22 21:41:39 -06:00
parent 36e7a42b69
commit 181401166d
1 changed files with 2 additions and 2 deletions

View File

@ -48,12 +48,12 @@ class Recognizer(threading.Thread):
class Listener(): class Listener():
def __init__(self): def __init__(self):
if not environ.get("MIC_NAME", None): self.name = environ.get("MIC_NAME", "pulse_monitor")
if not self.name:
from sys import stdin from sys import stdin
for index, name in enumerate(sr.Microphone.list_microphone_names()): for index, name in enumerate(sr.Microphone.list_microphone_names()):
print("[{0}] Microphone with name \"{1}\" found for `Microphone(device_index={0})`".format(index, name)) print("[{0}] Microphone with name \"{1}\" found for `Microphone(device_index={0})`".format(index, name))
exit() exit()
self.name = environ["MIC_NAME"]
self._mic = None self._mic = None
def mic(self): def mic(self):