summaryrefslogtreecommitdiff
path: root/src/GF/API.hs
diff options
context:
space:
mode:
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