I'm creating an application in Tropo using Python and I was wondering if I could create a small grammar that is local. I've read about external grammars SRGS
and GRXML
but can I create one using a Python list right in the code. Below is what I'm trying to do.
food = ['cheeseburger', 'hot dog', 'salad']
ask("What food would you like?",
#{'choices': "cheeseburger, hot dog, salad",
{'choices': food,
'attempts':3,
'onChoice': fill,
'onBadChoice': nomatch,
'onTimeout': noinput })
The above code compiles but it hangs up when it gets to this question.