summaryrefslogtreecommitdiff
path: root/src/GF/Shell
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Shell')
-rw-r--r--src/GF/Shell/HelpFile.hs8
-rw-r--r--src/GF/Shell/PShell.hs1
-rw-r--r--src/GF/Shell/ShellCommands.hs3
3 files changed, 12 insertions, 0 deletions
diff --git a/src/GF/Shell/HelpFile.hs b/src/GF/Shell/HelpFile.hs
index 82d3a9713..db8b81a29 100644
--- a/src/GF/Shell/HelpFile.hs
+++ b/src/GF/Shell/HelpFile.hs
@@ -480,6 +480,14 @@ txtHelpFile =
"\n h | sa -- listen to the list of commands" ++
"\n gr -cat=S | l | sa -- generate a random sentence and speak it aloud" ++
"\n" ++
+ "\nsi, speech_input: si" ++
+ "\n Uses an ATK speech recognizer to get speech input. " ++
+ "\n flags:" ++
+ "\n -lang: The grammar to use with the speech recognizer." ++
+ "\n -cat: The grammar category to get input in." ++
+ "\n -language: Use acoustic model and dictionary for this language." ++
+ "\n -number: The number of utterances to recognize." ++
+ "\n" ++
"\nh, help: h Command?" ++
"\n Displays the paragraph concerning the command from this help file." ++
"\n Without the argument, shows the first lines of all paragraphs." ++
diff --git a/src/GF/Shell/PShell.hs b/src/GF/Shell/PShell.hs
index cd54c71ed..77264fee9 100644
--- a/src/GF/Shell/PShell.hs
+++ b/src/GF/Shell/PShell.hs
@@ -134,6 +134,7 @@ pCommand ws = case ws of
"af" : f : s -> aString (CAppendFile (unquote f)) s
"rf" : f : [] -> aUnit (CReadFile (unquote f))
"sa" : s -> aString CSpeakAloud s
+ "si" : [] -> aUnit CSpeechInput
"ps" : s -> aString CPutString s
"st" : s -> aTerm CShowTerm s
"!" : s -> aUnit (CSystemCommand (unwords s))
diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs
index bf7d4f1ff..27e027c50 100644
--- a/src/GF/Shell/ShellCommands.hs
+++ b/src/GF/Shell/ShellCommands.hs
@@ -65,6 +65,7 @@ data Command =
| CWriteFile FilePath
| CAppendFile FilePath
| CSpeakAloud
+ | CSpeechInput
| CPutString
| CShowTerm
| CSystemCommand String
@@ -197,6 +198,8 @@ optionsOfCommand co = case co of
CWriteFile _ -> none
CAppendFile _ -> none
CSpeakAloud -> flags "language"
+ CSpeechInput -> flags "lang cat language number"
+
CPutString -> both "utf8" "filter length"
CShowTerm -> flags "printer"
CShowTreeGraph -> opts "c f g o"