|
@@ -3,6 +3,7 @@ import threading
|
|
|
import console
|
|
import console
|
|
|
import google_cloud_speech
|
|
import google_cloud_speech
|
|
|
import slack_bot
|
|
import slack_bot
|
|
|
|
|
+import conf
|
|
|
|
|
|
|
|
LANGUAGE = 'en-GB'
|
|
LANGUAGE = 'en-GB'
|
|
|
PREFERRED_PHRASES = None
|
|
PREFERRED_PHRASES = None
|
|
@@ -32,10 +33,13 @@ def launch_input_sources():
|
|
|
|
|
|
|
|
services = [
|
|
services = [
|
|
|
console.ConsoleInput(_TOKEN_STREAM),
|
|
console.ConsoleInput(_TOKEN_STREAM),
|
|
|
- #google_cloud_speech.GoogleCloudSpeech(_TOKEN_STREAM),
|
|
|
|
|
- slack_bot.SlackBot(_TOKEN_STREAM),
|
|
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
+ if conf.ENABLE_SPEECH_INPUT:
|
|
|
|
|
+ services.append(google_cloud_speech.GoogleCloudSpeech(_TOKEN_STREAM))
|
|
|
|
|
+ if conf.SLACK_BOT_API_KEY:
|
|
|
|
|
+ services.append(slack_bot.SlackBot(_TOKEN_STREAM))
|
|
|
|
|
+
|
|
|
for s in services:
|
|
for s in services:
|
|
|
t = threading.Thread(target=s.run)
|
|
t = threading.Thread(target=s.run)
|
|
|
t.setDaemon(True)
|
|
t.setDaemon(True)
|