forked from GitHub/gf-core
Added semi-working speech_input command.
This commit is contained in:
@@ -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." ++
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user