|
@@ -0,0 +1,68 @@
|
|
1
|
+Kaylee
|
|
2
|
+======
|
|
3
|
+
|
|
4
|
+Kaylee is a somewhat fancy speech recognizer that will run commands and
|
|
5
|
+perform other functions when a user speaks loosely preset sentences. It
|
|
6
|
+is based on `Blather <https://gitlab.com/jezra/blather>`__ by
|
|
7
|
+`Jezra <http://www.jezra.net/>`__, but adds a lot of features that go
|
|
8
|
+beyond the original purpose of Blather.
|
|
9
|
+
|
|
10
|
+Requirements
|
|
11
|
+------------
|
|
12
|
+
|
|
13
|
+1. Python 3 (tested with 3.5, may work with older versions)
|
|
14
|
+2. pocketsphinx 5prealpha
|
|
15
|
+3. gstreamer-1.0 (and what ever plugin has pocketsphinx support)
|
|
16
|
+4. gstreamer-1.0 base plugins (required for ALSA)
|
|
17
|
+5. python-gobject (required for GStreamer and the GTK-based UI)
|
|
18
|
+6. python-requests (required for automatic language updating)
|
|
19
|
+
|
|
20
|
+**Note:** it may also be required to install
|
|
21
|
+``pocketsphinx-hmm-en-hub4wsj``
|
|
22
|
+
|
|
23
|
+Usage
|
|
24
|
+-----
|
|
25
|
+
|
|
26
|
+1. Copy options.json.tmp to ~/.config/kaylee/options.json and fill the
|
|
27
|
+ "commands" section of the file with sentences to speak and commands
|
|
28
|
+ to run.
|
|
29
|
+2. Run kaylee.py. This will generate
|
|
30
|
+ ~/.local/share/kaylee/sentences.corpus based on sentences in the
|
|
31
|
+ "commands" section of options.json, then use the `Sphinx Knowledge
|
|
32
|
+ Base Tool <http://www.speech.cs.cmu.edu/tools/lmtool.html>`__ to
|
|
33
|
+ create and save a new language model and dictionary.
|
|
34
|
+
|
|
35
|
+ - For GTK UI, run kaylee.py -i g
|
|
36
|
+ - To start a UI in 'continuous' listen mode, use the -c flag
|
|
37
|
+ - To use a microphone other than the system default, use the -m flag
|
|
38
|
+
|
|
39
|
+3. Start talking!
|
|
40
|
+
|
|
41
|
+**Note:** default values for command-line arguments may be specified in
|
|
42
|
+the options.json file.
|
|
43
|
+
|
|
44
|
+Examples
|
|
45
|
+~~~~~~~~
|
|
46
|
+
|
|
47
|
+- To run Kaylee with the GTK UI, starting in continuous listen mode:
|
|
48
|
+ ``./kaylee.py -i g -c``
|
|
49
|
+
|
|
50
|
+- To run Kaylee with no UI and using a USB microphone recognized as
|
|
51
|
+ device 2: ``./kaylee.py -m 2``
|
|
52
|
+
|
|
53
|
+- To have Kaylee pass each word of the matched sentence as a separate
|
|
54
|
+ argument to the executed command: ``./kaylee.py -p``
|
|
55
|
+
|
|
56
|
+- To run a command when a valid sentence has been detected:
|
|
57
|
+ ``./kaylee.py --valid-sentence-command=/path/to/command``
|
|
58
|
+
|
|
59
|
+- To run a command when a invalid sentence has been detected:
|
|
60
|
+ ``./kaylee.py --invalid-sentence-command=/path/to/command``
|
|
61
|
+
|
|
62
|
+Finding the Device Number of a USB microphone
|
|
63
|
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
64
|
+
|
|
65
|
+There are a few ways to find the device number of a USB microphone.
|
|
66
|
+
|
|
67
|
+- ``cat /proc/asound/cards``
|
|
68
|
+- ``arecord -l``
|