From 5a480fac520db1bab6f1336bee9b2031dbd36cab Mon Sep 17 00:00:00 2001 From: bringert Date: Tue, 13 Dec 2005 21:03:56 +0000 Subject: Added semi-working speech_input command. --- src/GF/API.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/GF/API.hs') diff --git a/src/GF/API.hs b/src/GF/API.hs index 6ba3c261a..469b762ed 100644 --- a/src/GF/API.hs +++ b/src/GF/API.hs @@ -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 -- cgit v1.2.3