diff --git a/modules/speech/speech.py b/modules/speech/speech.py index 1043fc8..fd67957 100644 --- a/modules/speech/speech.py +++ b/modules/speech/speech.py @@ -9,7 +9,7 @@ class voiceInput(object): what = "??" error = "ERROR" - def start( self, deviceIndex=30 ): # a generator for everything that is said + def start( self, deviceIndex=None ): # a generator for everything that is said while( True ): # loop try: if( not self.muted ): # this thing is not the NSA diff --git a/speech_daemon.py b/speech_daemon.py index 0683395..f5981f9 100755 --- a/speech_daemon.py +++ b/speech_daemon.py @@ -15,14 +15,12 @@ CONFIG = {} class speech_daemon(object): voiceInpObj = None - deviceIndex = 30 + deviceIndex = None - def __init__(self, deviceIndex=30): + def __init__(self): self.voiceInpObj = voiceInput() self.voiceInpObj.setMuted(False) - self.deviceIndex = deviceIndex - def loadconfig(self): path = homedir + "/.config/roomcomputer/config.json" # if no config path is @@ -36,6 +34,8 @@ class speech_daemon(object): global CONFIG CONFIG = cfg + self.deviceIndex = CONFIG["speech"]["device_index"] + def start(self): controller.init()