1
0
forked from GitHub/gf-core

Added semi-working speech_input command.

This commit is contained in:
bringert
2005-12-13 21:03:56 +00:00
parent 0101410954
commit 18a57aa56a
15 changed files with 190 additions and 11 deletions

View File

@@ -59,6 +59,8 @@ import qualified GF.Embed.EmbedAPI as EA
import GF.UseGrammar.Editing
import GF.System.SpeechInput (recognizeSpeech)
----import GrammarToXML
----import GrammarToMGrammar as M
@@ -206,6 +208,14 @@ speechGenerate opts str = do
--- system ("echo" +++ "\"" ++ str ++ "\" | festival --tts" ++ lan)
return ()
-- FIXME: look at flags
speechInput :: Options -> StateGrammar -> IO String
speechInput opt s = recognizeSpeech name opts cfg
where
opts = stateOptions s
name = cncId s
cfg = stateCFG s
optLinearizeTreeVal :: Options -> GFGrammar -> Tree -> String
optLinearizeTreeVal opts gr = err id id . optLinearizeTree opts gr