Browse Source

Convert README to reStructuredText

More Python-friendly, yada yada yada.
Clara Hobbs 8 years ago
parent
commit
c4e5600c5e
2 changed files with 68 additions and 57 deletions
  1. 0
    57
      README.md
  2. 68
    0
      README.rst

+ 0
- 57
README.md View File

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

+ 68
- 0
README.rst View File

@@ -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``

Loading…
Cancel
Save