From 72ca3d8427459eeaf4aeca4f602cb0162fc45682 Mon Sep 17 00:00:00 2001 From: cstollen <cstollen@techfak> Date: Fri, 7 Dec 2018 15:14:24 +0100 Subject: [PATCH] Add grammars and configs for speechrec --- psConfig/exercise/cstollen/cstollen.conf | 34 +++++++++++++++++++ psGrammar/exercise/cstollen/calculator.jsgf | 7 ++++ psGrammar/exercise/cstollen/confirm.jsgf | 9 +++++ .../cstollen/confirm_drivetodoor.jsgf | 10 ++++++ psGrammar/exercise/cstollen/goto.jsgf | 5 +++ psGrammar/exercise/cstollen/telljoke.jsgf | 4 +++ psGrammar/exercise/cstollen/thanks.jsgf | 6 ++++ 7 files changed, 75 insertions(+) create mode 100644 psConfig/exercise/cstollen/cstollen.conf create mode 100644 psGrammar/exercise/cstollen/calculator.jsgf create mode 100644 psGrammar/exercise/cstollen/confirm.jsgf create mode 100644 psGrammar/exercise/cstollen/confirm_drivetodoor.jsgf create mode 100644 psGrammar/exercise/cstollen/goto.jsgf create mode 100644 psGrammar/exercise/cstollen/telljoke.jsgf create mode 100644 psGrammar/exercise/cstollen/thanks.jsgf diff --git a/psConfig/exercise/cstollen/cstollen.conf b/psConfig/exercise/cstollen/cstollen.conf new file mode 100644 index 00000000..5f250411 --- /dev/null +++ b/psConfig/exercise/cstollen/cstollen.conf @@ -0,0 +1,34 @@ +[main] +startdb=30; +uttdb=35; +silence=400; +timeout=8; +openDeviceDirectly=yes; + +[pocketsphinxinstance] +name=goto; +jsgf=../../../psGrammar/exercise/cstollen/goto.jsgf; +rsbscope=/speechrec/psa/goto; +bestpath=no; +autoload=yes; + +[pocketsphinxinstance] +name=telljoke; +jsgf=../../../psGrammar/exercise/cstollen/telljoke.jsgf; +rsbscope=/speechrec/psa/telljoke; +bestpath=no; +autoload=yes; + +[pocketsphinxinstance] +name=confirm; +jsgf=../../../psGrammar/exercise/cstollen/confirm.jsgf; +rsbscope=/speechrec/psa/confirm; +bestpath=no; +autoload=yes; + +[pocketsphinxinstance] +name=calculator; +jsgf=../../../psGrammar/exercise/cstollen/calculator.jsgf; +rsbscope=/speechrec/psa/calculator; +bestpath=no; +autoload=yes; diff --git a/psGrammar/exercise/cstollen/calculator.jsgf b/psGrammar/exercise/cstollen/calculator.jsgf new file mode 100644 index 00000000..5386ca9c --- /dev/null +++ b/psGrammar/exercise/cstollen/calculator.jsgf @@ -0,0 +1,7 @@ +#JSGF V1.0; +grammar calculator; +public <calcstring> = <robot> calculate <number> (plus | minus) <number>; + +<number> = (one | two | three | four | five | six | seven | eight | nine | zero); + +<robot> = (floka | meka | robot | tobi); diff --git a/psGrammar/exercise/cstollen/confirm.jsgf b/psGrammar/exercise/cstollen/confirm.jsgf new file mode 100644 index 00000000..2f66d472 --- /dev/null +++ b/psGrammar/exercise/cstollen/confirm.jsgf @@ -0,0 +1,9 @@ +#JSGF V1.0; +grammar jUP_confirm; +public <confirm> = (<confirm_yes> | <confirm_no>); + +<confirm_yes> = <yes_words>; +<confirm_no> = <no_words>; + +<yes_words> = (yes | confirm | confirmed | right | correct); +<no_words> = (no | nope | wrong | incorrect); diff --git a/psGrammar/exercise/cstollen/confirm_drivetodoor.jsgf b/psGrammar/exercise/cstollen/confirm_drivetodoor.jsgf new file mode 100644 index 00000000..3f9894ce --- /dev/null +++ b/psGrammar/exercise/cstollen/confirm_drivetodoor.jsgf @@ -0,0 +1,10 @@ +#JSGF V1.0; +grammar jUP_confirm; +public <confirm> = [<robot>] [(that is [a]) | (you got that)] (<confirm_yes> | <confirm_no>) [<robot>]; + +<confirm_yes> = <yes_words>; +<confirm_no> = <no_words>; + +<yes_words> = (yes | confirmed | right | correct); +<no_words> = (no | nope | wrong | incorrect); +<robot> = (floka | meka | robot); diff --git a/psGrammar/exercise/cstollen/goto.jsgf b/psGrammar/exercise/cstollen/goto.jsgf new file mode 100644 index 00000000..1f9b9dca --- /dev/null +++ b/psGrammar/exercise/cstollen/goto.jsgf @@ -0,0 +1,5 @@ +#JSGF V1.0; +grammar ToBI_commands; +public <statement> = <robot> go to the door; + +<robot> = (tobi | tiago); diff --git a/psGrammar/exercise/cstollen/telljoke.jsgf b/psGrammar/exercise/cstollen/telljoke.jsgf new file mode 100644 index 00000000..bef53fb1 --- /dev/null +++ b/psGrammar/exercise/cstollen/telljoke.jsgf @@ -0,0 +1,4 @@ +#JSGF V1.0; +grammar ToBI_commands; +public <statement> = tobi tell me a joke; + diff --git a/psGrammar/exercise/cstollen/thanks.jsgf b/psGrammar/exercise/cstollen/thanks.jsgf new file mode 100644 index 00000000..58fac3dc --- /dev/null +++ b/psGrammar/exercise/cstollen/thanks.jsgf @@ -0,0 +1,6 @@ +#JSGF V1.0; +grammar jUP_thanks; +public <statement> = [<robot>] (thanks | (thank you [for (the | my) <drink>])) [[(that is) | how] [very] (nice | sweet) [of you]] [<robot>]; + +<drink> = (fanta | coke | milk | (orange juice) | water); +<robot> = (floka | meka | robot); -- GitLab