diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-03-30 16:03:44 -0400 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-03-30 16:03:44 -0400 |
| commit | d31fabf8cff5dae02e3fc759a4203bd374dddc99 (patch) | |
| tree | 888ec4e6d98154f862a3b9cd17a3394b657bc02e /client/main.py | |
| parent | 4182b5e096e081158dddd4ad5d031af94fcc63de (diff) | |
| download | jasper-client-d31fabf8cff5dae02e3fc759a4203bd374dddc99.tar.gz jasper-client-d31fabf8cff5dae02e3fc759a4203bd374dddc99.zip | |
Initial commit
Diffstat (limited to 'client/main.py')
| -rw-r--r-- | client/main.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/client/main.py b/client/main.py new file mode 100644 index 0000000..c5805c4 --- /dev/null +++ b/client/main.py @@ -0,0 +1,30 @@ +import yaml +import sys +from conversation import Conversation + + +def isLocal(): + return len(sys.argv) > 1 and sys.argv[1] == "--local" + +if isLocal(): + from local_mic import Mic +else: + from mic import Mic + +if __name__ == "__main__": + + print "===========================================================" + print " JASPER The Talking Computer " + print " Copyright 2013 Shubhro Saha & Charlie Marsh " + print "===========================================================" + + profile = yaml.safe_load(open("profile.yml", "r")) + + mic = Mic("languagemodel.lm", "dictionary.dic", + "languagemodel_persona.lm", "dictionary_persona.dic") + + mic.say("How can I be of service?") + + conversation = Conversation("JASPER", mic, profile) + + conversation.handleForever() |
