From bc07966df1831a73df715bec4ef7014631c9dadb Mon Sep 17 00:00:00 2001 From: "Clayton G. Hobbs" Date: Fri, 12 Feb 2016 19:27:32 -0500 Subject: Only write the strings file if necessary Now we check a hash of the voice commands before writing the strings file to reduce how much we write to the hard disk. In implementing this, I realized that some code was being duplicated in an easily fixable way, so I created a Hasher object that keeps track of the hash.json file. Resolves #6 --- recognizer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'recognizer.py') diff --git a/recognizer.py b/recognizer.py index 2ab1945..b54c055 100644 --- a/recognizer.py +++ b/recognizer.py @@ -15,7 +15,8 @@ Gst.init(None) class Recognizer(GObject.GObject): __gsignals__ = { - 'finished' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_STRING,)) + 'finished' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, + (GObject.TYPE_STRING,)) } def __init__(self, config): -- cgit 1.4.1