Browse Source

Rename blather.py to kaylee.py

Clara Hobbs 8 years ago
parent
commit
a40bbe25e2
2 changed files with 15 additions and 15 deletions
  1. 7
    7
      README.md
  2. 8
    8
      kaylee.py

+ 7
- 7
README.md View File

@@ -20,11 +20,11 @@ but adds a lot of features that go beyond the original purpose of Blather.
20 20
 
21 21
 1. Move commands.tmp to ~/.config/kaylee/commands.conf and fill the file with
22 22
 sentences and command to run
23
-2. Run blather.py.  This will generate ~/.local/share/kaylee/sentences.corpus
23
+2. Run kaylee.py.  This will generate ~/.local/share/kaylee/sentences.corpus
24 24
 based on sentences in the 'commands' file, then use
25 25
 <http://www.speech.cs.cmu.edu/tools/lmtool.html> to create and save a new
26 26
 language model and dictionary.
27
-    * For GTK UI, run blather.py -i g
27
+    * For GTK UI, run kaylee.py -i g
28 28
     * To start a UI in 'continuous' listen mode, use the -c flag
29 29
     * To use a microphone other than the system default, use the -m flag
30 30
 3. Start talking
@@ -36,13 +36,13 @@ accordingly.
36 36
 ### Examples
37 37
 
38 38
 * To run Kaylee with the GTK UI and start in continuous listen mode:
39
-`./blather.py -i g -c`
39
+`./kaylee.py -i g -c`
40 40
 
41 41
 * To run Kaylee with no UI and using a USB microphone recognized and device 2:
42
-`./blather.py -m 2`
42
+`./kaylee.py -m 2`
43 43
 
44 44
 * To have Kaylee pass the matched sentence to the executed command:
45
-`./blather.py -p`
45
+`./kaylee.py -p`
46 46
 
47 47
 **explanation:** if the commands.conf contains:
48 48
 `good morning world: example_command.sh`
@@ -50,10 +50,10 @@ then 3 arguments, 'good', 'morning', and 'world' would get passed to
50 50
 example_command.sh as `example_command.sh good morning world`
51 51
 
52 52
 * To run a command when a valid sentence has been detected:
53
-	`./blather.py --valid-sentence-command=/path/to/command`
53
+	`./kaylee.py --valid-sentence-command=/path/to/command`
54 54
 	**note:** this can be set in the options.yml file
55 55
 * To run a command when a invalid sentence has been detected:
56
-	`./blather.py --invalid-sentence-command=/path/to/command`
56
+	`./kaylee.py --invalid-sentence-command=/path/to/command`
57 57
 	**note:** this can be set in the options.yml file
58 58
 
59 59
 ### Finding the Device Number of a USB microphone

blather.py → kaylee.py View File

@@ -19,7 +19,7 @@ from config import Config
19 19
 from languageupdater import LanguageUpdater
20 20
 
21 21
 
22
-class Blather:
22
+class Kaylee:
23 23
 
24 24
     def __init__(self):
25 25
         self.ui = None
@@ -90,7 +90,7 @@ class Blather:
90 90
                 # Pop off the first item
91 91
                 self.history.pop(0)
92 92
 
93
-            # Open and truncate the blather history file
93
+            # Open and truncate the history file
94 94
             hfile = open(self.config.history_file, "w")
95 95
             for line in self.history:
96 96
                 hfile.write(line + "\n")
@@ -134,7 +134,7 @@ class Blather:
134 134
         if self.ui:
135 135
             self.ui.run()
136 136
         else:
137
-            blather.recognizer.listen()
137
+            self.recognizer.listen()
138 138
 
139 139
     def quit(self):
140 140
         sys.exit()
@@ -156,7 +156,7 @@ class Blather:
156 156
 
157 157
     def load_resource(self, string):
158 158
         local_data = os.path.join(os.path.dirname(__file__), 'data')
159
-        paths = ["/usr/share/blather/", "/usr/local/share/blather", local_data]
159
+        paths = ["/usr/share/kaylee/", "/usr/local/share/kaylee", local_data]
160 160
         for path in paths:
161 161
             resource = os.path.join(path, string)
162 162
             if os.path.exists(resource):
@@ -166,16 +166,16 @@ class Blather:
166 166
 
167 167
 
168 168
 if __name__ == "__main__":
169
-    # Make our blather object
170
-    blather = Blather()
169
+    # Make our kaylee object
170
+    kaylee = Kaylee()
171 171
     # Init gobject threads
172 172
     GObject.threads_init()
173 173
     # We want a main loop
174 174
     main_loop = GObject.MainLoop()
175 175
     # Handle sigint
176 176
     signal.signal(signal.SIGINT, signal.SIG_DFL)
177
-    # Run the blather
178
-    blather.run()
177
+    # Run the kaylee
178
+    kaylee.run()
179 179
     # Start the main loop
180 180
     try:
181 181
         main_loop.run()

Loading…
Cancel
Save