defualt to k
parent
36e7a42b69
commit
181401166d
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue