Browse Source

Added invalid sentence command and valid sentence command to the documentation

Jezra 9 years ago
parent
commit
5fc770044c
2 changed files with 18 additions and 9 deletions
  1. 16
    9
      README.md
  2. 2
    0
      options.yaml.tmp

+ 16
- 9
README.md View File

7
 3. gstreamer-0.10 base plugins (required for alsa)
7
 3. gstreamer-0.10 base plugins (required for alsa)
8
 4. pyside (only required for the Qt based UI)
8
 4. pyside (only required for the Qt based UI)
9
 5. pygtk (only required for the Gtk based UI)
9
 5. pygtk (only required for the Gtk based UI)
10
-6. pyyaml (only required for reading the options file)
10
+6. pyyaml (only required for reading the options file)  
11
+
12
+**Note:** it may also be required to install `pocketsphinx-hmm-en-hub4wsj`
13
+
14
+
11
 
15
 
12
 ##Usage
16
 ##Usage
13
 0. move commands.tmp to ~/.config/blather/commands.conf and fill the file with sentences and command to run
17
 0. move commands.tmp to ~/.config/blather/commands.conf and fill the file with sentences and command to run
29
 once the sentences.corpus file has been created, run the language_updater.sh script to automate the process of creating and downloading language files.
33
 once the sentences.corpus file has been created, run the language_updater.sh script to automate the process of creating and downloading language files.
30
 
34
 
31
 ###Examples
35
 ###Examples
32
-To run blather with the GTK UI and start in continuous listen mode:
36
+* To run blather with the GTK UI and start in continuous listen mode:  
33
 `./Blather.py -i g -c`
37
 `./Blather.py -i g -c`
34
 
38
 
35
-To run blather with no UI and using a USB microphone recognized and device 2:
39
+* To run blather with no UI and using a USB microphone recognized and device 2:  
36
 `./Blather.py -m 2`
40
 `./Blather.py -m 2`
37
 
41
 
42
+* To have blather pass the matched sentence to the executing command:  
43
+ `./Blather.py -p`  
38
 
44
 
39
-To have blather pass the matched sentence to the executing command:  
40
- `./Blather -p`  
41
-
42
- **explanation:** if the commands.conf contains:  
45
+ 	**explanation:** if the commands.conf contains:  
43
  **good morning world : example_command.sh**   
46
  **good morning world : example_command.sh**   
44
  then 3 arguments, 'good', 'morning', and 'world' would get passed to example_command.sh as  
47
  then 3 arguments, 'good', 'morning', and 'world' would get passed to example_command.sh as  
45
  `example_command.sh good morning world`
48
  `example_command.sh good morning world`
46
 
49
 
47
-
48
-
50
+* To run a command when a valid sentence has been detected:   
51
+	`./Blather.py --valid-sentence-command=/path/to/command`  
52
+	**note:** this can be set in the options.yml file
53
+* To run a command when a invalid sentence has been detected:   
54
+	`./Blather.py --invalid-sentence-command=/path/to/command`  
55
+	**note:** this can be set in the options.yml file
49
 ###Finding the Device Number of a USB microphone
56
 ###Finding the Device Number of a USB microphone
50
 There are a few ways to find the device number of a USB microphone.
57
 There are a few ways to find the device number of a USB microphone.
51
 
58
 

+ 2
- 0
options.yaml.tmp View File

4
 history: null
4
 history: null
5
 microphone: null
5
 microphone: null
6
 interface: null
6
 interface: null
7
+valid_sentence_command: null
8
+invalid_sentence_command: null

Loading…
Cancel
Save