summaryrefslogtreecommitdiff
path: root/src/GF/API.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2005-12-13 21:03:56 +0000
committerbringert <bringert@cs.chalmers.se>2005-12-13 21:03:56 +0000
commit5a480fac520db1bab6f1336bee9b2031dbd36cab (patch)
tree01210f87844268c0652867df51f4831094fa3e17 /src/GF/API.hs
parent9f867c4922cccb6e61b273a55103e2afaeac4bde (diff)
Added semi-working speech_input command.
Diffstat (limited to 'src/GF/API.hs')
-rw-r--r--src/GF/API.hs10
1 files changed, 10 insertions, 0 deletions
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