From 00b0cdb291d2e025366f153fd504bc7f9218e6bb Mon Sep 17 00:00:00 2001 From: Jezra Date: Tue, 14 Jan 2014 20:53:24 -0800 Subject: Added '-m --microphone' flag to let the user pick a mic other than the system default --- Blather.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Blather.py') diff --git a/Blather.py b/Blather.py index f5d8a67..6ec6b02 100755 --- a/Blather.py +++ b/Blather.py @@ -34,7 +34,7 @@ class Blather: self.continuous_listen = False self.commands = {} self.read_commands() - self.recognizer = Recognizer(lang_file, dic_file) + self.recognizer = Recognizer(lang_file, dic_file, opts.microphone ) self.recognizer.connect('finished',self.recognizer_finished) if opts.interface != None: @@ -155,6 +155,9 @@ if __name__ == "__main__": parser.add_option("-H", "--history", type="int", action="store", dest="history", help="number of commands to store in history file") + parser.add_option("-m", "--microphone", type="int", + action="store", dest="microphone", default=None, + help="Audio input card to use (if other than system default)") (options, args) = parser.parse_args() #make our blather object -- cgit 1.4.1