diff options
author | Jezra <jezra@jezra.net> | 2014-11-09 18:57:59 -0800 |
---|---|---|
committer | Jezra <jezra@jezra.net> | 2014-11-09 18:57:59 -0800 |
commit | 8433aac1ed4c6084beb3fccf964af7bed59caa45 (patch) | |
tree | 5922b50503a15b2d1a16f56fe9267f778e1c17f3 /Blather.py | |
parent | 87585c7b20ace497d2497ee916f84d7e8e5e9a8d (diff) |
*slightly* improved the error handling.... slightly
Diffstat (limited to 'Blather.py')
-rwxr-xr-x | Blather.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Blather.py b/Blather.py index 9ad5e14..ed5e6ed 100755 --- a/Blather.py +++ b/Blather.py @@ -76,7 +76,12 @@ class Blather: self.history = [] #create the recognizer - self.recognizer = Recognizer(lang_file, dic_file, self.options['microphone'] ) + try: + self.recognizer = Recognizer(lang_file, dic_file, self.options['microphone'] ) + except Exception, e: + #no recognizer? bummer + sys.exit() + self.recognizer.connect('finished',self.recognizer_finished) print "Using Options: ", self.options |