|
|
@ -15,14 +15,12 @@ CONFIG = {} |
|
|
|
|
|
|
|
|
|
|
|
class speech_daemon(object): |
|
|
|
class speech_daemon(object): |
|
|
|
voiceInpObj = None |
|
|
|
voiceInpObj = None |
|
|
|
deviceIndex = 30 |
|
|
|
deviceIndex = None |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, deviceIndex=30): |
|
|
|
def __init__(self): |
|
|
|
self.voiceInpObj = voiceInput() |
|
|
|
self.voiceInpObj = voiceInput() |
|
|
|
self.voiceInpObj.setMuted(False) |
|
|
|
self.voiceInpObj.setMuted(False) |
|
|
|
|
|
|
|
|
|
|
|
self.deviceIndex = deviceIndex |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def loadconfig(self): |
|
|
|
def loadconfig(self): |
|
|
|
path = homedir + "/.config/roomcomputer/config.json" |
|
|
|
path = homedir + "/.config/roomcomputer/config.json" |
|
|
|
# if no config path is |
|
|
|
# if no config path is |
|
|
@ -36,6 +34,8 @@ class speech_daemon(object): |
|
|
|
global CONFIG |
|
|
|
global CONFIG |
|
|
|
CONFIG = cfg |
|
|
|
CONFIG = cfg |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.deviceIndex = CONFIG["speech"]["device_index"] |
|
|
|
|
|
|
|
|
|
|
|
def start(self): |
|
|
|
def start(self): |
|
|
|
controller.init() |
|
|
|
controller.init() |
|
|
|
|
|
|
|
|
|
|
|